[Devel] [PATCH rh7] fuse: allow to mount fuse filesystems inside CT

Andrey Ryabinin aryabinin at virtuozzo.com
Tue Nov 10 06:56:26 PST 2015


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.

 


> 
>>       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);
> 


More information about the Devel mailing list