diff options
Diffstat (limited to 'usr.bin/tar/write.c')
-rw-r--r-- | usr.bin/tar/write.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/tar/write.c b/usr.bin/tar/write.c index e9cfcd0..3e1de2d 100644 --- a/usr.bin/tar/write.c +++ b/usr.bin/tar/write.c @@ -1196,6 +1196,7 @@ lookup_uname_helper(struct bsdtar *bsdtar, const char **name, id_t id) (void)bsdtar; /* UNUSED */ + errno = 0; pwent = getpwuid((uid_t)id); if (pwent == NULL) { *name = NULL; @@ -1222,6 +1223,7 @@ lookup_gname_helper(struct bsdtar *bsdtar, const char **name, id_t id) (void)bsdtar; /* UNUSED */ + errno = 0; grent = getgrgid((gid_t)id); if (grent == NULL && errno != 0) { *name = NULL; |