]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Fix reversed args in mount call
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Fri, 9 Jan 2015 22:00:28 +0000 (22:00 +0000)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 12 Jan 2015 21:26:08 +0000 (16:26 -0500)
Riya Khanna reported that with a ramfs rootfs the mount to make
/ rprivate was returning -EFAULT.  NULL was being passed as the
mount target.  Pass "/" instead.

Reported-by: riya khanna <riyakhanna1983@gmail.com>>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/conf.c

index 72181dd520ce4b0a98823ba121f4679a10c0bff5..9072002791027dcc5afa33fb0a03dc2d5354c1e4 100644 (file)
@@ -1513,7 +1513,7 @@ int prepare_ramfs_root(char *root)
                return -1;
        }
 
-       if (mount(".", NULL, NULL, MS_REC | MS_PRIVATE, NULL)) {
+       if (mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, NULL)) {
                SYSERROR("Failed to make . rprivate");
                return -1;
        }