comparison cinst/nssstore_linux.c @ 1060:317ee9dc4684

(issue46) Make debug output optional in cinst and mozilla and propagate its setting.
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 09 Sep 2014 18:49:02 +0200
parents 78798d3af8f0
children e210ecc32d69
comparison
equal deleted inserted replaced
1059:f638eb1f3b0f 1060:317ee9dc4684
47 start_procces_for_user (char **to_install, char **to_remove, 47 start_procces_for_user (char **to_install, char **to_remove,
48 uid_t uid, gid_t gid, char *homedir) 48 uid_t uid, gid_t gid, char *homedir)
49 { 49 {
50 int pipe_fd[2]; 50 int pipe_fd[2];
51 pid_t pid = 0; 51 pid_t pid = 0;
52 char *argv[2] = {NULL, NULL}, 52 char *argv[3] = {NULL, NULL, NULL},
53 *envp[2] = {NULL, NULL}, 53 *envp[2] = {NULL, NULL},
54 *inst_dir = NULL; 54 *inst_dir = NULL;
55 size_t homedir_len = 0, 55 size_t homedir_len = 0,
56 exe_path_len = 0; 56 exe_path_len = 0;
57 int ret = -1, 57 int ret = -1,
89 return -1; 89 return -1;
90 } 90 }
91 91
92 exe_path_len = strlen(inst_dir) + strlen(NSS_PROCESS_NAME); 92 exe_path_len = strlen(inst_dir) + strlen(NSS_PROCESS_NAME);
93 argv[0] = xmalloc (exe_path_len + 1); 93 argv[0] = xmalloc (exe_path_len + 1);
94
95 if (g_debug)
96 {
97 argv[1] = "--debug";
98 }
94 99
95 ret = snprintf(argv[0], exe_path_len + 1, "%s%s", inst_dir, NSS_PROCESS_NAME); 100 ret = snprintf(argv[0], exe_path_len + 1, "%s%s", inst_dir, NSS_PROCESS_NAME);
96 xfree (inst_dir); 101 xfree (inst_dir);
97 if (ret < 0 || (size_t) ret != exe_path_len) 102 if (ret < 0 || (size_t) ret != exe_path_len)
98 { 103 {

http://wald.intevation.org/projects/trustbridge/