Skip to content

Commit b5bffa3

Browse files
committed
Fix driver procfs remount to work with unpatched kernels
1 parent ec15c72 commit b5bffa3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/nvc_mount.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ mount_procfs(struct error *err, const struct nvc_container *cnt)
168168
free(buf);
169169
buf = NULL;
170170
}
171-
if (xmount(err, NULL, path, NULL, MS_REMOUNT | MS_NODEV|MS_NOSUID|MS_NOEXEC, NULL) < 0)
171+
/* XXX Some kernels require MS_BIND in order to remount within a userns */
172+
if (xmount(err, NULL, path, NULL, MS_BIND|MS_REMOUNT | MS_NODEV|MS_NOSUID|MS_NOEXEC, NULL) < 0)
172173
goto fail;
173174
if ((mnt = xstrdup(err, path)) == NULL)
174175
goto fail;

0 commit comments

Comments
 (0)