[Devel] [PATCH v4 2/7] add user mismatch test

Glauber Costa glommer at parallels.com
Fri May 17 13:05:13 PDT 2013


On 05/17/2013 04:18 AM, Kir Kolyshkin wrote:
>> +        stat(res->fs.private, &private_stat);
>> +        if ((local_uid && (private_stat.st_uid != *local_uid)) ||
>> +            (local_gid && (private_stat.st_gid != *local_gid))) {
> 
> As I just commented at the very end of a previous patch,
> indeed it does make sense to check for local_uid and local_gid being
> not-NULL,
> since here you dereference both without checking (relying on
> can_join_userns
> which only checks local_uid but not local_gid).
> 
> So that comment was right (and taking it into account this code is
> correct).
Look again, we check both variables here.




More information about the Devel mailing list