Age | Commit message (Collapse) | Author |
|
Mixing up function and void pointers isn't defined by POSIX or the
C standard. POSIX only specifies that casting the result of dlsym(3) to
an appropriate function pointer works.
Avoid all this by using a typedef.
from Michael Forney, ok tb@
|
|
show a less confusing track
okay millert@ (with a small tweak to the error message by millert@)
|
|
- Sort includes alphabetically
- Sort prototypes alphabetically
- Sort stack variables by size
- Add missing braces to the getopt(3) loop
- Be explicit: there is *one* argument, so use argv[0], not *argv
- If nanosleep(2) somehow fails, say that "nanosleep" failed when
we err(3)
- Remove extra parentheses from the return statement
- De-(void) the obvious fprintf(3) in usage()
- __progname -> getprogname(3)
- POSIX 1003.2 has long since become POSIX.1
- Remove an ARGUSED linter comment
- stdio(3) flushing is not the only potential issue with an exit(3)
from a signal handler. Just note that exit(3) isn't safe and leave
it at that.
|
|
the environment at shell initialization time. During startup, ksh calls
'eval typeset -i TMOUT="${TMOUT:-0}"'. which allows command injection via
arithmetic expansion, e.g., by setting TMOUT to 'x[`/bin/echo Hi >&2`]'.
Problem noted by Andras Farkas and tj, inspired by a similar issue in
AT&T's ksh. Tested in snaps for two weeks.
"go for it" deraadt
|
|
|
|
and make some wordings more concise.
Parts of a patch from Jan Stary <hans at stare dot cz>, tweaked by me.
Feedback and OK jmc@.
|
|
manual pages that document the corresponding configuration files;
OK jmc@, and general direction discussed with many
|
|
|
|
Fluff noticed by jsg@.
|
|
Change several instances, most of them to the usual -width Ds.
|
|
Adapt substitute test to new ed(1) behavior. Note that substitute
result from sed(1) is still different.
|
|
Adapt ed test.
|
|
Adapt ed test.
|
|
KERN_PROC_SHOW_THREADS and have been rendered superfluous by it.
Similarly, some P_SYSTEM tests can be deleted or pushed to the
kernel by using KERN_PROC_ALL instead of KERN_PROC_KTHREAD.
ok visa@ mpi@
|
|
ok deraadt@
|
|
from chohag
|
|
if not already set. This makes "cpio -Hustar -o" behave the same as
"cpio -o -Hustar". ok guenther@
|
|
|
|
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.
|
|
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>.
|
|
OK millert
|
|
getcap->cgetent. pwcache->user_from_uid. And then repair references.
ok jmc
|
|
Part of the kernel timezone removal effort.
With input from deraadt@ and tedu@.
"burn it!" mpi@, ok tedu@ deraadt@
|
|
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@.
|
|
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@.
|
|
OK guenther@
|
|
OK deraadt@
|
|
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.
|
|
Spotted by maya@netbsd
ok deraadt@
|
|
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.
|
|
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@
|
|
* 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@.
|
|
thread started by mazocomp; diff from ropers, shortened by me;
ok martijn schwarze
|
|
|
|
- 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@
|
|
|
|
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.
|
|
|
|
ok millert nicm tb, etc
|
|
EOF in case of errors, not any negative number.
EOF corner case spotted while reviewing a much bigger diff by deraadt
OK deraadt, millert
|
|
|
|
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@.
|
|
not arbitrary values < 0.
|
|
|
|
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).
|
|
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
|
|
|
|
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@
|
|
Most of these are correct just as '. A few benefit from Ql or \(aq.
But if in doubt, just use '.
|
|
omission reported by Rudolf Sykora <rsykora at disroot dot org> on misc@;
tweak and OK jmc@
|