Compatibility with old systems with non-POSIX getpwuid_r/getgrgid_r.
This commit is contained in:
parent
f773eba566
commit
456bd00333
@ -195,6 +195,7 @@ lookup_uname_helper(struct name_cache *cache, id_t id)
|
|||||||
if (cache->buff == NULL)
|
if (cache->buff == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
result = &pwent; /* Old getpwuid_r ignores last arg. */
|
||||||
r = getpwuid_r((uid_t)id, &pwent,
|
r = getpwuid_r((uid_t)id, &pwent,
|
||||||
cache->buff, cache->buff_size, &result);
|
cache->buff, cache->buff_size, &result);
|
||||||
if (r == 0)
|
if (r == 0)
|
||||||
@ -243,6 +244,7 @@ lookup_gname_helper(struct name_cache *cache, id_t id)
|
|||||||
if (cache->buff == NULL)
|
if (cache->buff == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
result = &grent; /* Old getgrgid_r ignores last arg. */
|
||||||
r = getgrgid_r((gid_t)id, &grent,
|
r = getgrgid_r((gid_t)id, &grent,
|
||||||
cache->buff, cache->buff_size, &result);
|
cache->buff, cache->buff_size, &result);
|
||||||
if (r == 0)
|
if (r == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user