Small fixes
This commit is contained in:
@@ -5,3 +5,13 @@ static const struct ident kernel_identity = {0};
|
||||
const struct ident* ident_kernel() {
|
||||
return &kernel_identity;
|
||||
}
|
||||
|
||||
bool ident_in_group(const struct ident* identity, gid_t gid, bool use_real) {
|
||||
if (gid == (use_real ? identity->gid : identity->egid))
|
||||
return true;
|
||||
vec_foreach(&identity->groups, i) {
|
||||
if (vec_elem_get(&identity->groups, i) == gid)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user