[Devel] [PATCH] fuse: allow to mount if process is in init_user_ns

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Fri Jun 9 16:09:49 MSK 2017


Regardless its current VE.

https://jira.sw.ru/browse/PSBM-67185

Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 fs/fuse/inode.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 090a7ab..a8d7924 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -1211,7 +1211,8 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
 		goto err;
 
 	if ((file->f_op != &fuse_dev_operations) ||
-	    (file->f_cred->user_ns != ve_init_user_ns()))
+	    ((file->f_cred->user_ns != &init_user_ns) &&
+	     (file->f_cred->user_ns != ve_init_user_ns())))
 		goto err_fput;
 
 	fc = kmalloc(sizeof(*fc), GFP_KERNEL);



More information about the Devel mailing list