[hackers] [sbase] tar: Don't error out if we can't pull pw/gr entries || sin

From: <git_AT_suckless.org>
Date: Tue, 21 Apr 2015 17:18:50 +0200 (CEST)

commit 22c0ae67a43b75967c384732a64c0001f0be2450
Author: sin <sin_AT_2f30.org>
Date: Tue Apr 21 16:18:08 2015 +0100

    tar: Don't error out if we can't pull pw/gr entries

diff --git a/tar.c b/tar.c
index 67bd91d..64a37b0 100644
--- a/tar.c
+++ b/tar.c
_AT_@ -109,16 +109,9 @@ archive(const char *path)
                 weprintf("ignoring %s\n", path);
                 return 0;
         }
- errno = 0;
- if (!(pw = getpwuid(st.st_uid)) && errno) {
- weprintf("getpwuid:");
- return 0;
- }
- errno = 0;
- if (!(gr = getgrgid(st.st_gid)) && errno) {
- weprintf("getgrgid:");
- return 0;
- }
+
+ pw = getpwuid(st.st_uid);
+ gr = getgrgid(st.st_gid);
 
         h = (void *)b;
         memset(b, 0, sizeof(b));
Received on Tue Apr 21 2015 - 17:18:50 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 21 2015 - 17:24:11 CEST