summaryrefslogtreecommitdiffstats
path: root/lib/libarchive
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2009-12-28 03:30:31 +0000
committerkientzle <kientzle@FreeBSD.org>2009-12-28 03:30:31 +0000
commit751833b2d36c7bff10c193dae6d2a8f54c55a39e (patch)
treef5cc05c525e121ae93ff8a49ee67586b95bd967e /lib/libarchive
parent749f336c040e225b5dac115165817b0c7611ed7f (diff)
downloadFreeBSD-src-751833b2d36c7bff10c193dae6d2a8f54c55a39e.zip
FreeBSD-src-751833b2d36c7bff10c193dae6d2a8f54c55a39e.tar.gz
Compatibility with old systems with non-POSIX getpwuid_r/getgrgid_r.
Diffstat (limited to 'lib/libarchive')
-rw-r--r--lib/libarchive/archive_read_disk_set_standard_lookup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libarchive/archive_read_disk_set_standard_lookup.c b/lib/libarchive/archive_read_disk_set_standard_lookup.c
index 60054f9..dc2f67f 100644
--- a/lib/libarchive/archive_read_disk_set_standard_lookup.c
+++ b/lib/libarchive/archive_read_disk_set_standard_lookup.c
@@ -195,6 +195,7 @@ lookup_uname_helper(struct name_cache *cache, id_t id)
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)
@@ -243,6 +244,7 @@ lookup_gname_helper(struct name_cache *cache, id_t id)
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)
OpenPOWER on IntegriCloud