lp:~jamesodhunt/upstart/init--inherit-env
- Get this branch:
- bzr branch lp:~jamesodhunt/upstart/init--inherit-env
Branch merges
- Upstart Reviewers: Pending requested
-
Diff: 82 lines (+27/-1)4 files modifiedChangeLog (+7/-0)
init/job_process.c (+5/-1)
init/main.c (+10/-0)
init/man/init.8 (+5/-0)
Branch information
Recent revisions
- 1428. By James Hunt
-
* init/job_process.c: job_process_run(): Copy parent environment if
inherit_env in operation for a Session Init.
* init/main.c: Added 'inherit-env' command-line option.
* init/man/init.8: Documented --inherit-env. - 1426. By James Hunt
-
* init/control.c:
- Use control_check_permissio n() rather than
control_get_origin_ uid() directly.
* init/control.h: Prototypes.
* init/job_class.c: Change calls to job_class_environment_ init()
to asserts as the former only needs to be called once.
* init/main.c: main(): Make job_class_environment_ init() call as
early as possible.
* init/tests/test_event. c: main(): Call
job_class_environment_ init().
* util/tests/test_initctl. c:
- test_default_job_env( ):
- Set TERM and PATH if not set.
- Check line counts before checking expected output.
- test_clear_job_env( ):
- Make use of TEST_INITCTL_DEFAULT_ PATH. - 1425. By James Hunt
-
* Sync with lp:upstart and resolve test issues relating to new session
code. In so doing, the revised test suite found 3 bugs which are now
fixed:- control_
get_session( ): We now actually pass @session as a parameter.
- job_class_find(): Initialise class to avoid undefined behaviour.
undefined behaviour.
- get_env_action(): Wasn't passing job+instance details to init. - 1424. By James Hunt
-
* util/Makefile.am: Define INITCTL_BINARY and UPSTART_BINARY to ensure
full path available to tests.
* util/tests/test_initctl. c:
- New macros:
- _TEST_STR_ARRAY_CONTAINS( )
- TEST_STR_ARRAY_CONTAINS( )
- TEST_STR_ARRAY_NOT_ CONTAINS( )
- _TEST_FILE_CONTAINS( )
- TEST_FILE_CONTAINS( )
- TEST_FILE_NOT_CONTAINS( )
- get_initctl(): Function to replace original INITCTL_BINARY define.
- test_global_and_local_ job_env( ): New function to test initctl
'--global', '--job' and '--instance' options from within and without
a job. - 1423. By James Hunt
-
* util/initctl.c:
- get_job_details(): Fix order in which arguments are checked. - 1422. By James Hunt
-
* init/control.c:
- control_get_env(): Allow PID 1 environment to be queried for
consistency with control_list_env().
* init/man/initctl.8:
- Added --job, --instance, --global options for list-env, set-env,
get-env, unset-env, reset-env.
- Explain PID 1 limitation for set-env, unset-env, reset-env. - 1421. By James Hunt
-
* dbus/com.
ubuntu. Upstart. xml:
- Added 'job_details' string array as first parameter for GetEnv,
SetEnv, UnsetEnv, ListEnv and ResetEnv to allow methods to either
act globally or on a specific job environment.
* init/control.c:
- control_set_env():
- control_unset_env( ):
- control_get_env():
- control_list_env():
- control_reset_env( ):
- Disallow setting for PID 1.
- Operate globally or on specified job.
* init/control.h: control_get_job(): Macro to simplify extracting job
from provided job details.
* init/job.c: job_find(): New function.
* init/job_class.c:
- job_class_environment_ set(): Delimiter handling now moved to
control_set_env( ) so it can be shared by job and global logic.
- job_class_find(): New function.
* init/state.c:
- Removed state_get_job() and replaced calls with job_find().
* util/initctl.c:
- Updated *_action() functions for new D-Bus parameters and made use
of new function get_job_details(). - 1420. By James Hunt
-
* Merge of lp:~jamesodhunt/upstart/remove-basic-user-sessions.
(Note: won't compile due to dependency of commit about to be applied). - 1419. By James Hunt
-
* util/initctl.c:
- Grouped all environment commands in usage output.
- Added --global, --job and --instance options for all environment
commands. These are currently dummies, but --global will soon be
required to make changes to the global job environment table when
initctl is invoked from within a job.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:upstart