From 456bd00333fb56957369ea8b1e975961ad8e0f5c Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Mon, 28 Dec 2009 03:30:31 +0000 Subject: [PATCH] Compatibility with old systems with non-POSIX getpwuid_r/getgrgid_r. --- lib/libarchive/archive_read_disk_set_standard_lookup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libarchive/archive_read_disk_set_standard_lookup.c b/lib/libarchive/archive_read_disk_set_standard_lookup.c index 60054f918f0f..dc2f67f8f07a 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)