]> git.ipfire.org Git - thirdparty/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:33:25 +0000 (16:33 -0400)
Signed-off-by: Przemek Rudy <prudy1@o2.pl>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/conf.c

index ecbf24266ded56782df4edce43168d5af751292e..e3eaf15c8617d41257367198f96c50254933b5fc 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) {