]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Implement an NSS backend for netgroups and add getnetgrent_r(3).
authormarkj <markj@FreeBSD.org>
Thu, 9 Jun 2016 01:28:44 +0000 (01:28 +0000)
committermarkj <markj@FreeBSD.org>
Thu, 9 Jun 2016 01:28:44 +0000 (01:28 +0000)
commit5c6d3bcb516d18ccab879407ec43fc68043a671d
treed498c6e46ef77df56afb1b96cea94d669b9424d2
parenta7caa41829f894b5b21f9a9483f17d3f1c6a3cf9
Implement an NSS backend for netgroups and add getnetgrent_r(3).

This support appears to have been documented in nsswitch.conf(5) for some
time. The implementation adds two NSS netgroup providers to libc. The
default, compat, provides the behaviour documented in netgroup(5), so this
change does not make any user-visible behaviour changes. A files provider
is also implemented.

innetgr(3) is implemented as an optional NSS method so that providers such
as NIS which are able to implement efficient reverse lookup can do so.
A fallback implementation is used otherwise. getnetgrent_r(3) is added for
convenience and to provide compatibility with glibc and Solaris.

With a small patch to net/nss_ldap, it's possible to specify an ldap
netgroup provider, allowing one to query nisNetgroupTriple entries.

Sponsored by: EMC / Isilon Storage Division
etc/nsswitch.conf
include/netdb.h
lib/libc/gen/Symbol.map
lib/libc/gen/getnetgrent.3
lib/libc/gen/getnetgrent.c
share/man/man5/nsswitch.conf.5