about summary refs log tree commit diff
path: root/nis
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-03-30 18:34:08 +0000
committerUlrich Drepper <drepper@redhat.com>2004-03-30 18:34:08 +0000
commite98fb1a6172fe54007525523f7a6cb88478d492c (patch)
tree5e5d7e13b78eb1f6aff0505af02ebdb8de127a37 /nis
parentff0913d3a334d61b20f8e91fdee7ac87ff03aa15 (diff)
downloadglibc-e98fb1a6172fe54007525523f7a6cb88478d492c.tar.gz
glibc-e98fb1a6172fe54007525523f7a6cb88478d492c.tar.xz
glibc-e98fb1a6172fe54007525523f7a6cb88478d492c.zip
Update.
	* nis/Makefile (distribute): Add nss.
	* nis/nss: New file.
Diffstat (limited to 'nis')
-rw-r--r--nis/Makefile4
-rw-r--r--nis/nss12
-rw-r--r--nis/nss_nis/nis-initgroups.c4
3 files changed, 18 insertions, 2 deletions
diff --git a/nis/Makefile b/nis/Makefile
index df85ab2774..9f429ffc65 100644
--- a/nis/Makefile
+++ b/nis/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 2001, 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
@@ -23,7 +23,7 @@ subdir	:= nis
 
 headers			:= $(wildcard rpcsvc/*.[hx])
 distribute		:= nss-nis.h nss-nisplus.h nis_intern.h Banner \
-			nisplus-parser.h nis_xdr.h
+			   nisplus-parser.h nis_xdr.h nss
 
 # These are the databases available for the nis (and perhaps later nisplus)
 # service.  This must be a superset of the services in nss.
diff --git a/nis/nss b/nis/nss
new file mode 100644
index 0000000000..338ace50ae
--- /dev/null
+++ b/nis/nss
@@ -0,0 +1,12 @@
+# /etc/default/nss
+# This file can theoretically contain a bunch of customization variables
+# for Name Service Switch in the GNU C library.  For now there is only one
+# variable:
+#
+# NETID_AUTHORITATIVE
+#   If set to TRUE the initgroups() function will accept the information
+#   from the netid.byname NIS map as authoritative.  This can speed up the
+#   function significantly if the group.byname map is large.  The content
+#   of the netid.byname map is used AS IS.  The system administrator has
+#   to make sure it is correctly generated.
+#NETID_AUTHORITATIVE=TRUE
diff --git a/nis/nss_nis/nis-initgroups.c b/nis/nss_nis/nis-initgroups.c
index 4469e4f4d8..e3ba0cd2dd 100644
--- a/nis/nss_nis/nis-initgroups.c
+++ b/nis/nss_nis/nis-initgroups.c
@@ -162,6 +162,10 @@ check_default_nss (void)
 	  while (isspace (*cp))
 	    ++cp;
 
+	  /* Recognize comment lines.  */
+	  if (*cp == '#')
+	    continue;
+
 	  static const char netid_authoritative[] = "NETID_AUTHORITATIVE";
 	  if (strncmp (cp, netid_authoritative,
 		       sizeof (netid_authoritative) - 1) != 0)