Merge authors:
Stéphane Graber (stgraber)
Related merge proposals:
https://code.launchpad.net/~stgraber/upstart/upstart-user-cwd/+merge/147468
proposed by: Stéphane Graber (stgraber)
review: Approve - James Hunt (jamesodhunt)
------------------------------------------------------------
revno: 1430 [merge]
committer: James Hunt <[email protected]>
branch nick: upstart
timestamp: Mon 2013-02-11 08:50:24 +0000
message:
* Merge of lp:~stgraber/upstart/upstart-user-cwd.
modified:
init/job_process.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/job_process.c'
--- init/job_process.c 2013-02-11 03:28:25 +0000
+++ init/job_process.c 2013-02-11 08:50:24 +0000
@@ -776,9 +776,11 @@
* configured in the job, or to the root directory of the filesystem
* (or at least relative to the chroot).
*/
- if (chdir (class->chdir ? class->chdir : "/") < 0) {
- nih_error_raise_system ();
- job_process_error_abort (fds[1], JOB_PROCESS_ERROR_CHDIR, 0);
+ if (class->chdir || user_mode == FALSE) {
+ if (chdir (class->chdir ? class->chdir : "/") < 0) {
+ nih_error_raise_system ();
+ job_process_error_abort (fds[1], JOB_PROCESS_ERROR_CHDIR, 0);
+ }
}
/* Change the user and group of the process to the one
--
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/upstart-devel