wip: comment out primary gid exception
This commit is contained in:
parent
bd13e6a322
commit
4aee66fb11
@ -167,11 +167,14 @@ pub fn init(
|
||||
|
||||
for (groupmembers) |member_name| {
|
||||
if (name2user.get(member_name)) |user_idx| {
|
||||
|
||||
// if user is in a group of their primary gid,
|
||||
// skip the membersip.
|
||||
if (users.items(.gid)[user_idx] == groups.items(.gid)[i])
|
||||
continue;
|
||||
// If user is in a group of their primary gid,
|
||||
// skip the membersip. This is what classical tools do
|
||||
// (look at your etc/passwd), but not what Ours Truly
|
||||
// nss implementation does.
|
||||
// - Uncomment this code to behave how Classics behave.
|
||||
// - Leave commented to be compatible with Ours Truly NSS.
|
||||
//if (users.items(.gid)[user_idx] == groups.items(.gid)[i])
|
||||
// continue;
|
||||
members.len += 1;
|
||||
members[members.len - 1] = user_idx;
|
||||
try user2groups[user_idx].append(allocator, @intCast(u32, i));
|
||||
|
Loading…
Reference in New Issue
Block a user