On 11/10/2015 05:56 PM, Andrey Ryabinin wrote:
On 11/10/2015 05:52 PM, Stanislav Kinsburskiy wrote:
           goto err;
+    if (get_exec_env()->init_cred)
+        root_user_ns = get_exec_env()->init_cred->user_ns;
+    else
+        root_user_ns = &init_user_ns;
+

We have some helper for this, if I'm not mistaken.
Probably this one:

current_user_ns_initial()

current_user_ns_initial() check if current user_ns is initial for current ve.
We need to check if file's user_ns is initial for current ve, so it doesn't fit 
here.

Stas, agree? Ack?


       if ((file->f_op != &fuse_dev_operations) ||
-        (file->f_cred->user_ns != &init_user_ns))
+        (file->f_cred->user_ns != root_user_ns))
           goto err_fput;
         fc = kmalloc(sizeof(*fc), GFP_KERNEL);


_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to