diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-04-02 09:18:29 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-04-02 09:18:29 +0000 |
commit | 4eb6619c70e5db05babfa14abcf389236b73e0df (patch) | |
tree | 654166e85dfe14f4750c7eaabc8d5ae5f2444d38 /nis/nss_nis/nis-service.c | |
parent | 0fce307092e09edb96e0cd69733f1130ca826145 (diff) | |
download | glibc-4eb6619c70e5db05babfa14abcf389236b73e0df.zip glibc-4eb6619c70e5db05babfa14abcf389236b73e0df.tar.gz glibc-4eb6619c70e5db05babfa14abcf389236b73e0df.tar.bz2 |
Update.
2004-04-02 Jakub Jelinek <jakub@redhat.com>
* nis/nss: Add SERVICES_AUTHORITATIVE.
* nis/nss-nis.h (NSS_FLAG_SET, NSS_FLAG_NETID_AUTHORITATIVE,
NSS_FLAG_SERVICES_AUTHORITATIVE): Define.
(_nis_default_nss_flags, _nis_check_default_nss): New decls.
(_nis_default_nss): New inline.
* nis/nss-nis.c: Include ctype.h, stdio.h and stdio_ext.h.
(_nis_default_nss_flags, default_nss): New variables.
(_nis_check_default_nss): New function.
* nis/nss_nis/nis-initgroups.c: Don't include stdio.h and
stdio_ext.h.
(check_default_nss, default_nss): Move to nss-nis.c.
(init): Removed.
(_nss_nis_initgroups_dyn): Use _nis_default_nss ().
* nis/nss_nis/nis-services.c (_nss_nis_getservbyname_r): If
NSS_FLAG_SERVICES_AUTHORITATIVE and services.byservicename lookup
fails, return immediately.
Diffstat (limited to 'nis/nss_nis/nis-service.c')
-rw-r--r-- | nis/nss_nis/nis-service.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nis/nss_nis/nis-service.c b/nis/nss_nis/nis-service.c index 6e086e4..32ac619 100644 --- a/nis/nss_nis/nis-service.c +++ b/nis/nss_nis/nis-service.c @@ -330,6 +330,10 @@ _nss_nis_getservbyname_r (const char *name, const char *protocol, return NSS_STATUS_SUCCESS; } + /* Check if it is safe to rely on services.byservicename. */ + if (_nis_default_nss () & NSS_FLAG_SERVICES_AUTHORITATIVE) + return status; + struct ypall_callback ypcb; struct search_t req; |