diff options
author | Steve Ellcey <sellcey@caviumnetworks.com> | 2017-09-12 10:21:48 -0700 |
---|---|---|
committer | Steve Ellcey <sellcey@caviumnetworks.com> | 2017-09-12 10:21:48 -0700 |
commit | a1a78204162561872634d517b82e8a865c7058cc (patch) | |
tree | 82117b8f03ae93b25407f745a047202496ca5c50 /nscd | |
parent | ef8adeb0416309082c41a1518caee6961b5c42e8 (diff) | |
download | glibc-a1a78204162561872634d517b82e8a865c7058cc.zip glibc-a1a78204162561872634d517b82e8a865c7058cc.tar.gz glibc-a1a78204162561872634d517b82e8a865c7058cc.tar.bz2 |
Remove compat from DEFAULT_CONFIG lookup strings
* grp/initgroups.c: Include config.h.
(DEFAULT_CONFIG): New macro.
(internal_getgrouplist): Use DEFAULT_CONFIG.
* nscd/initgrcache.c (addinitgroupsX): Likewise.
* nss/nsswitch.c (__nss_disable_nscd): Likewise.
(DEFAULT_DEFCONFIG): New macro.
(__nss_database_lookup): Use DEFAULT_DEFCONFIG.
* nss/grp-lookup.c: Include config.h
(DEFAULT_CONFIG): Set definition based on LINK_OBSOLETE_NSL.
* nss/pwd-lookup.c (DEFAULT_CONFIG): Likewise.
* nss/spwd-lookup.c (DEFAULT_CONFIG): Likewise.
* manual/nss.texi: Update default values section.
Diffstat (limited to 'nscd')
-rw-r--r-- | nscd/initgrcache.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c index 4deb483..4114fbe 100644 --- a/nscd/initgrcache.c +++ b/nscd/initgrcache.c @@ -25,6 +25,7 @@ #include <unistd.h> #include <sys/mman.h> #include <scratch_buffer.h> +#include <config.h> #include "dbg_log.h" #include "nscd.h" @@ -34,6 +35,11 @@ #include "../nss/nsswitch.h" +#ifdef LINK_OBSOLETE_NSL +# define DEFAULT_CONFIG "compat [NOTFOUND=return] files" +#else +# define DEFAULT_CONFIG "files" +#endif /* Type of the lookup function. */ typedef enum nss_status (*initgroups_dyn_function) (const char *, gid_t, @@ -85,8 +91,7 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req, int no_more; if (group_database == NULL) - no_more = __nss_database_lookup ("group", NULL, - "compat [NOTFOUND=return] files", + no_more = __nss_database_lookup ("group", NULL, DEFAULT_CONFIG, &group_database); else no_more = 0; |