From: Serge Hallyn Date: Fri, 31 Jan 2014 09:51:21 +0000 (+0000) Subject: specify mode whenever mounting tmpfs X-Git-Tag: lxc-1.0.0.beta4~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58ab99ae4b96d5d63f607d178f9490d631c9c921;p=thirdparty%2Flxc.git specify mode whenever mounting tmpfs Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber --- diff --git a/src/lxc/cgmanager.c b/src/lxc/cgmanager.c index f5d42ff07..4241ca01c 100644 --- a/src/lxc/cgmanager.c +++ b/src/lxc/cgmanager.c @@ -697,7 +697,7 @@ static bool cgm_bind_dir(const char *root, const char *dirname) } /* mount a tmpfs there so we can create subdirs */ - if (mount("cgroup", cgpath, "tmpfs", 0, "size=10000")) { + if (mount("cgroup", cgpath, "tmpfs", 0, "size=10000,mode=755")) { SYSERROR("Failed to mount tmpfs at %s", cgpath); return false; } diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 3c79a5ab8..8b790a2fc 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1321,7 +1321,7 @@ static int mount_autodev(const char *name, char *root, const char *lxcpath) /* Only mount a tmpfs on here if we don't already a mount */ if ( ! mount_check_fs( host_path, NULL ) ) { DEBUG("Mounting tmpfs to %s", host_path ); - ret = mount("none", path, "tmpfs", 0, "size=100000"); + ret = mount("none", path, "tmpfs", 0, "size=100000,mode=755"); } else { /* This allows someone to manually set up a mount */ DEBUG("Bind mounting %s to %s", host_path, path ); @@ -1471,7 +1471,7 @@ static int chroot_into_slave(struct lxc_conf *conf) SYSERROR("failed to make %s slave", destpath); return -1; } - if (mount("none", destpath, "tmpfs", 0, "size=10000")) { + if (mount("none", destpath, "tmpfs", 0, "size=10000,mode=755")) { SYSERROR("Failed to mount tmpfs / at %s", destpath); return -1; }