diff options
author | markj <markj@FreeBSD.org> | 2016-06-09 01:28:44 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2016-06-09 01:28:44 +0000 |
commit | 5c6d3bcb516d18ccab879407ec43fc68043a671d (patch) | |
tree | d498c6e46ef77df56afb1b96cea94d669b9424d2 /include/netdb.h | |
parent | a7caa41829f894b5b21f9a9483f17d3f1c6a3cf9 (diff) | |
download | FreeBSD-src-5c6d3bcb516d18ccab879407ec43fc68043a671d.zip FreeBSD-src-5c6d3bcb516d18ccab879407ec43fc68043a671d.tar.gz |
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
Diffstat (limited to 'include/netdb.h')
-rw-r--r-- | include/netdb.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/netdb.h b/include/netdb.h index 3fa5ff3..0d9cb4e 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -275,6 +275,7 @@ int getnetbyname_r(const char *, struct netent *, char *, size_t, int getnetent_r(struct netent *, char *, size_t, struct netent **, int *); int getnetgrent(char **, char **, char **); +int getnetgrent_r(char **, char **, char **, char *, size_t); int getprotobyname_r(const char *, struct protoent *, char *, size_t, struct protoent **); int getprotobynumber_r(int, struct protoent *, char *, size_t, |