]> 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>
Fri, 30 Jan 2015 08:56:28 +0000 (09:56 +0100)
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 6450c5ef4d0674886d0f0dd885d577a215f8d9f3..65eeee4922fd13bad8294eaeab9ded09a1735b37 100644 (file)
@@ -1646,7 +1646,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;
        }