]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Prevent from error on umount /proc if userns are used.
authorPrzemek Rudy <prudy1@o2.pl>
Wed, 29 Jul 2015 17:41:28 +0000 (19:41 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 13 Aug 2015 20:23:59 +0000 (16:23 -0400)
Signed-off-by: Przemek Rudy <prudy1@o2.pl>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/conf.c

index 9870455b3caeccb7470b822d995a74f46893ff79..e6e2a4a2a5287cd7979005f9086f5800572e3572 100644 (file)
@@ -1368,10 +1368,8 @@ int prepare_ramfs_root(char *root)
                        break;
        }
 
-       if (umount2("./proc", MNT_DETACH)) {
-               SYSERROR("Unable to umount /proc");
-               return -1;
-       }
+       /* This also can be skipped if a container uses unserns */
+       umount2("./proc", MNT_DETACH);
 
        /* It is weird, but chdir("..") moves us in a new root */
        if (chdir("..") == -1) {