about summary refs log tree commit diff
path: root/nis/nss-nis.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-04-02 09:18:29 +0000
committerUlrich Drepper <drepper@redhat.com>2004-04-02 09:18:29 +0000
commit4eb6619c70e5db05babfa14abcf389236b73e0df (patch)
tree654166e85dfe14f4750c7eaabc8d5ae5f2444d38 /nis/nss-nis.h
parent0fce307092e09edb96e0cd69733f1130ca826145 (diff)
downloadglibc-4eb6619c70e5db05babfa14abcf389236b73e0df.tar.gz
glibc-4eb6619c70e5db05babfa14abcf389236b73e0df.tar.xz
glibc-4eb6619c70e5db05babfa14abcf389236b73e0df.zip
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.h14
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 */