summaryrefslogtreecommitdiff
path: root/bin/pax
AgeCommit message (Collapse)Author
2020-10-05-f - can respresent both stdin and stdout; rework the text a littleJason McIntyre
to make it read better; reported by roderick ok millert
2020-03-23in case we can't create intermediate directories because of permissions,Marc Espie
show a less confusing track okay millert@ (with a small tweak to the error message by millert@)
2020-01-16Usually, -width Fl (which is 10n) is too wide and hence ugly.Ingo Schwarze
Change several instances, most of them to the usual -width Ds.
2019-11-15In cpio mode, when processing the -o switch, only set the archive formatChristian Weisgerber
if not already set. This makes "cpio -Hustar -o" behave the same as "cpio -o -Hustar". ok guenther@
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
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.
2019-06-28mkstemp() returns -1 on failureTheo de Raadt
2019-06-24uid_from_user() and gid_from_user() return -1 when indicating error,Theo de Raadt
not arbitrary values < 0.
2018-09-13Use the new libc uid_from_user() and gid_from_group() instead ofTodd C. Miller
the pax-specific functions in cache.c. OK guenther@
2018-07-23Point to glob in section 7 for the actual list of special characters insteadkn
the C API in section 3. OK millert jmc nicm, "the right idea" deraadt
2017-12-08Convert snprintf+write into dprintf. It is simply easier to read, andTheo de Raadt
provides retry on short-write file descriptors. ok florian, previous versions seen by millert
2017-10-09Better document what the -v flag actually does and that you canTodd C. Miller
specify it more than once. Adapted from a diff by and OK schwarze@
2017-09-16Carefully add casts to silence clang sign-compare warnings. ok millert@Otto Moerbeek
2017-09-12there is no offical way to get the max value of time_t, but this one worksOtto Moerbeek
on any sensible posix system (in which time_t must be an integer type) ok deraadt@ millert@
2017-09-10Backslash escapes the next character in filename patterns.Philip Guenther
ok millert@
2017-09-08Avoid clang warning and make code better by using a signed long;Otto Moerbeek
with hint from millert@; ok millert@ guenther@
2017-09-06intvar < sizeof(...) does not catch negative values since an int -> unsignedOtto Moerbeek
conversion is involved. Cast the sizeof to int to get a signed compare; ok deraadt@ bluhm@
2017-03-16buffer increase factor belongs in the nmemb field of reallocarray()Theo de Raadt
ok guenther
2017-03-11switch pax to using pledge tape instead of ioctl.Theo Buehler
ok kettenis
2017-01-23Slow down the churn and continue using old pledge name "ioctl" insteadTheo de Raadt
of "tape" for a week or so.
2017-01-23Split pledge "ioctl" into "tape" and "bpf", and allow SIOCGIFGROUP onlyTheo de Raadt
upon "inet". Adjust the 4 programs that care about this.
2017-01-21Nuke whitespace foolish enough to expose itself during the greatKenneth R Westerback
"warning:" rectification.
2016-12-26Put some variable declarations under appropriate #if/#endif protectionKenneth R Westerback
so gcc doesn't complain about defining but not using them. typo correction & ok jca@
2016-12-20Fix a bug where archives smaller than 512 bytes would trigger a next volumeMark Kettenis
prompt. From NetBSD. ok millert@, deraadt@
2016-08-26Need <time.h> for time() and others. Pulled in by coincidence previouslyPhilip Guenther
noted by tb@
2016-08-26-E NONE has *never* worked; it was always -E none. It's a dubious optionPhilip Guenther
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
2016-08-26options.h is only used by options.c; merge it into the .c filePhilip Guenther
reduce and sort #includes
2016-08-26reduce and sort #includesPhilip Guenther
2016-08-26tables.h is only used by tables.c; merge it into the .c filePhilip Guenther
<sys/time.h> is unnecessary; sort the #includes
2016-08-26<sys/time.h>, <errno.h>, and <stdlib.h> are unnecessary; sort #includesPhilip Guenther
2016-08-26sel_subs.h is only used by sel_subs.c; merge it into the .c filePhilip Guenther
<sys/time.h> and <unistd.h> are unnecessary, but <time.h> is; sort #includes
2016-08-26pat_rep.h is only used by pat_rep.c; merge it into the .c filePhilip Guenther
<sys/time.h>, <errno.h> and <unistd.h> are unnecessary; sort #includes
2016-08-26ftree.h is only used by ftree.c; merge it into the .c filePhilip Guenther
<sys/time.h> is unnecessary; sort #includes
2016-08-26Don't need <sys/time.h> or "options.h" herePhilip Guenther
2016-08-26cache.h is only used by cache.c; merge it into the .c filePhilip Guenther
<unistd.h> and <sys/time.h> are unneeded here ok by general acclaim
2016-08-25Replace name_{uid,gid}() with the libc routines user_from_uid() andPhilip Guenther
group_from_gid(). Eliminate some superfluous strncpy() calls. ok millert@
2016-08-24Make list-like output go to stderr when appending to an archive on stdout.Philip Guenther
Simplify the recognition of -f- and TAPE=- as meaning stdin/stdout. ok millert@
2016-08-24Treat cpio's -t option as a modifier to -i, so they're ordering independentPhilip Guenther
ok millert@
2016-08-23Instead of doing strcmp(argv0), track the invocation mode (pax/tar/cpio)Philip Guenther
in a separate variable ok deraadt@
2016-08-23Only try to set the times on a directory once, at the end, to avoidPhilip Guenther
duplication of warning messages ok krw@
2016-08-16Add HISTORY.Ingo Schwarze
From Sevan Janiyan <venture37 at geeklan dot co dot uk>. Verified using the CSRG archive CD.
2016-08-14Remove many unnecessary casts. Verified by comparing generated code onPhilip Guenther
both ILP32 and LP64. ok millert@
2016-08-14Replace u_quad_t with unsigned long long and replace "uqd" with "ull" inPhilip Guenther
function names to match. Pull some tangled assignments out of conditions and use >>= where possible. ok millert@
2016-06-23allow creation of devices or fifo without -p (as it is already allowed with -p)Sebastien Marie
diff from trondd at kagu-tsuchi com, enhanced by me for reordering promises ok deraadt@
2016-06-03new style overlords say to use continue in empty loops.Ted Unangst
this is easier to see and self documenting. ok openbsd
2016-04-19Switch from fgetln() to getline() to simplify error handling.Philip Guenther
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@
2016-02-16Ignore trailing slashes and skip over duplicate slashes in chk_path() toPhilip Guenther
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@,
2016-02-15To archive a 101 character absolute path in ustar format we mustPhilip Guenther
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)
2016-01-01don't declar main. from Michal MazurekTed Unangst
2015-12-24More adress -> addressmmcc
2015-12-16Replace "tame" by "pledge" in a comment.tb