/[path-sandbox]/trunk/src/environ.c
Gentoo

Diff of /trunk/src/environ.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 400 Revision 401
110{ 110{
111 rc_dynbuf_t *env_data = NULL; 111 rc_dynbuf_t *env_data = NULL;
112 int count = 0; 112 int count = 0;
113 char *config = NULL; 113 char *config = NULL;
114 char **confd_files = NULL; 114 char **confd_files = NULL;
115 bool use_confd = TRUE; 115 bool use_confd = true;
116 116
117 env_data = rc_dynbuf_new(); 117 env_data = rc_dynbuf_new();
118 if (NULL == env_data) 118 if (NULL == env_data)
119 return -1; 119 return -1;
120 120
128 config = NULL; 128 config = NULL;
129 } 129 }
130 /* Append whatever might be already set. If anything is set, we do 130 /* Append whatever might be already set. If anything is set, we do
131 * not process the sandbox.d/ files for this variable. */ 131 * not process the sandbox.d/ files for this variable. */
132 if (NULL != getenv(access_var)) { 132 if (NULL != getenv(access_var)) {
133 use_confd = FALSE; 133 use_confd = false;
134 if (-1 == rc_dynbuf_sprintf(env_data, env_data->wr_index ? ":%s" : "%s", 134 if (-1 == rc_dynbuf_sprintf(env_data, env_data->wr_index ? ":%s" : "%s",
135 getenv(access_var))) 135 getenv(access_var)))
136 goto error; 136 goto error;
137 } 137 }
138 138
139 if (!use_confd) 139 if (!use_confd)
140 goto done; 140 goto done;
141 141
142 /* Now scan the files in sandbox.d/ if the access variable was not 142 /* Now scan the files in sandbox.d/ if the access variable was not
143 * alreay set. */ 143 * alreay set. */
144 confd_files = rc_ls_dir(SANDBOX_CONFD_DIR, FALSE, TRUE); 144 confd_files = rc_ls_dir(SANDBOX_CONFD_DIR, false, true);
145 if (NULL != confd_files) { 145 if (NULL != confd_files) {
146 while (NULL != confd_files[count]) { 146 while (NULL != confd_files[count]) {
147 config = rc_get_cnf_entry(confd_files[count], access_var, ":"); 147 config = rc_get_cnf_entry(confd_files[count], access_var, ":");
148 if (NULL != config) { 148 if (NULL != config) {
149 if (-1 == rc_dynbuf_sprintf(env_data, 149 if (-1 == rc_dynbuf_sprintf(env_data,

Legend:
Removed from v.400  
changed lines
  Added in v.401

  ViewVC Help
Powered by ViewVC 1.1.20