From: Miklos Szeredi Date: Mon, 14 Dec 2020 14:26:14 +0000 (+0100) Subject: ovl: unprivieged mounts X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=459c7c565ac36ba09ffbf24231147f408fde4203;p=linux.git 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 --- diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 6366adf81fa31..2bd570cbe8a45 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -2096,6 +2096,7 @@ static struct dentry *ovl_mount(struct file_system_type *fs_type, int flags, static struct file_system_type ovl_fs_type = { .owner = THIS_MODULE, .name = "overlay", + .fs_flags = FS_USERNS_MOUNT, .mount = ovl_mount, .kill_sb = kill_anon_super, };