Commit Graph

46 Commits

Author SHA1 Message Date
peter
5fd3bac82e Merge gnu cpio 2.6 -> 2.8 changes. Unfortunately, we have massive
conflicts due to radically different approaches to security and bug fixes.
In some cases I re-started from the vendor version and reimplemented our
patches.  Fortunately, this is not enabled by default in -current.
2008-07-10 02:08:00 +00:00
peter
43c61ec889 Flatten cvs2svn generated import tree. 2008-07-09 23:21:55 +00:00
peter
bcfb49bc17 cvs2svn managed to overlay two different path trees. fix. 2008-07-09 23:07:03 +00:00
cperciva
140c58ca27 Correct insecure temporary file usage in texindex. [06:01]
Correct insecure temporary file usage in ee. [06:02]
Correct a race condition when setting file permissions, sanitize file
names by default, and fix a buffer overflow when handling files
larger than 4GB in cpio. [06:03]
Fix an error in the handling of IP fragments in ipfw which can cause
a kernel panic. [06:04]

Security:	FreeBSD-SA-06:01.texindex
Security:	FreeBSD-SA-06:02.ee
Security:	FreeBSD-SA-06:03.cpio
Security:	FreeBSD-SA-06:04.ipfw
2006-01-11 08:02:16 +00:00
tjr
ecdaf1ccb7 In __option_is_short(), avoid calling isprint() on key characters outside
the range allowed by that function, resulting in undefined behaviour.
Our undefined behaviour in multibyte locales happened to differ from
glibc's, resulting in errors parsing option strings.

Obtained from:	Corinna Vinschen (Red Hat)
2005-10-17 12:20:05 +00:00
tjr
c29899efe7 Update for GNU cpio 2.6. 2005-10-01 06:41:34 +00:00
tjr
74e2490c69 Merge long_format() time formatting code and fixes for printf() format
errors from old copyin.c.
2005-10-01 06:37:41 +00:00
tjr
9c1e1fb8c0 Merge from old copyout.c rev 1.2: Output a zero rdev except for bdevs,
cdevs, fifos and sockets. Don't output a file if the major, minor or
totality of its rdev would be truncated.
2005-10-01 06:09:55 +00:00
tjr
624d486b89 Merge from old copypass.c rev 1.3: If we must yell at the user than a
file cannot be linked into place when requested (not required) to do it,
reassure them that cpio is still intelligent enough that it will perform
a full copy instead.
2005-10-01 05:54:39 +00:00
tjr
408469d959 Merge from old util.c rev 1.2: say "volume" instead of "tape". 2005-10-01 05:52:40 +00:00
tjr
e4ec2f34db Merge from old main.c rev 1.2: Don't set the umask until after we have
processed the arguments and opened the archive file.
2005-10-01 05:49:29 +00:00
tjr
6b16a660d3 Merge from old tar.c rev 1.2: Recognize and skip 'x' and 'g' pax
extension entries.
2005-10-01 05:42:44 +00:00
tjr
058cbad809 Merge from old copyin.c rev 1.5, copypass.c rev 1.2: Create fifos using
mkfifo() instead of attempting to create them using mknod().
2005-10-01 05:36:39 +00:00
tjr
a9df32e6dd Rename isnumber() to cpio_isnumber() to avoid clashing with the
<ctype.h> library function of the same name.
2005-10-01 04:56:09 +00:00
tjr
97bb17a0b0 Remove files no longer present in GNU cpio distribution. Most of these
were actually moved into subdirectories.
2005-10-01 04:47:43 +00:00
tjr
c36d8046bb Import GNU cpio 2.6 (trimmed) 2005-10-01 04:37:08 +00:00
tjr
c41ca4418d This commit was generated by cvs2svn to compensate for changes in r150765,
which included commits to RCS files with non-trunk default branches.
2005-10-01 04:37:08 +00:00
kientzle
fb64ba1c55 Recognize and skip 'x' and 'g' pax extension entries. In particular,
this avoids the creation of "PaxHeader" dirs when unpacking pax-format
tar archives such as those written by bsdtar.

MFC after: 3 days
2004-08-28 03:13:05 +00:00
ache
fe43b1b62c Remove unneded files 2004-02-17 01:41:49 +00:00
green
9404c74f6c If we must yell at the user than a file cannot be linked into place when
requested (not required) to do it, reassure them that cpio is still
intelligent enough that it will perform a full copy instead.
2003-07-11 02:19:19 +00:00
ache
761a62d3aa Don't attempt to parse %c 2001-03-21 21:17:54 +00:00
peter
9751ab22ae Fix warning: return type of main' is not int' 1999-09-15 01:58:44 +00:00
obrien
65fb255e80 Add FreeBSD tag. 1999-09-08 11:16:36 +00:00
bde
080e3ef296 Fixed printf format errors. 1998-06-30 19:53:09 +00:00
jmg
dbf5b6157a fix misspelling
Submitted-by: Josh Gilliam

