Skip is_uid_include_group when GID available (#2292)
This can avoid an expensive computation which is 20% of test runtime.
This commit is contained in:
parent
ee49ca4abf
commit
82107f4b6c
|
@ -819,8 +819,7 @@ static int check_object_access(const char* path, int mask, struct stat* pstbuf)
|
|||
}
|
||||
if(pcxt->gid == obj_gid){
|
||||
base_mask |= S_IRWXG;
|
||||
}
|
||||
if(1 == is_uid_include_group(pcxt->uid, obj_gid)){
|
||||
} else if(1 == is_uid_include_group(pcxt->uid, obj_gid)){
|
||||
base_mask |= S_IRWXG;
|
||||
}
|
||||
mode &= base_mask;
|
||||
|
|
Loading…
Reference in New Issue