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: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
fd.write("mkdir -p %s %s\n" % (target, entry[1]))
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":
fd.write("mount -n -t overlayfs"