Skip to content

Commit 459c7c5

Browse files
author
Miklos Szeredi
committed
ovl: unprivieged mounts
Enable unprivileged user namespace mounts of overlayfs. Overlayfs's permission model (*) ensures that the mounter itself cannot gain additional privileges by the act of creating an overlayfs mount. This feature request is coming from the "rootless" container crowd. (*) Documentation/filesystems/overlayfs.txt#Permission model Signed-off-by: Miklos Szeredi <[email protected]>
1 parent 87b2c60 commit 459c7c5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/overlayfs/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2096,6 +2096,7 @@ static struct dentry *ovl_mount(struct file_system_type *fs_type, int flags,
20962096
static struct file_system_type ovl_fs_type = {
20972097
.owner = THIS_MODULE,
20982098
.name = "overlay",
2099+
.fs_flags = FS_USERNS_MOUNT,
20992100
.mount = ovl_mount,
21002101
.kill_sb = kill_anon_super,
21012102
};

0 commit comments

Comments
 (0)