]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
specify mode whenever mounting tmpfs
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Fri, 31 Jan 2014 09:51:21 +0000 (09:51 +0000)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 31 Jan 2014 10:34:14 +0000 (10:34 +0000)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/cgmanager.c
src/lxc/conf.c

index f5d42ff0709499afd22b7529261263124e86e739..4241ca01cfc3e851e56f0d198d0447ca771109fe 100644 (file)
@@ -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;
        }
index 3c79a5ab8b8583e2b8d82f501248e60ce0c855d0..8b790a2fcfe4ce78831cc99a0034d5619f1c0007 100644 (file)
@@ -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;
        }