summaryrefslogtreecommitdiff
path: root/bin
AgeCommit message (Collapse)Author
2015-03-19Use struct timespec internally. This gives nanosecond precision to pax -rwPhilip Guenther
and a basis for support of mtime and atime values in pax-format extended header records. ok millert@
2015-03-18remove ambiguity from the COMMANDS section, after discussion with zhuk;Jason McIntyre
2015-03-18from zhuk: a little more info on <>Jason McIntyre
2015-03-18improve the description of here documents; prompted by zhukJason McIntyre
2015-03-18rework the redirection text after some feedback from zhuk;Jason McIntyre
2015-03-18not necessary to work around an apparent bug on ancient freebsdTed Unangst
2015-03-17Eliminate use of TM_YEAR_BASE. OK guenther@ deraadt@ miod@Todd C. Miller
2015-03-17revert a previous word change - the original seems more accurate;Jason McIntyre
2015-03-17Escape certain characters for slightly more correct (and prettier) output.Anthony J. Bentley
ok jmc@
2015-03-17from zhuk: provide some SxJason McIntyre
2015-03-17from zhuk: shell does not wait for command to complete if job run in backgroundJason McIntyre
2015-03-17Add PAX_IS_{REG,HARDLINK,LINK} macros to simply many file type testsPhilip Guenther
ok millert@
2015-03-16from zhuk: be clear that "#" is a variableJason McIntyre
2015-03-15from zhuk: two grammar fixes;Jason McIntyre
2015-03-15from zhuk: clarify "set --";Jason McIntyre
2015-03-15Define chdname once in a .c and make it extern in the .hPhilip Guenther
2015-03-15Handle tar -o by setting the tar_nodir directly instead of faking up aPhilip Guenther
pax-like -o write_opt=nodir. ok millert@ otto@
2015-03-15from zhuk: remove ambiguity around the false/true description;Jason McIntyre
2015-03-15from zhuk: paths not beginning dot (as well as slash) use CDPATH;Jason McIntyre
2015-03-15from zhuk: remove ambiguity in the description of "continue";Jason McIntyre
2015-03-15from zhuk: the dash part of "cd -" is not a flag, so don;t show it as such;Jason McIntyre
posix actually uses a separate synopsis to show this form, but i've chosen to show it as a special form of "dir";
2015-03-15Using O_TRUNC with O_CREAT|O_EXCL is just confusing: fail if it exists,Philip Guenther
but if you *did* succeed anyway, truncate it?
2015-03-15pax -o only accepts 'write_opt=nodir' and not bare 'nodir'Philip Guenther
2015-03-15tzfile.h is an internal header that should never have been installed.Todd C. Miller
What's worse, the tzfile.h that gets installed is over 20 years old and doesn't match the real tzfile.h in libc/time. This makes the tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE define has been moved to time.h temporarily until its usage is replaced by 1900 in the tree. Actual removal of tzfile.h is pending a ports build. Based on a diff from deraadt@
2015-03-14from zhuk: be clearer about not all options having long name equivalents andJason McIntyre
lowercase the first letter of these names since that is the form accepted;
2015-03-14rewrite of sh(1). this page tries to confine itself to document featuresJason McIntyre
supported by posix compliant shells (obviously ksh(1) still documents the works). still needs work, so please do mail me diffs or feedback;
2015-03-13remove the first comma from constructs like ", and," and ", or,": you can useJason McIntyre
"and" and "or" to join sentence clauses, and you can use commas, but both hinders reading;
2015-03-12Escape ! characters for tab-completion, required for "set -o csh-history" users.Stuart Henderson
Tweak to maintain ascii ordering suggested by Simon Nicolussi. OK halex@
2015-03-12If an archive isn't a recognized type, then check whether it looksPhilip Guenther
like compress, gzip, bzip2, or xz output. If so then error out with a useful message directing the user to the correct option and error out instead of scanning forward for an embedded tar/cpio header. wording help from sobrado@ ok millert@ deraadt@
2015-03-09Fix comment grammarPhilip Guenther
2015-03-09Unrevert post-unlock:Philip Guenther
* Prevent an archive from esacaping the current directory by itself: when extracting a symlink whose value is absolute or contains ".." components, just create a zero-length normal file (with additional tracking of the mode and hardlinks to the symlink) until everything else is extracted, then go back and replace it with the requested link (if it's still that zero-length placeholder). * For tar without -P, if a path in the archive has any ".." components then strip everything up to and including the last of them (if it ends in ".." then it becomes ".") This mostly follows GNU tar's behavior, except for 'tar tf' and 'tar xvf' we report the modified path that would be/was actually created instead of the raw path from the archive Above two fixes prompted by a report from Daniel Cegielka (daniel.cegielka (at) gmail.com) * For directories whose times or mode will be fixed up in the clean-up pass, record their dev+ino and then use open(O_DIRECTORY)+fstat() to verify that we're updating the correct directory before using futimens() and fchmod(). * Correct buffer overflow in handling of pax extension headers, caught by the memcpy() overlap check. previously ok millert@ deraadt@
2015-03-01Avoid SIGFPE when parsing an invalid ext2fs through a raw device operation.Tobias Stoeckmann
ok millert
2015-02-28Reduce usage of predefined strings in manpages.Anthony J. Bentley
Predefined strings are not very portable across troff implementations, and they make the source much harder to read. Usually the intended character can be written directly. No output changes, except for two instances where the incorrect escape was used in the first place. tweaks + ok schwarze@
2015-02-21Recent changes haven't been completely stable, so revert for the 5.7 releasePhilip Guenther
requested by deraadt@
2015-02-16bcmp to memcmpTed Unangst
2015-02-15Fix two bugs. The first affected tar files with the sameTodd C. Miller
directory listed twice with nothing created inside the directory in between the two instances of the directory. The other fixes extracting symlinks when the -C option is used. From guenther@ OK krw@
2015-02-15-a is documentedTed Unangst
2015-02-12Prevent an archive from esacaping the current directory by itself:Philip Guenther
when extracting a symlink whose value is absolute or contains ".." components, just create a zero-length normal file (with additional tracking of the mode and hardlinks to the symlink) until everything else is extracted, then go back and replace it with the requested link (if its still that zero-length placeholder). This and previous symlink and ".." path fixes prompted by a report from Daniel Cegielka (daniel.cegielka (at) gmail.com) ok millert@
2015-02-12For tar without -P, if a path in the archive has any ".." components thenPhilip Guenther
strip everything up to and including the last of them (if it ends in ".." then it becomes ".") This mostly follows GNU tar's behavior, except for 'tar tf' and 'tar xvf' we report the modified path that was actually created instead of the raw path from the archive ok w/tweak millert@, deraadt@
2015-02-12Put the dev+ino table for cpio hardlink matching behind #ifndef NOCPIOPhilip Guenther
ok millert@ deraadt@
2015-02-11Take II, this time without an incorrect mode test.Philip Guenther
For directories whose times or mode will be fixed up in the clean-up pass, record their dev+ino and then use open(O_DIRECTORY)+fstat() to verify that we're updating the correct directory before using futimens() and fchmod(). ok sthen@ millert@
2015-02-11use strtonum for ispeed & ospeed, rejecting those numbers.Theo de Raadt
2015-02-11Document P_CANTSLEEPPhilip Guenther
2015-02-09If we hit multiple errors while unwinding we'll end up running code thatJonathan Gray
assumes a pointer is valid when it has been free'd. This is convoluted as ksh has it's own allocator and uses long jumps. Set the pointer to NULL after the quitenv() call in unwind() in case we later hit a long jump in unwind(). Found with afl a while back. ok tedu@ deraadt@
2015-02-08delete tons more castsTed Unangst
2015-02-08remove ptr_t typedef. void * is good enough for csh.Ted Unangst
2015-02-08delete many more ptr_t castsTed Unangst
2015-02-08delete lots of unnecessary ptr_t casts, and drop a little NULL in as wellTed Unangst
2015-02-08it's safe to call free with nullTed Unangst
2015-02-07When getopt processing flags, many should be flag=1 instead of flag++Theo de Raadt
ok tedu miod