Merge authors: James Hunt (jamesodhunt) Related merge proposals: https://code.launchpad.net/~jamesodhunt/upstart/upstart-no-inherit-env/+merge/148789 proposed by: James Hunt (jamesodhunt) review: Approve - Stéphane Graber (stgraber) ------------------------------------------------------------ revno: 1435 [merge] committer: James Hunt <[email protected]> branch nick: upstart timestamp: Mon 2013-02-25 09:42:11 +0000 message: * Merge of lp:~jamesodhunt/upstart/upstart-no-inherit-env. modified: ChangeLog init/job_process.c init/main.c init/man/init.8
-- lp:upstart https://code.launchpad.net/~upstart-devel/upstart/trunk Your team Upstart Reviewers is subscribed to branch lp:upstart. To unsubscribe from this branch go to https://code.launchpad.net/~upstart-devel/upstart/trunk/+edit-subscription
=== modified file 'ChangeLog' --- ChangeLog 2013-02-25 09:38:55 +0000 +++ ChangeLog 2013-02-25 09:42:11 +0000 @@ -17,6 +17,13 @@ * util/man/initctl.8: Updated on environment command semantics. * util/tests/test_initctl.c: test_global_and_local_job_env(): Modified test for new semantics. +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-14 James Hunt <[email protected]> === modified file 'init/job_process.c' --- init/job_process.c 2013-02-25 09:28:24 +0000 +++ init/job_process.c 2013-02-25 09:42:11 +0000 @@ -123,11 +123,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 */ @@ -282,7 +282,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-25 09:28:24 +0000 +++ init/main.c 2013-02-25 09:42:11 +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-25 09:28:24 +0000 +++ init/man/init.8 2013-02-25 09:42:11 +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
