Subject: bin/8220: Obscure archive format breaks 'pax'
To: None <gnats-bugs@gnats.netbsd.org>
From: Seebs <seebs@lobe.fleet.plethora.net>
List: netbsd-bugs
Date: 08/17/1999 19:21:43
>Number: 8220
>Category: bin
>Synopsis: obscure archive format breaks pax
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Aug 17 19:20:01 1999
>Last-Modified:
>Originator: Seebs
>Organization:
>Release: august 1999
>Environment:
System: NetBSD lobe.fleet.plethora.net 1.4J NetBSD 1.4J (LOBE) #0: Tue Aug 17 10:44:59 PDT 1999 seebs@lobe.fleet.plethora.net:/usr/src/sys/arch/i386/compile/LOBE i386
>Description:
I found a "tar" archive which denotes a directory *only* with the
type character, not with a trailing "/". Pax ignores this on things
it thinks are old tar files.
>How-To-Repeat:
Unfortunately, cannot create similar sample file
>Fix:
This diff works for me.
*** tar.c.orig Tue Aug 17 18:38:56 1999
--- tar.c Tue Aug 17 18:38:51 1999
***************
*** 512,517 ****
--- 512,525 ----
*/
arcn->sb.st_mode |= S_IFREG;
break;
+ case DIRTYPE:
+ /*
+ * it is a directory, set the mode for -v printing
+ */
+ arcn->type = PAX_DIR;
+ arcn->sb.st_mode |= S_IFDIR;
+ arcn->sb.st_nlink = 2;
+ break;
case AREGTYPE:
case REGTYPE:
default:
>Audit-Trail:
>Unformatted: