[Devel] [PATCH RHEL7 COMMIT] ve/fs/overlay: allow overlayfs to be mounted in non-root userns

Konstantin Khorenko khorenko at virtuozzo.com
Thu Jun 28 12:40:47 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-862.3.2.vz7.61.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.3.2.vz7.61.6
------>
commit f58198e6c6fadad75584cee41e1377af5d68b3c3
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Thu Jun 28 12:36:15 2018 +0300

    ve/fs/overlay: allow overlayfs to be mounted in non-root userns
    
    We need overlayfs to be mounted inside Container and RHEL7.5 requires a
    special flag to be set on fs which are allowed to be mounted inside
    non-root user namespaces.
    
    Fixes: e381a0e538de ve/fs/overlay: allow overlayfs to be used inside a Container
    https://jira.sw.ru/browse/PSBM-86153
    
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 fs/overlayfs/super.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index c9ec521bb7e9..61788949f955 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -1260,7 +1260,8 @@ static struct file_system_type ovl_fs_type = {
 	.name		= "overlay",
 	.mount		= ovl_mount,
 	.kill_sb	= kill_anon_super,
-	.fs_flags	= FS_HAS_DOPS_WRAPPER | FS_VIRTUALIZED,
+	.fs_flags	= FS_HAS_DOPS_WRAPPER |
+			  FS_VIRTUALIZED | FS_USERNS_MOUNT,
 };
 MODULE_ALIAS_FS("overlay");
 


More information about the Devel mailing list