Small fixes

This commit is contained in:
2026-10-18 21:20:50 +02:00
parent 32f1ff25f7
commit 692d67e3cf
10 changed files with 46 additions and 4 deletions
+10
View File
@@ -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;
}