about summary refs log tree commit diff
path: root/grp/initgroups.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-07-07 16:30:46 +0000
committerUlrich Drepper <drepper@redhat.com>1998-07-07 16:30:46 +0000
commit6333c255baf8ad9547c282b47fe5c35a40bca77d (patch)
treebbc8e29100fe7311de954f6b4f11c4e010f55b60 /grp/initgroups.c
parent0302fece014004a2df366dacc2b8e9416264a978 (diff)
downloadglibc-6333c255baf8ad9547c282b47fe5c35a40bca77d.tar.gz
glibc-6333c255baf8ad9547c282b47fe5c35a40bca77d.tar.xz
glibc-6333c255baf8ad9547c282b47fe5c35a40bca77d.zip
Update.
1998-07-07 16:28  Ulrich Drepper  <drepper@cygnus.com>

	* grp/initgroups.c: Handle directives from nsswitch.conf file.
Diffstat (limited to 'grp/initgroups.c')
-rw-r--r--grp/initgroups.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/grp/initgroups.c b/grp/initgroups.c
index 454882e0af..d74d08ddd0 100644
--- a/grp/initgroups.c
+++ b/grp/initgroups.c
@@ -182,12 +182,24 @@ initgroups (user, group)
       fct = __nss_lookup_function (nip, "initgroups");
 
       if (fct == NULL)
-	status = compat_call (nip, user, group, &start, &size, groups,
-			      limit, &errno);
+	{
+	  status = compat_call (nip, user, group, &start, &size, groups,
+				limit, &errno);
+
+	  if (nss_next_action (nip, NSS_STATUS_UNAVAIL) != NSS_ACTION_CONTINUE)
+	    break;
+	}
       else
 	status = _CALL_DL_FCT (fct, (user, group, &start, &size, groups, limit,
 				     &errno));
 
+      /* This is really only for debugging.  */
+      if (NSS_STATUS_TRYAGAIN > status || status > NSS_STATUS_RETURN)
+	 __libc_fatal ("illegal status in " __FUNCTION__);
+
+      if (nss_next_action (nip, status) == NSS_ACTION_RETURN)
+	 break;
+
       if (nip->next == NULL)
 	no_more = -1;
       else