5 Commits
Author SHA1 Message Date
Ada WorcesterandRich Felker daa29e894c update contributor name
This changes my name in the COPYRIGHT file, and adds a .mailmap entry
for my new name.
2019-12-07 12:21:35 -05:00
Josiah WorcesterandRich Felker 2894a44b40 add alternate backend support for getgrouplist
This completes the alternate backend support that was previously added
to the getpw* and getgr* functions. Unlike those, though, it
unconditionally queries nscd. Any groups from nscd that aren't in the
/etc/groups file are added to the returned list, and any that are
present in the file are ignored. The purpose of this behavior is to
provide a view of the group database consistent with what is observed
by the getgr* functions. If group memberships reported by nscd were
honored when the corresponding group already has a definition in the
/etc/groups file, the user's getgrouplist-based membership in the
group would conflict with their non-membership in the reported
gr_mem[] for the group.

The changes made also make getgrouplist thread-safe and eliminate its
clobbering of the global getgrent state.
2015-03-15 22:32:22 -04:00
Josiah WorcesterandRich Felker 34b423d207 support alternate backends for the passwd and group dbs
when we fail to find the entry in the commonly accepted files,  we
query a server over a Unix domain socket on /var/run/nscd/socket.
the protocol used here is compatible with glibc's nscd protocol on
most systems (all that use 32-bit numbers for all the protocol fields,
which appears to be everything but Alpha).
2015-02-23 01:02:14 -05:00
Josiah WorcesterandRich Felker 7c5f0a5212 refactor group file access code
this allows getgrnam and getgrgid to share code with the _r versions
in preparation for alternate backend support.
2015-02-13 01:46:51 -05:00
Josiah WorcesterandRich Felker 700e08993c refactor passwd file access code
this allows getpwnam and getpwuid to share code with the _r versions
in preparation for alternate backend support.
2015-02-10 22:57:02 -05:00