Commit 642d1ccd by Stéphane Graber

lxc-start-ephemeral: Set tmpfs mode to 0755

The tmpfs was mounted with its default mode (1777) which was then picked up by overlayfs/aufs as the target's mode. This led to a world writable / in ephemeral containers. I have confirmed that this issue doesn't impact lxc-clone. Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 7bb87886
...@@ -219,7 +219,7 @@ LXC_NAME="%s" ...@@ -219,7 +219,7 @@ LXC_NAME="%s"
fd.write("mkdir -p %s %s\n" % (target, entry[1])) fd.write("mkdir -p %s %s\n" % (target, entry[1]))
if args.storage_type == "tmpfs": if args.storage_type == "tmpfs":
fd.write("mount -n -t tmpfs none %s\n" % (target)) fd.write("mount -n -t tmpfs -o mode=0755 none %s\n" % (target))
if args.union_type == "overlayfs": if args.union_type == "overlayfs":
fd.write("mount -n -t overlayfs" fd.write("mount -n -t overlayfs"
......
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