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

Diff of /trunk/src/sandbox.c

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

Revision 204 Revision 216
39 char *home_dir; 39 char *home_dir;
40} sandbox_info_t; 40} sandbox_info_t;
41 41
42static int print_debug = 0; 42static int print_debug = 0;
43static int stop_called = 0; 43static int stop_called = 0;
44
45extern char **environ;
44 46
45int sandbox_setup(struct sandbox_info_t *sandbox_info) 47int sandbox_setup(struct sandbox_info_t *sandbox_info)
46{ 48{
47 if (NULL != getenv(ENV_PORTAGE_TMPDIR)) { 49 if (NULL != getenv(ENV_PORTAGE_TMPDIR)) {
48 /* Portage handle setting SANDBOX_WRITE itself. */ 50 /* Portage handle setting SANDBOX_WRITE itself. */
294 strlen(sandbox_info->sandbox_lib) + 2, "%s %s", 296 strlen(sandbox_info->sandbox_lib) + 2, "%s %s",
295 sandbox_info->sandbox_lib, orig_ld_preload_envvar); 297 sandbox_info->sandbox_lib, orig_ld_preload_envvar);
296 } else { 298 } else {
297 /* FIXME: Should probably free this at some stage - more neatness 299 /* FIXME: Should probably free this at some stage - more neatness
298 * than a real leak that will cause issues. */ 300 * than a real leak that will cause issues. */
299 ld_preload_envvar = strndup(sandbox_info->sandbox_lib, 301 ld_preload_envvar = gstrndup(sandbox_info->sandbox_lib,
300 strlen(sandbox_info->sandbox_lib)); 302 strlen(sandbox_info->sandbox_lib));
301 if (NULL == ld_preload_envvar) 303 if (NULL == ld_preload_envvar)
302 return NULL; 304 return NULL;
303 } 305 }
304 /* Do not unset this, as strange things might happen */ 306 /* Do not unset this, as strange things might happen */

Legend:
Removed from v.204  
changed lines
  Added in v.216

  ViewVC Help
Powered by ViewVC 1.1.20