Re: [dev] [sbase] [PATCH 1/4] tar: Don't crash when get{pw,gr}uid fails

From: <random832_AT_fastmail.us>
Date: Sat, 01 Nov 2014 18:30:17 -0400

On Sat, Nov 1, 2014, at 18:01, Michael Forney wrote:
> It looks like GNU tar does¹, but BSD tar uses the string
> representation of the UID/GID.
>
> ¹ http://git.savannah.gnu.org/cgit/tar.git/tree/src/names.c#n66

I didn't think to look at a modern BSD (the relevant function is
name_uid in pax/cache.c). Either way, any tar should be able to cope
with either output, assuming no system has the pathological case of a
user account with a numeric name different from its uid, but a blank
string seems to be more POSIX-correct.

There's another tar (possibly actually called bsdtar) in
contrib/libarchive that I couldn't make heads or tails of (it uses some
kind of modular design and I couldn't find the real implementation of
everything)
Received on Sat Nov 01 2014 - 23:30:17 CET

This archive was generated by hypermail 2.3.0 : Sat Nov 01 2014 - 23:36:08 CET