The "result" argument to functions get(pwu|grg)id_r and get(pw|gr)name_r
does not appear in the signatures provided on older platforms. We set
the pointer to the result memory in case the function ignores it, thus
ensuring initialization.
SVN-Revision: 1658
if (cache->buff == NULL)
return (NULL);
for (;;) {
+ result = &pwent; /* Old getpwuid_r ignores last arg. */
r = getpwuid_r((uid_t)id, &pwent,
cache->buff, cache->buff_size, &result);
if (r == 0)
if (cache->buff == NULL)
return (NULL);
for (;;) {
+ result = &grent; /* Old getgrgid_r ignores last arg. */
r = getgrgid_r((gid_t)id, &grent,
cache->buff, cache->buff_size, &result);
if (r == 0)
int r;
for (;;) {
+ result = &grent; /* Old getgrnam_r ignores last arg. */
r = getgrnam_r(gname, &grent, buffer, bufsize, &result);
if (r == 0)
break;
int r;
for (;;) {
+ result = &pwent; /* Old getpwnam_r ignores last arg. */
r = getpwnam_r(uname, &pwent, buffer, bufsize, &result);
if (r == 0)
break;