Closes PR: 4422
1997-08-30 11:01:54 +00:00
obrien
012df9a25b I clamined to not have imported cpio.texi. This is not true. 1997-08-25 09:11:06 +00:00
bde
84834b817c Create fifos using mkfifo() instead of attempting to create them using
mknod().
1997-07-13 14:07:48 +00:00
obrien
38e82dbbff Fix bug that can cuase a loop to become endless.
The bug is triggered by attempts to copy in (-i) a file which happens
to have zero length.
1997-04-03 11:24:59 +00:00
obrien
f48bf10e97 FreeBSD specific readme for contributed source.
(FREEBSD-upgrade is now the "accpeted" filename for this).
1997-04-03 10:45:21 +00:00
obrien
22bb48addf Virgin import of GNU cpio v2.4.2. 1997-03-31 09:37:59 +00:00
obrien
8a15519b3e This commit was generated by cvs2svn to compensate for changes in r24434,
which included commits to RCS files with non-trunk default branches.
1997-03-31 09:37:59 +00:00
obrien
4cc24cbbac JKH says:
Change "Found end of tape.  Load next tape ..." messages to say
   "volume" instead of tape.  Running cpio off of /dev/fd0 and having
   it say "give me the next tape" is kind of ludicrous.. :-)
1997-03-30 11:01:43 +00:00
obrien
bee6a370f3 don't lookup rsh(1) at bogus pathnames
Submitted by:	joerg via old gnu/usr.bin/cpio v2.3
1997-03-30 10:56:38 +00:00
obrien
843afab413 Don't set the umask until after we have processed the arguments
and opened the archive file.  This allows "cpio -o -O output_file"
to create the output file with the callers proper umask.
Closed PR# 1391

Add setlocale LC_ALL (from ache).
1997-03-30 10:50:01 +00:00
obrien
f1b5283040 Support dummy lchown() so that cpio understands 4.4 symbolic links. 1997-03-30 10:45:44 +00:00
obrien
8596af284a - Correct the recommended option for "find" from "-depth" to "-d".
- Fix gross spelling and typographical errors pointed out by Keith Bostic.
- Mention -l, --link is only usable with "-p".

Obtained from: old gnu/usr.bin/cpio v2.3.
1997-03-30 10:42:21 +00:00
obrien
3bca94d06e Output a zero rdev except for bdevs, cdevs, fifos and sockets. This
stops regular files with unrepresentable rdevs from being rejected
and makes the output independent of unpreservable metadata.

Don't output a file if the major, minor or totality of its rdev would be
truncated.  Print a message about the skipped files to stderr but don't
report the error in the exit status.  cpio's abysmal error handling doesn't
allow continuing after an error, and the rdev checks had to be misplaced
to avoid the problem of returning an error code from routines that return
void.

Minor numbers are limited to 21 bits in pax's ustar format and to 18
bits in archives created by gnu tar (gnu tar wastes 3 bits for padding).
pax's and cpio's ustar format is incompatible with gnu tar's ustar
format for other reasons (see cpio/README).

Submitted by:	bde via old gnu/usr.bin/cpio v2.3.
1997-03-30 10:34:16 +00:00
obrien
3fecf166e7 Fix typo. 1997-03-30 10:32:26 +00:00
obrien
5dcdf37754 I goofed, Makefile lchown.c don't belong here. 1997-03-30 08:19:38 +00:00
obrien
6718192ec9 Replace ctime by strftime %c to use national representation.
Use isprint() for Localization.

Submitted by:	ache via gnu/usr.bin/cpio v2.3
1997-03-30 00:23:39 +00:00
obrien
8d4a60ff51 FreeBSD BSD-style Makefile for contributed CPIO source. 1997-03-29 23:11:22 +00:00
obrien
54e8b4d91d Rodney Grimes's dummy lchown() so that cpio understands 4.4 symbolic links.
(taken from old gnu/usr.bin/cpio)

Reviewed by:	phk
1997-03-29 23:10:24 +00:00
obrien
5d450da5b0 Don't need tcexparg.c on FreeBSD. 1997-03-29 23:05:27 +00:00
obrien
ad1858dc05 Don't need tcexparg.c which impliments Unix-style command line wildcards
for Turbo C
1997-03-29 23:04:03 +00:00
obrien
8a5f0f4d0b FreeBSD specific readme for contributed CPIO soruces. 1997-03-29 22:48:41 +00:00
obrien
b3a30fbfec Virgin import of GNU cpio v2.4.2. 1997-03-29 22:40:46 +00:00