summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar
Commit message (Collapse)AuthorAgeFilesLines
* Improve help handling:kientzle2004-06-021-0/+13
| | | | | | * --help produces long help message on systems with getopt_long * -h with no other options also produces long help message (If a mode is specified, -h has its usual meaning.)
* Both "foo/" and "foo" should match "foo/bar", so stripkientzle2004-06-021-0/+3
| | | | | | trailing '/' characters on include patterns for extraction. Pointed out by: games/quakeforge port (thanks to Kris!)
* Correction: -h should be a synonym for -L, not -H.kientzle2004-05-312-3/+3
| | | | (as specified by Linux Standards Base, GNU tar, and 4.4BSD documentation)
* Permit (but ignore) -Z with -x or -t, now that libarchivekientzle2004-05-301-2/+9
| | | | recognizes and decompresses .Z format.
* Minor corrections to error handling and user notifications:kientzle2004-05-271-23/+26
| | | | | | | | * Move format/compression reporting to end of output, since we don't always know the input format until then. * Set bsdtar exit value to 1 if any file could not be restored. * Generate gtar-style warning when stripping leading '/' characters. * Warn when removing symlinks.
* Provide framework for exiting with non-zero value on non-critical errors.kientzle2004-05-272-1/+3
|
* Add --no-same-owner as a synonym for -o.kientzle2004-05-221-0/+1
| | | | | | | Note that bsdtar's -o (which follows SUSv2) is not the same as GNU tar's -o. In GNU tar, -o and --no-same-owner are not synonyms. Pointed out by: Kris Kennaway (required by xpenguins port)
* Add --dereference as a synonym for -Hkientzle2004-05-211-0/+1
| | | | Pointed out by: Kris Kennaway (unbreaks nspr port build)
* Default is to restore timestamps, even when operating as root. <sigh>kientzle2004-05-191-1/+1
|
* Fix a segfault when looking up a non-existent group.kientzle2004-05-181-1/+1
|
* Accept (but ignore) GNU tar's -B option. bsdtar neverkientzle2004-05-181-2/+8
| | | | needs it, but it does no harm for people to specify it.
* Set errno to 0 before calling getpwuid/getgrgid, so that errorkientzle2004-05-171-0/+2
| | | | messages will be displayed only when there is, in fact, an error.
* Speed up safe_fprintf by copying to a temp buffer, then writingkientzle2004-05-171-13/+32
| | | | blocks at a time, rather than using putc().
* Propagate struct bsdtar down into a lot more places.kientzle2004-05-176-138/+137
| | | | Move global progname variable into struct bsdtar.
* Refactor name caching to use a common piece of code for uname_cache andkientzle2004-05-172-88/+113
| | | | | gname_cache. Cache negative lookups to dramatically improve performance building archives containing nonexistent uid/gid.
* Make symlink protection a bit more useful:kientzle2004-05-173-4/+17
| | | | | | * Remove terminal symlinks so they can be replaced. * If -U, remove intermediate symlinks as well * Otherwise, refuse the extraction
* Update manpage to track new security features.kientzle2004-05-171-28/+125
|
* Add --unlink and --unlink-first synonyms for -Ukientzle2004-05-051-30/+32
| | | | Make indentation of tar_longopts array more consistent.
* Contrariwise, Linux sys/stat.h doesn't define mode_t and friends,kientzle2004-05-041-0/+1
| | | | even though POSIX requires it. <sigh>
* Include local copies of fts.c and fts.h to be used ONLY on non-FreeBSDkientzle2004-05-042-0/+1342
| | | | | | | systems. The fts.h here is an exact copy of include/fts.h (except for an initial explanatory comment and the revision tags, of course). The fts.c here is slightly modified from lib/libc/gen/fts.c so it can compile correctly on non-FreeBSD systems.
* For portability, don't rely on libc's strmode(3). <sigh>kientzle2004-05-033-1/+53
|
* Correct copy/paste error in Linux nodump support.kientzle2004-05-031-3/+4
| | | | | Thanks to: Juergen Lock for his continuing patience while I botch his patches.
* Style: Use single tab after #definekientzle2004-05-023-16/+16
|
* More of Juergen Lock's patches for Linux.kientzle2004-05-022-8/+63
| | | | | (fflags support on Linux, nanosecond timestamp portability, enable 64-bit file offsets)
* A security issue: An archive containing a symlink to anotherkientzle2004-05-022-13/+71
| | | | | | | | directory, then a file with that symlink as a prefix can drop a file outside of the current directory, which can be a security hole. Plug this hole by refusing to extract files if a prefix of the pathname is a symlink. The -P option disables this check.
* -U is now implemented. (It's been recognized by bsdtar for a while;kientzle2004-04-291-1/+4
| | | | now libarchive actually supports the underlying request.)
* Refuse to extract entries with '..' in pathname.kientzle2004-04-281-7/+40
| | | | Pointed out by: David Schultz
* Remove information about specific formats; replace with akientzle2004-04-281-64/+4
| | | | reference to libarchive-formats(5).
* Update write.c to follow recent API changes to libarchive.kientzle2004-04-261-8/+11
| | | | | Also, bump up the default copy buffer from 8k to 64k to improve performance.
* Fix username/groupname cache so it returns a name thatkientzle2004-04-231-0/+2
| | | | | | | was just looked up by get{pw,gr}id(). Otherwise, it returns a NULL name unless it's already in the cache. Credit to Juergen Lock.
* Eliminate a redundant call to archive_entry_set_pathname()kientzle2004-04-211-8/+6
|
* Allow brave souls to install bsdtar as thekientzle2004-04-191-0/+5
| | | | | | default "tar" command by defining WITH_BSDTAR. Note: "gtar" and "bsdtar" commands both exist regardless.
* --help is only supported if you have getopt_long().kientzle2004-04-161-0/+2
| | | | This allows bsdtar to compile on FreeBSD 4.x.
* As suggested by Julian Elischer, use a self-sizing hashkientzle2004-04-154-129/+279
| | | | | | | | table for the hardlink cache. This dramatically improves performance when archiving millions of hardlinked files. While I'm here, clean up some style bugs (per Bruce Evans) and clarify some comments.
* A simple cache of uid->uname lookups and gid->gname lookups eliminateskientzle2004-04-143-12/+60
| | | | | almost 1/2 of the CPU time required to create an uncompressed archive and makes a noticable reduction in wallclock time.
* When all the links to a file have been dumped, don't forgetkientzle2004-04-131-1/+3
| | | | to free() the memory used to store the filename.
* Eliminate a lot of malloc/free calls by usingkientzle2004-04-131-4/+11
| | | | | a stack-allocated buffer for safe_fprintf formatting. Only if the result is too large do we resort to malloc.
* Manpage changes suggested by Irina Liakh.kientzle2004-04-132-21/+50
| | | | Also, add -h as a synonym for -H, for Linux Standards Base compliance.
* Style fixeskientzle2004-04-121-3/+2
| | | | Pointed out by: bde
* Add DPADD to Makefile (thanks to Andrey for pointing this out).kientzle2004-04-125-24/+2
| | | | | Generally clean up Makefile, remove dmalloc references from source (there are better ways to do this than pollute the FreeBSD src tree).
* Allow arguments to appear in any order.kientzle2004-04-082-66/+113
| | | | | | | | While I'm here, add a couple of extra sanity-checks to the argument parsing (reject -j -z, for instance) and update the docs a bit. Requested by: most everyone ;-)
* Document the newly-implemented -T option.kientzle2004-04-081-2/+10
|
* Add support for -T option on create.kientzle2004-04-083-6/+60
| | | | (Required by pkg_create.)
* Correct signature in alternative stub implementation of setup_acls()kientzle2004-04-071-1/+3
|
* Archive both access and default ACLs.kientzle2004-04-061-6/+19
|
* Initial commit for bsdtar.kientzle2004-04-059-0/+2977
OpenPOWER on IntegriCloud