Module Name: src
Committed By: christos
Date: Thu Jan 24 17:43:44 UTC 2013
Modified Files:
src/bin/pax: tar.c tar.h
Log Message:
Recognize extended attribute headers and warn about them since we are not
currently handling them.
To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/bin/pax/tar.c
cvs rdiff -u -r1.9 -r1.10 src/bin/pax/tar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/pax/tar.c
diff -u src/bin/pax/tar.c:1.70 src/bin/pax/tar.c:1.71
--- src/bin/pax/tar.c:1.70 Thu Aug 9 04:09:22 2012
+++ src/bin/pax/tar.c Thu Jan 24 12:43:44 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: tar.c,v 1.70 2012/08/09 08:09:22 christos Exp $ */
+/* $NetBSD: tar.c,v 1.71 2013/01/24 17:43:44 christos Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)tar.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: tar.c,v 1.70 2012/08/09 08:09:22 christos Exp $");
+__RCSID("$NetBSD: tar.c,v 1.71 2013/01/24 17:43:44 christos Exp $");
#endif
#endif /* not lint */
@@ -948,6 +948,13 @@ ustar_rd(ARCHD *arcn, char *buf)
hd->typeflag == LONGLINKTYPE ? "Link" : "File");
}
break;
+ case FILEXTYPE:
+ case GLOBXTYPE:
+ tty_warn(0, "%s extended headers posix ustar archive."
+ " Extracting as plain files. Following files might be"
+ " in the wrong directory or have wrong attributes.",
+ hd->typeflag == FILEXTYPE ? "File" : "Global");
+ /*FALLTHROUGH*/
case CONTTYPE:
case AREGTYPE:
case REGTYPE:
Index: src/bin/pax/tar.h
diff -u src/bin/pax/tar.h:1.9 src/bin/pax/tar.h:1.10
--- src/bin/pax/tar.h:1.9 Tue May 11 13:12:26 2004
+++ src/bin/pax/tar.h Thu Jan 24 12:43:44 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: tar.h,v 1.9 2004/05/11 17:12:26 christos Exp $ */
+/* $NetBSD: tar.h,v 1.10 2013/01/24 17:43:44 christos Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -59,6 +59,8 @@
#define DIRTYPE '5' /* Directory */
#define FIFOTYPE '6' /* FIFO */
#define CONTTYPE '7' /* high perf file */
+#define GLOBXTYPE 'g' /* global extended header */
+#define FILEXTYPE 'x' /* file extended header */
/*
* GNU tar compatibility;