about summary refs log tree commit diff
path: root/nis/nss_compat/compat-pwd.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-05-18 14:52:08 +0000
committerUlrich Drepper <drepper@redhat.com>2006-05-18 14:52:08 +0000
commit758b9d7efe599e3de3472593b6f8f03cfc29ea92 (patch)
tree2e7d4cf5fe8c0d5431c3951a55b2e5445b72261d /nis/nss_compat/compat-pwd.c
parent5f1724bf0306309e7da4ebf7fcc19c03fdbf1142 (diff)
downloadglibc-758b9d7efe599e3de3472593b6f8f03cfc29ea92.tar.gz
glibc-758b9d7efe599e3de3472593b6f8f03cfc29ea92.tar.xz
glibc-758b9d7efe599e3de3472593b6f8f03cfc29ea92.zip
* nis/nss_compat/compat-pwd.c (internal_setpwent): If nss_set*ent
	returned NSS_STATUS_UNAVAIL, still return NSS_STATUS_SUCCESS.
	* nis/nss_compat/compat-spwd.c (internal_setspent): Likewise.
	* nis/nss_compat/compat-grp.c (internal_setgrent): Likewise.

	* nis/nss_compat/compat-initgroups.c (nss_setgrent, nss_endgrent):
	Removed.
	(init_nss_interface): Remove initialization of these variables.

2006-05-18  Ulrich Drepper  <drepper@redhat.com>

	* nis/nis_call.c (rec_dirsearch): Little optimization: pull
	nis_free_directory forward to avoid duplication.
Diffstat (limited to 'nis/nss_compat/compat-pwd.c')
-rw-r--r--nis/nss_compat/compat-pwd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/nis/nss_compat/compat-pwd.c b/nis/nss_compat/compat-pwd.c
index 43ccb27071..1031714529 100644
--- a/nis/nss_compat/compat-pwd.c
+++ b/nis/nss_compat/compat-pwd.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-1999,2001-2004,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1999,2001-2005,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
 
@@ -258,7 +258,11 @@ internal_setpwent (ent_t *ent, int stayopen)
   give_pwd_free (&ent->pwd);
 
   if (status == NSS_STATUS_SUCCESS && nss_setpwent)
-    return nss_setpwent (stayopen);
+    {
+      status = nss_setpwent (stayopen);
+      if (status == NSS_STATUS_UNAVAIL)
+        status = NSS_STATUS_SUCCESS;
+    }
 
   return status;
 }