Commit Graph

19 Commits

Author SHA1 Message Date
ache
8e35b79c58 Add */lib/getopt* I miss somehow initially. 2004-02-18 18:53:13 +00:00
ache
82ea3d0837 Remove files no longer needed 2004-02-17 01:20:41 +00:00
peter
1454718ba3 Fix an annoying bug in tar. When it converted 'tar zcf' to 'tar -z -c -f'
it forgot to null terminate the new argv[] array.  If you mixed this
with $TAR_OPTIONS, phkmalloc and a whole bunch of other variables, you
could end up with a segfault.  This isn't strictly a phkmalloc victory
since tar walks off the end of an array rather than use uninitialized
malloc memory, but phkmalloc makes it easier to provoke.
2003-07-24 00:04:01 +00:00
obrien
dc8b1199b7 Centralize _PATH_* definitions.
Submitted by:	Tim Kientzle <kientzle@acm.org> (embellished by me)
2003-05-05 22:49:23 +00:00
sobomax
f658892ad8 Fix security bug in contains_dot_dot routine.
PR:             43575
Submitted by:   Brett Glass <brett@lariat.org>

X-MFC after:	immediately
2002-10-19 09:32:03 +00:00
sobomax
7370eccac0 Don't kill itself in --fast-read mode if there is no decompressor started.
Reported by:	Gordon Tetlow <gordont@gnf.org>
Submitted by:	tjr
MFC after:	1 week
		(along with other --fast-read changes)
2002-10-09 07:33:29 +00:00
sobomax
6a8c0fe408 Further improve --fast-read mode - when reading archive from stdin ensure that
SIGTERM we are sending to decompressor when there is nothing left to do is
actually delivered to decompressor, not to the another copy of tar, which
does unblocking.

MFC after:	2 weeks
2002-10-02 08:42:06 +00:00
sobomax
8a64c70055 In the --fast-read mode send SIGTERM to decompressor once we have extracted
all files we have been asked for. This vastly improves performance of
pkg_add(1), because usually it only extract +CONTENTS file in --fast-read
mode, checks it and only then extracts full content of tarball in normal
mode. Without this patch, it have had to decompress the tarball twice,
effectively doubling consumed CPU time.

MFC after:	1 week
2002-09-09 06:00:16 +00:00
sobomax
7e35df13ea Move even closer to matching behaviour of our old tar(1) wrt preserving
modes of extracted files. This effectively disables special threating
of uid 0 for mode-preserving purposes and should fix problems with
pkg_add(1) and probably other things when extracting files/dirs with
sticky mode bits set.

Pointed out by:	bde
MFC in:		2 weeks
2002-08-01 17:32:08 +00:00
sobomax
e928707017 MFS: make this file compilable with gcc 2.9x as well. 2002-07-14 13:25:51 +00:00
sobomax
a86be23410 Fix another POLA breakage in a new tar: in diff mode presence of file
in the archive, but its absence in the file system should be reported
as difference, not as error.

Reported by:	bde
2002-07-03 13:01:40 +00:00
sobomax
b42b81098c When we are extracting directory with --unlink option and the directory
already exists don't spew bogus "Cannot unlink" error and exit with
non-zero code.

Reported by:	bde
2002-07-03 12:44:31 +00:00
sobomax
92b76d99a3 Our strerror_r(3) returns int, not char *. This fixes bogus error messages
like "Cannot stat: (null)"

Reported by:    bde, kris
2002-06-16 12:35:17 +00:00
sobomax
f377a25227 Disabling automatic --same-owner option when running as uid 0 along with
the --same-permissions was an overkill, so put it back. This is consistent
with what our old tar did.

Suggested by:	dillon
2002-06-07 06:02:35 +00:00
sobomax
45e6897000 IMO it was a quite ugly idea that if we are running as uid 0 then we can
safely ignore current umask(2) and assume that permissions should be set
right like in the archive. Not only it violates POLA, but introduces
huge potential security vulnerability, particularly for ports, where
many popular archives come with 777 files and dirs.
2002-06-07 00:03:23 +00:00
sobomax
2bc470c3c7 Move patches into the src/contrib/tar.
Requested by:   ps
Reviewed by:    md5(1)
2002-06-04 17:31:16 +00:00
sobomax
f6c2beb620 Add importing/upgrading instructions. 2002-06-04 11:08:12 +00:00
sobomax
11e5082bb4 Add razor used for shaving out GNU Tar. 2002-06-04 10:40:50 +00:00
sobomax
0f70d6636c Virgin import (trimmed) of GNU Tar version 1.13.25. 2002-06-04 10:37:47 +00:00