https://bugzilla.mindrot.org/show_bug.cgi?id=3903
Bug ID: 3903
Summary: process_extended_get_users_groups_by_id counts groups
wrong
Product: Portable OpenSSH
Version: 10.2p1
Hardware: All
OS: All
Status: NEW
Severity: trivial
Priority: P5
Component: sftp-server
Assignee: [email protected]
Reporter: [email protected]
In process_extended_get_users_groups_by_id:
while (sshbuf_len(gids) != 0) {
if ((r = sshbuf_get_u32(gids, &n)) != 0)
fatal_fr(r, "parse inner gid");
gr = getgrgid((gid_t)n);
name = gr == NULL ? "" : gr->gr_name;
debug3_f("gid %u => \"%s\"", n, name);
if ((r = sshbuf_put_cstring(groupnames, name)) != 0)
fatal_fr(r, "assemble gid reply");
nusers++;
}
That should be "ngroups++" not "nusers++", which appears to be a
copy/paste error from the above block that counts users. This means it
counts groups as users, and always reports 0 groups. I don't believe
this has any impact other than the verbose debug line.
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
[email protected]
https://lists.mindrot.org/mailman/listinfo/openssh-bugs