Merge authors: Steve Langasek (vorlon) Related merge proposals: https://code.launchpad.net/~vorlon/upstart/lp.1244763/+merge/192739 proposed by: Steve Langasek (vorlon) review: Approve - Dmitrijs Ledkovs (xnox) review: Approve - Adam Conrad (adconrad) ------------------------------------------------------------ revno: 1553 [merge] committer: Dmitrijs Ledkovs <[email protected]> branch nick: upstart timestamp: Sun 2013-11-03 02:56:57 +0000 message: merge lp:~vorlon/upstart/lp.1244763 modified: ChangeLog init/main.c init/system.c init/system.h
-- 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-11-03 02:54:03 +0000 +++ ChangeLog 2013-11-03 02:56:57 +0000 @@ -1,3 +1,10 @@ +2013-10-25 Steve Langasek <[email protected]> + + * init/main.c, init/system.c, init/system.h: allow mount options + to be passed to system_mount(), and pass the right options when + mounting /dev/pts to match the permissions set by either + initramfs-tools or mountall. LP: #1244763. + 2013-11-03 James Hunt <[email protected]> * init/job_class.c: === modified file 'init/main.c' --- init/main.c 2013-10-18 09:13:36 +0000 +++ init/main.c 2013-11-03 02:56:57 +0000 @@ -280,7 +280,8 @@ needs_devtmpfs = 1; if (needs_devtmpfs) { - if (system_mount ("devtmpfs", "/dev", (MS_NOEXEC | MS_NOSUID)) < 0) { + if (system_mount ("devtmpfs", "/dev", + MS_NOEXEC | MS_NOSUID, NULL) < 0) { NihError *err; err = nih_error_get (); @@ -296,7 +297,8 @@ nih_error ("%s: %s", _("Cannot create directory"), "/dev/pts"); } - if (system_mount ("devpts", "/dev/pts", (MS_NOEXEC | MS_NOSUID)) < 0) { + if (system_mount ("devpts", "/dev/pts", MS_NOEXEC | MS_NOSUID, + "gid=5,mode=0620") < 0) { NihError *err; err = nih_error_get (); @@ -356,7 +358,8 @@ * ourselves. Also mount /dev/pts to allow CONSOLE_LOG * to function if booted in an initramfs-less environment. */ - if (system_mount ("proc", "/proc", (MS_NODEV | MS_NOEXEC | MS_NOSUID)) < 0) { + if (system_mount ("proc", "/proc", + MS_NODEV | MS_NOEXEC | MS_NOSUID, NULL) < 0) { NihError *err; err = nih_error_get (); @@ -365,7 +368,8 @@ nih_free (err); } - if (system_mount ("sysfs", "/sys", (MS_NODEV | MS_NOEXEC | MS_NOSUID)) < 0) { + if (system_mount ("sysfs", "/sys", + MS_NODEV | MS_NOEXEC | MS_NOSUID, NULL) < 0) { NihError *err; err = nih_error_get (); === modified file 'init/system.c' --- init/system.c 2012-08-03 15:47:59 +0000 +++ init/system.c 2013-10-25 19:11:25 +0000 @@ -165,21 +165,20 @@ * system_mount: * @type: filesystem type, * @dir: mountpoint, - * @flags: mount flags. - * - * Mount the kernel filesystem @type at @dir with @flags, if not already mounted. This - * is used to ensure that the proc and sysfs filesystems are always - * available. - * - * Filesystems are always mounted with the MS_NODEV, MS_NOEXEC and MS_NOSUID - * mount options, which are sensible for /proc and /sys. + * @flags: mount flags, + * @options: mount options. + * + * Mount the kernel filesystem @type at @dir with @flags and mount options + * @options, if not already mounted. This is used to ensure that the proc + * and sysfs filesystems are always available. * * Returns: zero on success, negative value on raised error. **/ int system_mount (const char *type, const char *dir, - unsigned long flags) + unsigned long flags, + const char *options) { nih_local char *parent = NULL; char * ptr; @@ -208,7 +207,7 @@ return 0; /* Mount the filesystem */ - if (mount ("none", dir, type, flags, NULL) < 0) + if (mount ("none", dir, type, flags, options) < 0) nih_return_system_error (-1); return 0; === modified file 'init/system.h' --- init/system.h 2012-08-03 15:47:59 +0000 +++ init/system.h 2013-10-25 19:11:25 +0000 @@ -36,7 +36,7 @@ __attribute__ ((warn_unused_result)); int system_mount (const char *type, const char *dir, - unsigned long flags) + unsigned long flags, const char *options) __attribute__ ((warn_unused_result)); void system_mknod (const char *path, mode_t mode, dev_t dev);
-- upstart-devel mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/upstart-devel
