From: =?UTF-8?q?=E6=9D=8E=E6=9E=97=E5=93=B2?= <lilinzhe@xxxxxxxxxxxx> Date: Wed, 6 Jan 2016 15:03:58 +0800 Subject: [PATCH] New module param allow_userns for allow unprivileged to mount under userns. Signed-off-by: Li LinZhe <lilinzhe@xxxxxxxxxxxx> --- fs/overlayfs/super.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index e38ee0f..35c79af 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -1102,8 +1102,13 @@ static struct file_system_type ovl_fs_type = { }; MODULE_ALIAS_FS("overlay"); +static bool ovl_userns; +MODULE_PARM_DESC(allow_userns, "allow unprivileged to mount under userns"); +module_param_named(allow_userns, ovl_userns, bool, S_IRUGO); + static int __init ovl_init(void) { + ovl_fs_type.fs_flags |= ovl_userns ? FS_USERNS_MOUNT : 0; return register_filesystem(&ovl_fs_type); } -- To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html