diff options
author | bushman <bushman@FreeBSD.org> | 2007-12-12 10:08:03 +0000 |
---|---|---|
committer | bushman <bushman@FreeBSD.org> | 2007-12-12 10:08:03 +0000 |
commit | b02556dae5c4b2e396b5bee2c663fe38f28d369b (patch) | |
tree | c40928e3eb8bab77c816a763945d3d4a10c59962 /include | |
parent | b52b3d4702084768bfb2db0f76743d7a3b993690 (diff) | |
download | FreeBSD-src-b02556dae5c4b2e396b5bee2c663fe38f28d369b.zip FreeBSD-src-b02556dae5c4b2e396b5bee2c663fe38f28d369b.tar.gz |
Implementing 'fallback' nsswitch source. 'fallback' source is used
when particular function can't be found in nsswitch-module. For
example, getgrouplist(3) will use module-supplied 'getgroupmembership'
function (which can work in an optimal way for such source as LDAP) and
will fall back to the stanard iterate-through-all-groups implementation
otherwise.
PR: ports/114655
Submitted by: Michael Hanselmann <freebsd AT hansmi DOT ch>
Reviewed by: brooks (mentor)
Diffstat (limited to 'include')
-rw-r--r-- | include/nsswitch.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/nsswitch.h b/include/nsswitch.h index 5e7ee0c..9069ac1 100644 --- a/include/nsswitch.h +++ b/include/nsswitch.h @@ -68,7 +68,8 @@ #define NSSRC_DNS "dns" /* DNS; IN for hosts, HS for others */ #define NSSRC_NIS "nis" /* YP/NIS */ #define NSSRC_COMPAT "compat" /* passwd,group in YP compat mode */ -#define NSSRC_CACHE "cache" /* cache daemon */ +#define NSSRC_CACHE "cache" /* nscd daemon */ +#define NSSRC_FALLBACK "__fallback" /* internal fallback source */ /* * currently implemented databases @@ -132,6 +133,7 @@ typedef struct _ns_dtab { */ #define NS_FILES_CB(F,C) { NSSRC_FILES, F, C }, #define NS_COMPAT_CB(F,C) { NSSRC_COMPAT, F, C }, +#define NS_FALLBACK_CB(F) { NSSRC_FALLBACK, F, NULL }, #ifdef HESIOD # define NS_DNS_CB(F,C) { NSSRC_DNS, F, C }, |