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.h | |
parent | 0fce307092e09edb96e0cd69733f1130ca826145 (diff) | |
download | glibc-4eb6619c70e5db05babfa14abcf389236b73e0df.tar.gz |
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.h')
-rw-r--r-- | nis/nss-nis.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/nis/nss-nis.h b/nis/nss-nis.h index 47b0a67ac8..659b3a14aa 100644 --- a/nis/nss-nis.h +++ b/nis/nss-nis.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -36,4 +36,16 @@ yperr2nss (int errval) return __yperr2nss_tab[(unsigned int) errval]; } +#define NSS_FLAG_SET 1 +#define NSS_FLAG_NETID_AUTHORITATIVE 2 +#define NSS_FLAG_SERVICES_AUTHORITATIVE 4 +extern int _nis_default_nss_flags attribute_hidden; +extern int _nis_check_default_nss (void) attribute_hidden; + +extern inline __attribute__((always_inline)) int +_nis_default_nss (void) +{ + return _nis_default_nss_flags ?: _nis_check_default_nss (); +} + #endif /* nis/nss-nis.h */ |