summaryrefslogtreecommitdiff
path: root/bin
AgeCommit message (Collapse)Author
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-10-27No need for <sys/uio.h> as writev(2) isn't used any more.Jeremie Courreges-Anglas
2019-10-27Don't fail hard if we can't preallocate history storage.Jeremie Courreges-Anglas
Using alloc.c for the history array brings no value and prevents easy handling of memory shortage. Switch to plain reallocarray and keep running if HISTSIZE is too big. The allocation is still done upfront with no sanity checking, it would probably be nicer to allocate space as needed. Issue reported by thomas@habets.se who suggested a different approach.
2019-09-06More Version 1 AT&T UNIX history.Ingo Schwarze
This became possible because copies of the original v1 manuals have shown up on the Internet some time ago. Reminded by Sevan Janiyan <venture37 at geeklan dot co dot uk>.
2019-09-05Document pledge keywordkn
OK millert
2019-09-02More correction of section 3 layout. directory->opendir, fts->fts_open,Theo de Raadt
getcap->cgetent. pwcache->user_from_uid. And then repair references. ok jmc
2019-08-08date(1): remove -d dst and -t minutes_westcheloha
Part of the kernel timezone removal effort. With input from deraadt@ and tedu@. "burn it!" mpi@, ok tedu@ deraadt@
2019-07-30In addresses, consistently use "+" rather than ".+1".Ingo Schwarze
Both have the same meaning, but the former is explicitly defined in this manual page as "the next line" whereas the latter requires combining various pieces of information for understanding. Unification suggested and patch OK'ed by martijn@.
2019-07-29Remove several .Xrs to section 2 and 3 that help little.Ingo Schwarze
Instead, link to the explanation of octal permission masks in chmod(2) directly from the description of "umask", and to ksh(1) from SEE ALSO. Fixing an oddity pointed out by guenther@; OK jmc@ millert@.
2019-07-26Replace cross-references to sigvec(3) with sigaction(2).Todd C. Miller
OK guenther@
2019-07-25tweak previous: a leading dash can only be given if an option letter follows;Ingo Schwarze
OK deraadt@
2019-07-24Years ago the optionality of leading - was removed. dash-less is aTheo de Raadt
fact on the ground in ps everywhere, even on linux, and it is not going to go away, and denying the existance is pointless. The SYNOPSIS cannot proscriptively document all the cases without a madness. I also feel there is very little need to explain the behaviour differences relative to the sparse POSIX standard for ps, everyone's ps has oodles of extensions.
2019-07-24Add #include <stdlib.h> for mkstemp.Brian Callahan
Spotted by maya@netbsd ok deraadt@
2019-07-201. Correct the description of the g command to match POSIX and ourIngo Schwarze
implementation; it was oversimplified and arguably incorrect. 2. Explicitely compare the behaviour of empty command lists for g, empty command lists for G, and empty commands because these subtle differences are quite confusing. 3. Say more precisely what the v and V commands do, avoiding the fuzzy wording "similar". All these issues were first pointed out by martijn@. Feedback and OK martijn@; "diff reads ok" jmc@ on an earlier version.
2019-07-15Explain in which circumstances trailing slashes can be omitted afterIngo Schwarze
the g and G commands, and polish the wording a bit explaining empty command lists. Closing a gap in the manual reported by <mazocomp at disroot dot org>. OK jmc@ martijn@
2019-07-12Minor polishing:Ingo Schwarze
* Delete a stray blank from the command line synopsis and add the missing .Ar markup to it. * Do not mention the terminating newline for the empty command since it isn't mentioned for any other command either. * Make the description of the empty command easier to understand. Joint work with martijn@ and jmc@.
2019-07-10document the dropping of the second / and ? in line address REs;Jason McIntyre
thread started by mazocomp; diff from ropers, shortened by me; ok martijn schwarze
2019-07-03snprintf/vsnprintf return < 0 on error, rather than -1.Theo de Raadt
2019-07-01sleep(1): simplify argument parsingcheloha
- No need for intermediate variables, just build the timespec directly - Use for-loops so we modify "cp" on a single line in each loop - Parse subseconds with one loop: less code, easier to read, etc. - Improve the subsecond parsing comment: make our intent really obvious ok schwarze@
2019-06-28fputc returns EOFTheo de Raadt
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-27Some asprintf() calls were checked < 0, rather than the precise == -1.Theo de Raadt
ok millert nicm tb, etc
2019-06-27Be precise in checking for errors. pclose(3) returns -1 and fclose(3)Florian Obser
EOF in case of errors, not any negative number. EOF corner case spotted while reviewing a much bigger diff by deraadt OK deraadt, millert
2019-06-24Fix spellingJeremie Courreges-Anglas
2019-06-24Partial revert of rev. 1.151:Ingo Schwarze
Reference the First Edition (1989) of Bolsky/Korn which is about ksh88, the shell the OpenBSD ksh(1) descends from (via pdksh). The Second Edition (1995) of the book is about ksh93 which we don't provide. Pointed out by Andras Farkas on bugs@.
2019-06-24uid_from_user() and gid_from_user() return -1 when indicating error,Theo de Raadt
not arbitrary values < 0.
2019-06-23sort previous; ok deraadtJason McIntyre
2019-06-23add "ps -o pledge" option, which prints a comma-seperated list of pledgesTheo de Raadt
active on each process. So go forth and "ps agux -o pledge" to find pledges which can be improved. (I hesitated adding this before because I am afraid of people enforcing extra-strict pledge in programs without testing all the use cases -- thereby breaking software).
2019-06-23Export unveil state so that ps(8) can show it. Two new status flags,Theo de Raadt
you'll see one, or neither. 'u' - process installed unveils, but not yet locked with unveil(0,0) or pledge w/o "unveil" 'U' - process has installed unveils, and locked. ok rob
2019-06-21zap trailing whitespace;Jason McIntyre
2019-06-19Allow string greater/less than than operators to work with test aka [.Todd C. Miller
Previously they were only recognized in [[ ... ]] expressions. This changes sh/ksh to be consistent with test(1) as well as shells like bash and dash. OK jca@ jmc@
2019-06-02In manpages, don't escape apostrophes as \'; it's rarely what you want.Anthony J. Bentley
Most of these are correct just as '. A few benefit from Ql or \(aq. But if in doubt, just use '.
2019-05-22mention that using vi command line editing mode requires enabling it;Ingo Schwarze
omission reported by Rudolf Sykora <rsykora at disroot dot org> on misc@; tweak and OK jmc@
2019-05-18freezero() is of no use here, the computed digest is not a secret.Otto Moerbeek
ok millert@
2019-04-03Bind ^L (C-l) to clear-screen instead of redrawJeremie Courreges-Anglas
Slightly more useful for some, same defaults as bash. No objection deraadt@ phessler@, ok tb@ kn@ benno@
2019-03-24detect -t argument being too long, rather than truncatingTheo de Raadt
2019-03-2416 chars is not enough for the maximum reach major() and minor()Theo de Raadt
could have, so let's formally expand the buffer to what it needs to be.
2019-02-20When evaluating an arithmetical expression, for example inside $(()),Ingo Schwarze
never do substitution (neither parameter, nor command, nor arithmetic, nor tilde substitution) on the values of any variables encountered inside the expression, but do recursively perform arithmetical evaluation of subexpressions as required. This makes behaviour more consistent, without hindering any behaviour promised in the manual page. A quirk originally reported by Andy Chu <andychup at gmail dot com> was that in the past, when encountering an array index, the shell would not only do evaluation, but also substitution on the array index, even though substitution would not be done on the expression in general. tobias@ contributed to initial efforts of understanding the quirk. patch tested in a bulk build by naddy@ "please commit" deraadt@
2019-02-16add fsync to STANDARDS;Jason McIntyre
2019-02-16Implement the conv=fsync feature which does an fsync(2) after theAlexander Bluhm
final write to output. GNU dd also has this. It is useful for write performance measurement or guaranteed writes to reliable storage. OK kn@ tedu@ deraadt@
2019-02-13(unsigned) means (unsigned int) which on ptrdiff_t or size_t or otherTheo de Raadt
larger types really is a range reduction... Almost any cast to (unsigned) is a bug. ok millert tb benno
2019-02-05Let ps(1) work in single user mode where /var/run does not exist.Florian Obser
Give the same treatment if /dev doesn't exist. While things will be real interesting without /dev there is no reason to stop ps(1). Fix suggested by & OK deraadt OK millert
2019-02-05dev_t is signed to permit passing -1 as an invalid condition, but theTheo de Raadt
decomposition into major and minor is unsigned, so we should print them with %u instead of %d. ok guenther
2019-01-28Implement cp -a ("archive" mode)Jeremie Courreges-Anglas
Not standard, but supported at least by GNU cp, IllumOS, NetBSD, FreeBSD, DragonflyBSD. No need to be gratuitously different. This should also allow us to drop patches in ~10 ports. Based on an initial diff by benno@ with input from sthen@ and jmc@ ok benno@ danj@ sthen@ martijn@ deraadt@
2019-01-25I am retiring my old email address; replace it with my OpenBSD one.Todd C. Miller
2019-01-22Add file # and block # to the information "mt status" shows.Kenneth R Westerback
diff from Oscar Endre Edvardsen via misc@ a long time ago. ok sthen@ dlg@
2019-01-22-p got changed to -f;Jason McIntyre
2019-01-21add a -f pformat flag to parse the given time with strptime.Ted Unangst
2019-01-14Fix three more buglets:Ingo Schwarze
1. Another off-by-one: if a mail file name ends in an (escaped) percent sign, do not forget to check whether the next byte is the percent sign introducing the message (MAILPATH='filename\%%msg'). 2. If the message is empty, use the default message rather than printing a blank line (MAILPATH='filename%'). 3. If the file name is empty, don't bother with mballoc(): the subsequent stat(2) can never succeed. (MAILPATH='%msg'). Found while reviewing the previous commit by tedu@. OK tedu@.