about summary refs log tree commit diff
path: root/nis/nss_nis/nis-grp.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nss_nis/nis-grp.c')
-rw-r--r--nis/nss_nis/nis-grp.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/nis/nss_nis/nis-grp.c b/nis/nss_nis/nis-grp.c
index 40d45825e4..6dca66e4df 100644
--- a/nis/nss_nis/nis-grp.c
+++ b/nis/nss_nis/nis-grp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
 
@@ -104,7 +104,9 @@ internal_nis_getgrent_r (struct group *grp, char *buffer, size_t buflen,
 
       if (retval != NSS_STATUS_SUCCESS)
         {
-          if (retval == NSS_STATUS_TRYAGAIN)
+	  if (retval == NSS_STATUS_NOTFOUND)
+	    *errnop = ENOENT;
+          else if (retval == NSS_STATUS_TRYAGAIN)
             *errnop = errno;
           return retval;
         }
@@ -178,7 +180,9 @@ _nss_nis_getgrnam_r (const char *name, struct group *grp,
 
   if (retval != NSS_STATUS_SUCCESS)
     {
-      if (retval == NSS_STATUS_TRYAGAIN)
+      if (retval == NSS_STATUS_NOTFOUND)
+	*errnop = EAGAIN;
+      else if (retval == NSS_STATUS_TRYAGAIN)
         *errnop = errno;
       return retval;
     }
@@ -202,7 +206,10 @@ _nss_nis_getgrnam_r (const char *name, struct group *grp,
       if (parse_res == -1)
 	return NSS_STATUS_TRYAGAIN;
       else
-	return NSS_STATUS_NOTFOUND;
+	{
+	  *errnop = EAGAIN;
+	  return NSS_STATUS_NOTFOUND;
+	}
     }
   return NSS_STATUS_SUCCESS;
 }
@@ -227,7 +234,9 @@ _nss_nis_getgrgid_r (gid_t gid, struct group *grp,
 
   if (retval != NSS_STATUS_SUCCESS)
     {
-      if (retval == NSS_STATUS_TRYAGAIN)
+      if (retval == NSS_STATUS_NOTFOUND)
+	*errnop = ENOENT;
+      else if (retval == NSS_STATUS_TRYAGAIN)
         *errnop = errno;
       return retval;
     }
@@ -251,7 +260,10 @@ _nss_nis_getgrgid_r (gid_t gid, struct group *grp,
       if (parse_res == -1)
 	return NSS_STATUS_TRYAGAIN;
       else
-	return NSS_STATUS_NOTFOUND;
+	{
+	  *errnop = ENOENT;
+	  return NSS_STATUS_NOTFOUND;
+	}
     }
   return NSS_STATUS_SUCCESS;
 }