summaryrefslogtreecommitdiff
path: root/bin/pax/tar.c
AgeCommit message (Collapse)Author
2006-03-04Properly take into account that the name and prefix field in the tarOtto Moerbeek
header are not always NUL-terminated. This means there's room for 1 more byte in those field. This effectively reverts revs 1.13 and 1.14; ok jaredy@ millert@
2005-12-17Avoid sign extend when writing time stamps; fixes "tar: Ustar headerOtto Moerbeek
field is too small for foo" error messages when writing files with negative time stamps on 64 bit archs. ok millert@ deraadt@
2005-06-13Fix writing of old-style tar headers. Filenames and linknames actuallyOtto Moerbeek
are not NUL terminated if the fill the whole field. ok millert@ jaredy@
2005-04-28Use a special crafted string copy function to copy data from ustarOtto Moerbeek
headers to the generic pax structs. ustar is "funny" since some fields are not always NUL terminated. Old-style tar headers and ustar creation remains to be done. ok millert@ beck@
2005-04-21fix strlcpy abuse in pax - this commit turns potential overflows intoBob Beck
potential non-spec compliance - the use of these fields as strings needs to be revisited more thouroughly. ok millert@ otto@
2005-04-14add the prefix length to nlen for ustar; ok otto millertMarkus Friedl
2005-04-10Handle path names of exactly 100 chars correctly. Based on a diffOtto Moerbeek
from espie@. ok espie@ deraadt@
2004-10-23If a uid or gid does not fit into into the tar header, issue a warningOtto Moerbeek
and use the uid/gid of nobody. Spotted by and ok drahn@, ok millert@
2004-04-16spacingTheo de Raadt
2004-03-30Add support for expanding GNU long links from NetBSD. I've had thisTodd C. Miller
in my tree for ages but didn't have a proper test case. Thanks to otto@ for providing one.
2003-06-26protos. this requires changing the api for the *trail() functions a bitTheo de Raadt
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2002-10-18Pull in some changes from NetBSDTodd C. Miller
o When extracting GNU tar archives, honor @LongLink long links/files o Add an option to prevent pax from prompting for the next volume upon premature end of archive.
2002-10-16sprinkle const; mostly from NetBSDTodd C. Miller
2002-10-16Fix comment typos; most from NetBSD and FreeBSDTodd C. Miller
2002-10-16kill registerTodd C. Miller
2002-02-19We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.Todd C. Miller
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-12-19When writing tar and ustar archives, zero out the header before weTodd C. Miller
do anything else to it. This lets us restore the strlcpy() calls and remove a buch of memset()s that were zeroing out individual fields of the header.
2001-12-19More strlcpy() backout. Various tar programs require ustar headerTodd C. Miller
elements to be zero padded too.
2001-12-19Back out a strncpy -> strlcpy conversion. When writing old styleTodd C. Miller
tar files we need to zero-pad the file name or many tars will get a directory checksum error trying to unpack the archive. This does not affect ustar archives (pax's default) though whether or not padding matters there still needs to be determined.
2001-06-26really use strlcpy.lebel
2001-06-26use strlcpy vs strncpy+a[len-1]='\0'lebel
2001-05-26Get rid of NET2_FTS and NET2_REGEX #ifdefs since they are useless.Todd C. Miller
Change NET2_STAT into LONG_OFF_T for portability to systems with a 32bit off_t.
2001-05-16use proper str*cpy functions instead of home grown one, spaces; millert@ okMichael Shalayeff
2001-01-04spellingTodd T. Fries
2000-01-21Work with files larger than 2 Gb; from NetBSD change by mycroft@netbsd.orgThorsten Lockert
1998-10-19Fix off-by-one error when adding files of exactly 100 characters; ↵Todd C. Miller
wsanchez@apple.com
1998-09-26fix storage of paths that are exactly 100 chars; mgw@pacbell.netTodd C. Miller
1997-09-01i am bored enough to fix terminal space/tab ugliesTheo de Raadt
1997-07-25#if __STDC__ --> #ifdef __STDC__Michael Shalayeff
1997-06-04Fix usage of l_strncpy() (noticed by Theo) and make l_strncpy()Todd C. Miller
pad with NULL's like strncpy(3). This eliminates the need for zf_strncpy(); ocurrences of zf_strncpy() have been changed to l_strncpy().
1997-04-05Strip leading '/' of pathnames (only in tar mode). -S option turnsTodd C. Miller
this off like GNU tar.
1997-04-02Deal with old-style tar archives with a directory specifier (extension).Todd C. Miller
1997-03-25Back out my previous kludge to make tar files with short trailers work inTodd C. Miller
favor of a simpler change--never try to do a media change when invoked as tar. This fixes problems that crop up if gzip exits unhappily and others.
1997-02-16Correct handling of long filenames that has been stored with a prefix inThorsten Lockert
the archive; generate POSIXly correct padding of octal fields.
1997-02-10Permit single block trailers differently.Todd C. Miller
1996-08-27Fix uses of strncpyThorsten Lockert
1996-06-23update rcsidTheo de Raadt
1996-06-11Correct compile warningsThorsten Lockert
Rename warn() to paxwarn() so <err.h> can be included Remove #include <ctype.h> when not needed; from FreeBSD
1995-10-18initial import of NetBSD treeTheo de Raadt