Skip to content

Commit

Permalink
Fix reversed args in mount call
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
hallyn authored and stgraber committed Jan 12, 2015
1 parent 1f76453 commit 88322f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lxc/conf.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 88322f7

Please sign in to comment.