Commit 58ab99ae by Serge Hallyn Committed by Stéphane Graber

specify mode whenever mounting tmpfs

parent ecfcb3f0
...@@ -697,7 +697,7 @@ static bool cgm_bind_dir(const char *root, const char *dirname) ...@@ -697,7 +697,7 @@ static bool cgm_bind_dir(const char *root, const char *dirname)
} }
/* mount a tmpfs there so we can create subdirs */ /* 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); SYSERROR("Failed to mount tmpfs at %s", cgpath);
return false; return false;
} }
......
...@@ -1321,7 +1321,7 @@ static int mount_autodev(const char *name, char *root, const char *lxcpath) ...@@ -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 */ /* Only mount a tmpfs on here if we don't already a mount */
if ( ! mount_check_fs( host_path, NULL ) ) { if ( ! mount_check_fs( host_path, NULL ) ) {
DEBUG("Mounting tmpfs to %s", host_path ); 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 { } else {
/* This allows someone to manually set up a mount */ /* This allows someone to manually set up a mount */
DEBUG("Bind mounting %s to %s", host_path, path ); DEBUG("Bind mounting %s to %s", host_path, path );
...@@ -1471,7 +1471,7 @@ static int chroot_into_slave(struct lxc_conf *conf) ...@@ -1471,7 +1471,7 @@ static int chroot_into_slave(struct lxc_conf *conf)
SYSERROR("failed to make %s slave", destpath); SYSERROR("failed to make %s slave", destpath);
return -1; 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); SYSERROR("Failed to mount tmpfs / at %s", destpath);
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment