+2005-02-07 Jonathan Pryor <jonpryor@vt.edu>
+
+ * grp.c: Oops. Didn't see other Solaris fix in #72292.
+
2005-02-07 Jonathan Pryor <jonpryor@vt.edu>
* grp.c, pwd.c: Clear errno before calling the actual calls, as errno may
} while ((r = getgrnam_r (name, &_grbuf, buf, buflen, gbufp)) &&
recheck_range (r));
+ /* On Solaris, this function returns 0 even if the entry was not found */
+ if (r == 0 && !(*gbufp))
+ r = errno = ENOENT;
+
if (r == 0 && copy_group (gbuf, &_grbuf) == -1)
r = errno = ENOMEM;
free (buf);
} while ((r = getgrgid_r (gid, &_grbuf, buf, buflen, gbufp)) &&
recheck_range (r));
+ /* On Solaris, this function returns 0 even if the entry was not found */
+ if (r == 0 && !(*gbufp))
+ r = errno = ENOENT;
+
if (r == 0 && copy_group (gbuf, &_grbuf) == -1)
r = errno = ENOMEM;
free (buf);