about summary refs log tree commit diff
path: root/nis/nss_nis/nis-initgroups.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nss_nis/nis-initgroups.c')
-rw-r--r--nis/nss_nis/nis-initgroups.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nis/nss_nis/nis-initgroups.c b/nis/nss_nis/nis-initgroups.c
index 5960c80502..b69fea4e85 100644
--- a/nis/nss_nis/nis-initgroups.c
+++ b/nis/nss_nis/nis-initgroups.c
@@ -112,7 +112,10 @@ internal_getgrent_r (struct group *grp, char *buffer, size_t buflen,
   do
     {
       if (intern->next == NULL)
-        return NSS_STATUS_NOTFOUND;
+	{
+	  *errnop = ENOENT;
+	  return NSS_STATUS_NOTFOUND;
+	}
       p = strncpy (buffer, intern->next->val, buflen);
       while (isspace (*p))
         ++p;