[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] ustar-format archives with 32-char long user/group names are m

From: Michał Górny
Subject: [Bug-tar] ustar-format archives with 32-char long user/group names are misinterpreted
Date: Sat, 24 Nov 2018 09:59:10 +0100


I've been tinkering with the tar format limitations and noticed that GNU
tar (as of v1.30) misbehaves when given ustar-format archive created by
bsdtar (from libarchive) and using 32-char long user/group name.

The output is:

$ tar -tvf test.tar 
/verylongverylongverylongverylong000000  5 2018-11-24 09:28 input.txt

Note that it does not enforce the 32-octet limit on the fields,
and concatenates the values with the fields following them.  I've
already reported the issue to libarchive as well [1] since it seems to
violate the POSIX ustar format but I suppose GNU tar might want to
handle this problem more gracefully.

To reproduce:

useradd verylongverylongverylongverylong
echo test > input.txt
chown verylongverylongverylongverylong:verylongverylongverylongverylong 
bsdtar --format=ustar -cf test.tar input.txt
tar -tvf test.tar


Best regards,
Michał Górny

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]