summaryrefslogtreecommitdiffstats
path: root/bin/pax (follow)
Commit message (Collapse)AuthorAgeFilesLines
* -f - can respresent both stdin and stdout; rework the text a littlejmc2020-10-051-7/+8
| | | | | | | to make it read better; reported by roderick ok millert
* in case we can't create intermediate directories because of permissions,espie2020-03-232-7/+9
| | | | | | show a less confusing track okay millert@ (with a small tweak to the error message by millert@)
* Usually, -width Fl (which is 10n) is too wide and hence ugly.schwarze2020-01-163-9/+9
| | | | Change several instances, most of them to the usual -width Ds.
* In cpio mode, when processing the -o switch, only set the archive formatnaddy2019-11-151-2/+3
| | | | | if not already set. This makes "cpio -Hustar -o" behave the same as "cpio -o -Hustar". ok guenther@
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-286-62/+62
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* mkstemp() returns -1 on failurederaadt2019-06-281-2/+2
|
* uid_from_user() and gid_from_user() return -1 when indicating error,deraadt2019-06-242-6/+6
| | | | not arbitrary values < 0.
* Use the new libc uid_from_user() and gid_from_group() instead ofmillert2018-09-137-312/+25
| | | | the pax-specific functions in cache.c. OK guenther@
* Point to glob in section 7 for the actual list of special characters insteadkn2018-07-232-8/+8
| | | | | | the C API in section 3. OK millert jmc nicm, "the right idea" deraadt
* Convert snprintf+write into dprintf. It is simply easier to read, andderaadt2017-12-081-8/+3
| | | | | provides retry on short-write file descriptors. ok florian, previous versions seen by millert
* Better document what the -v flag actually does and that you canmillert2017-10-091-2/+11
| | | | specify it more than once. Adapted from a diff by and OK schwarze@
* Carefully add casts to silence clang sign-compare warnings. ok millert@otto2017-09-165-15/+16
|
* there is no offical way to get the max value of time_t, but this one worksotto2017-09-125-10/+12
| | | | | on any sensible posix system (in which time_t must be an integer type) ok deraadt@ millert@
* Backslash escapes the next character in filename patterns.guenther2017-09-101-1/+4
| | | | ok millert@
* Avoid clang warning and make code better by using a signed long;otto2017-09-081-4/+4
| | | | with hint from millert@; ok millert@ guenther@
* intvar < sizeof(...) does not catch negative values since an int -> unsignedotto2017-09-061-5/+5
| | | | | conversion is involved. Cast the sizeof to int to get a signed compare; ok deraadt@ bluhm@
* buffer increase factor belongs in the nmemb field of reallocarray()deraadt2017-03-161-2/+2
| | | | ok guenther
* switch pax to using pledge tape instead of ioctl.tb2017-03-112-5/+5
| | | | ok kettenis
* Slow down the churn and continue using old pledge name "ioctl" insteadderaadt2017-01-232-5/+5
| | | | of "tape" for a week or so.
* Split pledge "ioctl" into "tape" and "bpf", and allow SIOCGIFGROUP onlyderaadt2017-01-232-5/+5
| | | | upon "inet". Adjust the 4 programs that care about this.
* Nuke whitespace foolish enough to expose itself during the greatkrw2017-01-211-2/+2
| | | | "warning:" rectification.
* Put some variable declarations under appropriate #if/#endif protectionkrw2016-12-262-2/+6
| | | | | | so gcc doesn't complain about defining but not using them. typo correction & ok jca@
* Fix a bug where archives smaller than 512 bytes would trigger a next volumekettenis2016-12-201-2/+5
| | | | | | prompt. From NetBSD. ok millert@, deraadt@
* Need <time.h> for time() and others. Pulled in by coincidence previouslyguenther2016-08-262-2/+4
| | | | noted by tb@
* -E NONE has *never* worked; it was always -E none. It's a dubious optionguenther2016-08-262-26/+8
| | | | | value that merits a warning in the manpage and using 2 billion will get you practically the same effect, so delete the -E none support
* options.h is only used by options.c; merge it into the .c fileguenther2016-08-262-122/+83
| | | | reduce and sort #includes
* reduce and sort #includesguenther2016-08-262-14/+12
|
* tables.h is only used by tables.c; merge it into the .c fileguenther2016-08-262-170/+132
| | | | <sys/time.h> is unnecessary; sort the #includes
* <sys/time.h>, <errno.h>, and <stdlib.h> are unnecessary; sort #includesguenther2016-08-261-6/+4
|
* sel_subs.h is only used by sel_subs.c; merge it into the .c fileguenther2016-08-262-76/+38
| | | | <sys/time.h> and <unistd.h> are unnecessary, but <time.h> is; sort #includes
* pat_rep.h is only used by pat_rep.c; merge it into the .c fileguenther2016-08-262-56/+16
| | | | <sys/time.h>, <errno.h> and <unistd.h> are unnecessary; sort #includes
* ftree.h is only used by ftree.c; merge it into the .c fileguenther2016-08-262-58/+19
| | | | <sys/time.h> is unnecessary; sort #includes
* Don't need <sys/time.h> or "options.h" hereguenther2016-08-266-13/+6
|
* cache.h is only used by cache.c; merge it into the .c fileguenther2016-08-262-78/+40
| | | | | | <unistd.h> and <sys/time.h> are unneeded here ok by general acclaim
* Replace name_{uid,gid}() with the libc routines user_from_uid() andguenther2016-08-257-231/+29
| | | | | | group_from_gid(). Eliminate some superfluous strncpy() calls. ok millert@
* Make list-like output go to stderr when appending to an archive on stdout.guenther2016-08-241-20/+9
| | | | | | Simplify the recognition of -f- and TAPE=- as meaning stdin/stdout. ok millert@
* Treat cpio's -t option as a modifier to -i, so they're ordering independentguenther2016-08-241-5/+12
| | | | ok millert@
* Instead of doing strcmp(argv0), track the invocation mode (pax/tar/cpio)guenther2016-08-236-13/+19
| | | | | | in a separate variable ok deraadt@
* Only try to set the times on a directory once, at the end, to avoidguenther2016-08-231-4/+2
| | | | | | duplication of warning messages ok krw@
* Add HISTORY.schwarze2016-08-161-2/+7
| | | | | From Sevan Janiyan <venture37 at geeklan dot co dot uk>. Verified using the CSRG archive CD.
* Remove many unnecessary casts. Verified by comparing generated code onguenther2016-08-146-132/+111
| | | | | | both ILP32 and LP64. ok millert@
* Replace u_quad_t with unsigned long long and replace "uqd" with "ull" inguenther2016-08-145-60/+66
| | | | | | | function names to match. Pull some tangled assignments out of conditions and use >>= where possible. ok millert@
* allow creation of devices or fifo without -p (as it is already allowed with -p)semarie2016-06-231-3/+3
| | | | | | diff from trondd at kagu-tsuchi com, enhanced by me for reordering promises ok deraadt@
* new style overlords say to use continue in empty loops.tedu2016-06-032-5/+5
| | | | | this is easier to see and self documenting. ok openbsd
* Switch from fgetln() to getline() to simplify error handling.guenther2016-04-191-42/+41
| | | | | | | | Use syswarn() in more places which set errno and regularize the error messages. Skip empty lines in the input read for tar -T, cpio -E, and cpio stdin. based on diff from mmcc@ ok millert@
* Ignore trailing slashes and skip over duplicate slashes in chk_path() toguenther2016-02-161-4/+18
| | | | | | | avoid infinite loop when creating intermediate directories Fix based on diff by Nicolas Bedos (nicolas.bedos (at) gmail.com) ok millert@ ok and tweak zhuk@,
* To archive a 101 character absolute path in ustar format we mustguenther2016-02-151-7/+14
| | | | | | | split it on a slash other than the leading one. Fix based on patches from Peter Fokker (openbsd (at) berestijn.nl) and Peter Bisroev (peter (at) int19h.net)
* don't declar main. from Michal Mazurektedu2016-01-011-2/+1
|
* More adress -> addressmmcc2015-12-241-2/+2
|
* Replace "tame" by "pledge" in a comment.tb2015-12-161-2/+2
|