------------------------------------------------------------
revno: 1615
fixes bug: https://launchpad.net/bugs/1277594
author: Adam Conrad <[email protected]>
committer: Dimitri John Ledkov <[email protected]>
branch nick: trunk
timestamp: Fri 2014-04-11 22:15:39 +0100
message:
Disable chroot sessions by default, add an option to enable chroot sessions.
modified:
init/main.c
init/session.c
scripts/init-checkconf.sh
test/test_util_common.c
--
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 'init/main.c'
--- init/main.c 2014-01-31 23:45:02 +0000
+++ init/main.c 2014-04-11 21:15:39 +0000
@@ -130,7 +130,7 @@
extern int no_inherit_env;
extern int user_mode;
-extern int disable_sessions;
+extern int chroot_sessions;
extern int disable_job_logging;
extern int use_session_bus;
extern int default_console;
@@ -164,8 +164,8 @@
{ 0, "no-log", N_("disable job logging"),
NULL, NULL, &disable_job_logging, NULL },
- { 0, "no-sessions", N_("disable chroot sessions"),
- NULL, NULL, &disable_sessions, NULL },
+ { 0, "chroot-sessions", N_("enable chroot sessions"),
+ NULL, NULL, &chroot_sessions, NULL },
{ 0, "no-startup-event", N_("do not emit any startup event (for testing)"),
NULL, NULL, &disable_startup_event, NULL },
@@ -696,8 +696,8 @@
control_notify_restarted();
}
- if (disable_sessions)
- nih_debug ("Chroot Sessions disabled");
+ if (chroot_sessions)
+ nih_debug ("Chroot Sessions enabled");
/* Set us as the child subreaper.
* This ensures that even when init doesn't run as PID 1, it'll always be
=== modified file 'init/session.c'
--- init/session.c 2013-07-19 22:54:24 +0000
+++ init/session.c 2014-04-11 21:15:39 +0000
@@ -66,12 +66,12 @@
NihList *sessions = NULL;
/**
- * disable_sessions:
+ * chroot_sessions:
*
- * If TRUE, disable chroot sessions, resulting in a
+ * If TRUE, enable chroot sessions, we default to a
* "traditional" (pre-session support) system.
**/
-int disable_sessions = FALSE;
+int chroot_sessions = FALSE;
/* Prototypes for static functions */
@@ -168,7 +168,7 @@
/* Handle explicit command-line request and alternative request
* method (primarily for test framework) to disable session support.
*/
- if (disable_sessions || getenv ("UPSTART_NO_SESSIONS"))
+ if (! chroot_sessions || getenv ("UPSTART_NO_SESSIONS"))
return NULL;
session_init ();
=== modified file 'scripts/init-checkconf.sh'
--- scripts/init-checkconf.sh 2013-11-18 20:14:05 +0000
+++ scripts/init-checkconf.sh 2014-04-11 21:15:39 +0000
@@ -204,7 +204,7 @@
debug "upstart_out=$upstart_out"
upstart_cmd=$(printf \
- "%s --user --no-dbus --no-sessions --no-startup-event --verbose --confdir %s" \
+ "%s --user --no-dbus --no-startup-event --verbose --confdir %s" \
"$upstart_path" \
"$confdir")
debug "upstart_cmd=$upstart_cmd"
=== modified file 'test/test_util_common.c'
--- test/test_util_common.c 2014-03-06 13:57:47 +0000
+++ test/test_util_common.c 2014-04-11 21:15:39 +0000
@@ -546,9 +546,6 @@
"--session"));
}
- NIH_MUST (nih_str_array_add (&args, NULL, NULL,
- "--no-sessions"));
-
if (! inherit_env) {
NIH_MUST (nih_str_array_add (&args, NULL, NULL,
"--no-inherit-env"));
--
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/upstart-devel