summaryrefslogtreecommitdiff
path: root/usr.bin
AgeCommit message (Collapse)Author
2015-10-20In order to become able to generate syntax tree nodes on the roff(7)Ingo Schwarze
level, validation must be separated from parsing and rewinding. This first big step moves calling of the mdoc(7) post_*() functions out of the parser loop into their own mdoc_validate() pass, while using a new mdoc_state() module to make syntax tree state handling available to both the parser loop and the validation pass.
2015-10-19style cleanup, no functional changeIngo Schwarze
2015-10-19Simplify, no functional change:Ingo Schwarze
Delete the outmdoc, outman, and outfree function pointers.
2015-10-19including <ohash.h> requires including <stdint.h> beforehand;Ingo Schwarze
noticed by Svyatoslav Mishyn <juef at openmailbox dot org>
2015-10-19pledge "stdio exec proc" early on, setpriority, then pledge "stdio exec"Theo de Raadt
from Theo Buehler
2015-10-18pledge bgplg(8).Sebastian Benoit
ok deraadt
2015-10-18Pass current directory as a string rather than a file descriptor becauseNicholas Marriott
pledge doesn't let us pass directory file descriptors.
2015-10-18Use "getpw" rather than "flock", per deraadt@'s suggestion.Miod Vallat
2015-10-18pledge+=flock, for /var/run/ypbind.lock. ok semarie@Miod Vallat
2015-10-18Do not warn for sort -o if we can't chown the output temporary fileTodd C. Miller
to match the owner of the output file.
2015-10-18Use offsetof() instead of adding the sizes of the preceeding struct membersPhilip Guenther
ok millert@
2015-10-18sorry, sdiff -o interactive mode does another spawnTheo de Raadt
2015-10-18Add "dns" to the pledges. Previously these worked because of "inet",Theo de Raadt
alas "dns" is now a mandatory statement if you want to do dns!
2015-10-18unrelated commit; not ready yetTheo de Raadt
2015-10-18First casualty of making pledge "dns" mandatory for dns users.Theo de Raadt
"dns" was missing, and this was relying on "inet" support..
2015-10-18A whole buncha unsigned char casts for ctype function arguments.mmcc
ok guenther@
2015-10-18Describe dnssocket / dnsconnect argumentsTheo de Raadt
2015-10-17Tighten pledge: We only write to stdio and never to any files ifChristian Weisgerber
in cat mode (-c, zcat), or in test mode (-t), or if there are no file arguments and there is no -o outfile. Due to fts(3) we require rpath even for compress <in >out. "seems sound" deraadt@
2015-10-17remove some unneccessary macros; from michael reedJason McIntyre
2015-10-17Add pledge "stdio unix sendfd proc exec tty" to tmux client process,Nicholas Marriott
"sendfd" is dropped after first message from the server.
2015-10-17Exit if a pledge call fails in non-interactive mode.Doug Hogan
ok semarie@
2015-10-17Pledge; OK millert@ tobias@Tim van der Molen
2015-10-17add "tty" for several subcommands of opensslSebastien Marie
it is needed in order to let libssl UI_* function plays with echo on/off when asking for password on terminal. passwd subcommand needs additionnal "wpath cpath" in order to let it calls fopen("/dev/tty", "w") (O_WRONLY with O_CREAT | O_TRUNC). problem reported by several with and ok doug@
2015-10-17The file(1) magic-parsing process was using pledge "stdio getpw proc recvfd"Theo de Raadt
early on, then a set of getpwnam/setresuid/... before quickly dropping to "stdio recvfd". It receives fd's and runs the magic code on them in a chroot'd "stdio" jail. We can do better than that. Before the recent change, "proc" contained both the concepts of "forking" and "setuid". "id" is now split out as a seperate request, and it is exactly what this process needs momentarily. So this loses another window of opportunity, in case we have a major bug in .... hmm, it'd have to be in getpwnam.... ok tedu doug semarie gilles
2015-10-17Very tricky diff to fix macro interpretation and spacing around tabsIngo Schwarze
in .Bl -column; it took me more than a day to get this right. Triggered by a loosely related bug report from tim@. The lesson for you is: Use .Ta macros in .Bl -column, avoid tabs, or you are in for surprises: The last word before a tab is not interpreted as a macro (unless there is a blank in between), the first word after a tab isn't either (unless there is a blank in between), and a blank after a tab causes a leading blank in the respective output cell. Yes, "blank", "tab", "blank tab" and "tab blank" all have different semantics; if you write code relying on that, good luck maintaining it afterwards...
2015-10-16increase the minimum modulus that we will send or accept inDamien Miller
diffie-hellman-group-exchange to 2048 bits; ok markus@
2015-10-16Once apropos(1) or man(1) are done with database access, or if theIngo Schwarze
program was called as mandoc(1) in the first place, remove "flock" from our pledge(2) before entering the parsers and formatters. OK millert@ deraadt@
2015-10-16better handle anchored FQDNs (e.g. 'cvs.openbsd.org.') in hostnameDamien Miller
canonicalisation - treat them as already canonical and remove the trailing '.' before matching ssh_config; ok markus@
2015-10-16Cast isspace() argument to unsigned char.mmcc
ok jca@
2015-10-16Modernize allocation by:mmcc
* removing unneeded casts of void* return values * replacing varied and creative error messages with the allocation function's name * replacing errx() with err() so that the errno string is reported ok beck@, jung@, millert@
2015-10-160 -> NULL when comparing with a char*.mmcc
ok dtucker@, djm@.
2015-10-16Implement real "flock" request and add it to userland programs thatTodd C. Miller
use pledge and file locking. OK deraadt@
2015-10-16Don't free after calling paste_set but do after evbuffer_add, from TheoNicholas Marriott
Buehler.
2015-10-16Add native support for ed-style diffs. No need to pledge "proc exec" anymore.Tobias Stoeckmann
ok deraadt
2015-10-16doug and I think the kernel has enough features to supportTheo de Raadt
pledge "stdio rpath wpath cpath getpw proc exec tty" now. It will be hard to drop many of those features unless cu becomes privsep for the "upload" commands.
2015-10-16Pledge for ftp(1) in non-interactive mode.Doug Hogan
We will iterate and remove some of the pledges in the future. This is conservative for now. Tested by sthen@ and myself. ok deraadt@
2015-10-15fix some signed/unsigned integer type mismatches in formatDamien Miller
strings; reported by Nicholas Lemonias
2015-10-15Do not abuse .Nm for emphasis;Ingo Schwarze
patch from Michael Reed <m dot reed at mykolab dot com>. Also drop .Tn while here.
2015-10-15Delete two preprocessor constants that are no longer used.Ingo Schwarze
Patch from Michael Reed <m dot reed at mykolab dot com>.
2015-10-15argument to sshkey_from_private() and sshkey_demote() can't be NULLDamien Miller
2015-10-15After spawning, the parent can pledge "stdio rpath wpath cpath"Theo de Raadt
from rob pierce
2015-10-15Simplify the part of args() that is handling .Bl -column phrases:Ingo Schwarze
Delete manual "Ta" handling because macro handling should not be done in an argument parser but should be left to the macro parsers, which exist anyway and work well. No functional change, minus 40 lines of code. Confusing and redundant code found while investigating an old bug report from tim@.
2015-10-15When blk_full() handles an .It line in .Bl -column and indirectlyIngo Schwarze
calls phrase_ta() to handle a .Ta child macro, advance the body pointer accordingly, such that a subsequent tab character rewinds the right body block and doesn't fail an assertion. That happened when there was nothing between the .Ta and the tab character. Bug reported by tim@ some time ago.
2015-10-15Avoid a race between fopen(3) and fchmod(2). Use umask(2) andAlexander Bluhm
unlink(2) and fopen(3) to prevent an attacker to open an old file with wrong permissions before the secret is written into it. This also guarantees that a new file with correct permissions is created. Without fchmod(2) "fattr" can be removed from pledge. with and OK deraadt@
2015-10-15Plegde x99token with "stdio rpath wpath cpath fattr getpw tty".Alexander Bluhm
with and OK deraadt@
2015-10-15Cast arguments of ctype functions to Char, a lexism defined as unsignedmmcc
char. Part of a larger attempt to audit ctype function argument types with Coccinelle. ok deraadt@
2015-10-15lock needs pledge(proc exec) to use bsd auth system. from tronddTed Unangst
2015-10-14Copy permissions AND ownership when -o will override an input file.Tobias Stoeckmann
with input by and ok deraadt@, millert@, tim@
2015-10-14gc lst_ForEachNodeWhile, which isn't actually in use anywhereMarc Espie
2015-10-14make sure we use stdbool.hMarc Espie
Mostly diff by Daniel Dickman, who told me to commit in his stead, as he's tied up at work.