James Hunt has proposed merging lp:~jamesodhunt/upstart/upstart-no-inherit-env into lp:upstart.
Requested reviews: Upstart Reviewers (upstart-reviewers) For more details, see: https://code.launchpad.net/~jamesodhunt/upstart/upstart-no-inherit-env/+merge/148789 Changed '--inherit-env' to '--no-inherit-env' and made inheriting inits environment the default for Session Inits. Retaining --no-inherit-env is useful for testing purposes. -- https://code.launchpad.net/~jamesodhunt/upstart/upstart-no-inherit-env/+merge/148789 Your team Upstart Reviewers is requested to review the proposed merge of lp:~jamesodhunt/upstart/upstart-no-inherit-env into lp:upstart.
=== modified file 'ChangeLog' --- ChangeLog 2013-02-08 16:55:25 +0000 +++ ChangeLog 2013-02-15 18:55:26 +0000 @@ -1,3 +1,11 @@ +2013-02-15 James Hunt <[email protected]> + + * init/job_process.c: job_process_run(): Invert meaning. + * init/main.c: Change '--inherit-env' to '--no-inherit-env' + such that inheriting inits environment is now the default + for Session Inits. + * init/man/init.8: Update for '--no-inherit-env'. + 2013-02-08 James Hunt <[email protected]> * init/job_process.c: job_process_run(): Copy parent environment if === modified file 'init/job_process.c' --- init/job_process.c 2013-02-14 02:54:10 +0000 +++ init/job_process.c 2013-02-15 18:55:26 +0000 @@ -116,11 +116,11 @@ int disable_job_logging = 0; /** - * inherit_env: + * no_inherit_env: * - * If TRUE, copy init's environment to that provided to jobs. + * If TRUE, do not copy the Session Inits environment to that provided to jobs. **/ -int inherit_env = FALSE; +int no_inherit_env = FALSE; /* Prototypes for static functions */ @@ -273,7 +273,7 @@ envc = 0; env = NIH_MUST (nih_str_array_new (NULL)); - if (user_mode && inherit_env) + if (user_mode && ! no_inherit_env) NIH_MUST(environ_append (&env, NULL, &envc, TRUE, environ)); if (job->env) === modified file 'init/main.c' --- init/main.c 2013-02-14 13:36:06 +0000 +++ init/main.c 2013-02-15 18:55:26 +0000 @@ -120,7 +120,7 @@ **/ static int disable_startup_event = FALSE; -extern int inherit_env; +extern int no_inherit_env; extern int user_mode; extern int disable_sessions; extern int disable_job_logging; @@ -141,8 +141,8 @@ { 0, "default-console", N_("default value for console stanza"), NULL, "VALUE", NULL, console_type_setter }, - { 0, "inherit-env", N_("jobs will inherit environment of init"), - NULL, NULL, &inherit_env ,NULL }, + { 0, "no-inherit-env", N_("jobs will not inherit environment of init"), + NULL, NULL, &no_inherit_env ,NULL }, { 0, "logdir", N_("specify alternative directory to store job output logs in"), NULL, "DIR", &log_dir, NULL }, === modified file 'init/man/init.8' --- init/man/init.8 2013-02-08 16:55:25 +0000 +++ init/man/init.8 2013-02-15 18:55:26 +0000 @@ -81,9 +81,9 @@ .BR console "." .\" .TP -.B \-\-inherit\-env -Make jobs inherit the initial environment. Impotent when running as -process id 1. +.B \-\-no\-inherit\-env +Stop jobs from inheriting the initial environment. Only meaningful when +running in user mode. .\" .TP .B \-\-logdir \fIdirectory\fP @@ -102,7 +102,7 @@ .\" .TP .B \-\-no\-sessions -Disable user and chroot sessions. +Disable chroot sessions. .\" .TP .B \-\-no\-startup\-event
-- upstart-devel mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/upstart-devel
