Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/pax Warn if we are trying to read a gnu tar archive, if ...
details: https://anonhg.NetBSD.org/src/rev/cf9a72066308
branches: trunk
changeset: 538257:cf9a72066308
user: christos <christos%NetBSD.org@localhost>
date: Wed Oct 16 04:40:55 2002 +0000
description:
Warn if we are trying to read a gnu tar archive, if --strict is specified.
diffstat:
bin/pax/tar.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r 26d823445ec6 -r cf9a72066308 bin/pax/tar.c
--- a/bin/pax/tar.c Wed Oct 16 04:10:43 2002 +0000
+++ b/bin/pax/tar.c Wed Oct 16 04:40:55 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tar.c,v 1.26 2002/10/16 03:46:09 christos Exp $ */
+/* $NetBSD: tar.c,v 1.27 2002/10/16 04:40:55 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.26 2002/10/16 03:46:09 christos Exp $");
+__RCSID("$NetBSD: tar.c,v 1.27 2002/10/16 04:40:55 christos Exp $");
#endif
#endif /* not lint */
@@ -735,8 +735,9 @@
if (strncmp(hd->magic, TMAGIC, TMAGLEN - 1) != 0)
return(-1);
/* This is GNU tar */
- if (strncmp(hd->magic, "ustar ", 8) != 0)
- is_gnutar = 0;
+ if (strncmp(hd->magic, "ustar ", 8) == 0 && !is_gnutar)
+ tty_warn(1,
+ "Trying to read GNU tar archive with extensions off");
if (asc_ul(hd->chksum,sizeof(hd->chksum),OCT) != tar_chksm(blk,BLKMULT))
return(-1);
return(0);
Home |
Main Index |
Thread Index |
Old Index