openbsd
9 years agoRemove pointless uses of DECLARE_ASN1_ENCODE_FUNCTIONS_const.
jsing [Fri, 16 Oct 2015 15:09:28 +0000 (15:09 +0000)]
Remove pointless uses of DECLARE_ASN1_ENCODE_FUNCTIONS_const.

DECLARE_ASN1_FUNCTIONS_const already includes this macro so using both
means we end up with duplicate function prototypes and externs.

9 years agowrap a long line
deraadt [Fri, 16 Oct 2015 14:45:16 +0000 (14:45 +0000)]
wrap a long line

9 years agoFix use of pointer value after BIO_free, and remove senseless NULL checks.
beck [Fri, 16 Oct 2015 14:23:22 +0000 (14:23 +0000)]
Fix use of pointer value after BIO_free, and remove senseless NULL checks.
ok bcook@

9 years agoAlways allow a r/w opening of /dev/null though the namei check. This
deraadt [Fri, 16 Oct 2015 14:20:48 +0000 (14:20 +0000)]
Always allow a r/w opening of /dev/null though the namei check.  This
pattern is common, especially because of daemon(3) usage.  Will probably
help some daemons move their pledge() calls further upwards.
ok doug,

9 years agougly white space
deraadt [Fri, 16 Oct 2015 14:13:52 +0000 (14:13 +0000)]
ugly white space

9 years agodelete pledge_bind_check() function and remove pledge_bind_check() call from sys_bind().
semarie [Fri, 16 Oct 2015 14:04:11 +0000 (14:04 +0000)]
delete pledge_bind_check() function and remove pledge_bind_check() call from sys_bind().

bind(2) still require PLEDGE_INET or PLEDGE_UNIX in order to be called, due to
SYS_bind entry in pledge_syscalls array. The diff restores also the ability for
PLEDGE_UNIX to call bind(2) (pledge_bind_check function missed that).

problem spotted by doug@
OK deraadt@

9 years agoPlace TIOCSTI reminder block better
deraadt [Fri, 16 Oct 2015 14:00:37 +0000 (14:00 +0000)]
Place TIOCSTI reminder block better

9 years agoFor "tty" pledges, treat TIOCGPGRP and TIOCGWINSZ like TIOCGETA -
deraadt [Fri, 16 Oct 2015 13:59:58 +0000 (13:59 +0000)]
For "tty" pledges, treat TIOCGPGRP and TIOCGWINSZ like TIOCGETA -
returning ENOTTY instead of killing the process.

9 years agoMerge nlist out of boundary access fix with other nlist implementations.
tobias [Fri, 16 Oct 2015 13:54:45 +0000 (13:54 +0000)]
Merge nlist out of boundary access fix with other nlist implementations.
While at it, merge style and typo fixes back into nlist(3), too.

ok deraadt, jsing, millert

9 years agoPut tls_config_verify_client_optional() in the right place.
jsing [Fri, 16 Oct 2015 13:49:53 +0000 (13:49 +0000)]
Put tls_config_verify_client_optional() in the right place.

9 years agoFix tpyo.
jsing [Fri, 16 Oct 2015 13:48:44 +0000 (13:48 +0000)]
Fix tpyo.

9 years agoImplement real "flock" request and add it to userland programs that
millert [Fri, 16 Oct 2015 13:37:43 +0000 (13:37 +0000)]
Implement real "flock" request and add it to userland programs that
use pledge and file locking.  OK deraadt@

9 years agoactually include the prerequisite dependency for BIO instead of doing nastyness
beck [Fri, 16 Oct 2015 12:41:29 +0000 (12:41 +0000)]
actually include the prerequisite dependency for BIO instead of doing nastyness

9 years agoIf a DOWN route entry is passed to a L2 output function, be dumb and
mpi [Fri, 16 Oct 2015 12:36:02 +0000 (12:36 +0000)]
If a DOWN route entry is passed to a L2 output function, be dumb and
simply use it.

In most of the cases doing a route lookup at this point is a noop as
it will return you the same DOWN entry you already have.

The exception is the case where the route has been removed from tree
since your kernel looked for it.  So what?  It's just a blue packet.

Note that this "exception" can only happen if your sending path does
not run under the KERNEL_LOCK.

ok mikeb@

9 years agoPut some iwm(4) debug code into #ifdef IWM_DEBUG.
stsp [Fri, 16 Oct 2015 12:17:58 +0000 (12:17 +0000)]
Put some iwm(4) debug code into #ifdef IWM_DEBUG.
ok mpi@

9 years agoClean up iwm(4) scanning logic a bit: Reset sc_scanband in callers of
stsp [Fri, 16 Oct 2015 12:17:38 +0000 (12:17 +0000)]
Clean up iwm(4) scanning logic a bit: Reset sc_scanband in callers of
iwm_mvm_scan_request() and always call ieee80211_end_scan() when done.
ok mpi@

9 years agoOops, committed old version of previous diff with a typo in it: NLL -> NULL
stsp [Fri, 16 Oct 2015 10:29:55 +0000 (10:29 +0000)]
Oops, committed old version of previous diff with a typo in it: NLL -> NULL

9 years agoIn iwm(4), correctly size and map the mbuf used for large firmware commands.
stsp [Fri, 16 Oct 2015 10:04:56 +0000 (10:04 +0000)]
In iwm(4), correctly size and map the mbuf used for large firmware commands.
Fixes occasional firmware errors while bringing the interface up or scanning.
ok phessler@

9 years agoDon't free after calling paste_set but do after evbuffer_add, from Theo
nicm [Fri, 16 Oct 2015 07:43:29 +0000 (07:43 +0000)]
Don't free after calling paste_set but do after evbuffer_add, from Theo
Buehler.

9 years agoValidate parsed ELF values to prevent out of boundary accesses.
tobias [Fri, 16 Oct 2015 07:40:12 +0000 (07:40 +0000)]
Validate parsed ELF values to prevent out of boundary accesses.
While at it, return proper return value when encountering a stripped
binary. Instead of -1 (illegal file), it should be the amount of symbols
that were tried to be resolved.

ok millert

9 years agoDisable !-command to escape to a shell. You are supposed to play, press
tobias [Fri, 16 Oct 2015 07:37:46 +0000 (07:37 +0000)]
Disable !-command to escape to a shell. You are supposed to play, press
^Z, or open up another terminal if there is something else to do.

ok deraadt

9 years agoAdd native support for ed-style diffs. No need to pledge "proc exec" anymore.
tobias [Fri, 16 Oct 2015 07:33:47 +0000 (07:33 +0000)]
Add native support for ed-style diffs. No need to pledge "proc exec" anymore.

ok deraadt

9 years agodoug and I think the kernel has enough features to support
deraadt [Fri, 16 Oct 2015 07:01:53 +0000 (07:01 +0000)]
doug and I think the kernel has enough features to support
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.

9 years agoFIOSETOWN/FIOGETOWN were added to "ioctl", but study finds no programs
deraadt [Fri, 16 Oct 2015 06:42:02 +0000 (06:42 +0000)]
FIOSETOWN/FIOGETOWN were added to "ioctl", but study finds no programs
currently needing them.  delete 'em for now.
ok doug

9 years agoAdd TIOCCBRK and TIOCSDTR to the whitelist for pledge ioctl.
doug [Fri, 16 Oct 2015 06:40:53 +0000 (06:40 +0000)]
Add TIOCCBRK and TIOCSDTR to the whitelist for pledge ioctl.

cu(1) uses these.

ok deraadt@

9 years agoPledge support for the parent/resolver in identd(8).
doug [Fri, 16 Oct 2015 05:55:23 +0000 (05:55 +0000)]
Pledge support for the parent/resolver in identd(8).

This limits the resolver to just "stdio getpw" or "stdio getpw rpath"
depending on whether ~/.noident files are checked.

The child/listener cannot use pledge yet because it calls a sysctl that
hasn't been whitelisted.

"commit" deraadt@

9 years agoPledge for ftp(1) in non-interactive mode.
doug [Fri, 16 Oct 2015 05:35:19 +0000 (05:35 +0000)]
Pledge for ftp(1) in non-interactive mode.

We will iterate and remove some of the pledges in the future.  This is
conservative for now.

Tested by sthen@ and myself.
ok deraadt@

9 years agoRemove -B from EXAMPLES; reminded by jmc@
miod [Fri, 16 Oct 2015 04:20:54 +0000 (04:20 +0000)]
Remove -B from EXAMPLES; reminded by jmc@

9 years agoAdd allocarray(), an overflow-safe allocation function.
mmcc [Fri, 16 Oct 2015 03:17:56 +0000 (03:17 +0000)]
Add allocarray(), an overflow-safe allocation function.

We avoided reallocation support because it demands more fancy footwork
to deal with the prepended link struct.

This has been on my mind for a while, and a 2010 security review of mksh
by the Android security team's Chris Palmer suggested it.

ok nicm@. Also discussed with millert@ and tedu@.

9 years agosync
deraadt [Fri, 16 Oct 2015 03:05:25 +0000 (03:05 +0000)]
sync

9 years agofine tune the logging some more
tedu [Fri, 16 Oct 2015 02:09:31 +0000 (02:09 +0000)]
fine tune the logging some more

9 years agosimplify logging functions. once a daemon, always a daemon
tedu [Fri, 16 Oct 2015 01:58:28 +0000 (01:58 +0000)]
simplify logging functions. once a daemon, always a daemon

9 years agosafety check that we're dealing with the filter we expect
tedu [Fri, 16 Oct 2015 01:55:19 +0000 (01:55 +0000)]
safety check that we're dealing with the filter we expect

9 years agomost things should be static
tedu [Fri, 16 Oct 2015 01:50:39 +0000 (01:50 +0000)]
most things should be static

9 years agoexit(1) is better for the impossible condition
tedu [Fri, 16 Oct 2015 01:37:14 +0000 (01:37 +0000)]
exit(1) is better for the impossible condition

9 years agofix some signed/unsigned integer type mismatches in format
djm [Thu, 15 Oct 2015 23:51:40 +0000 (23:51 +0000)]
fix some signed/unsigned integer type mismatches in format
strings; reported by Nicholas Lemonias

9 years agoDo not abuse .Nm for emphasis;
schwarze [Thu, 15 Oct 2015 23:46:20 +0000 (23:46 +0000)]
Do not abuse .Nm for emphasis;
patch from Michael Reed <m dot reed at mykolab dot com>.
Also drop .Tn while here.

9 years agoDelete two preprocessor constants that are no longer used.
schwarze [Thu, 15 Oct 2015 23:35:38 +0000 (23:35 +0000)]
Delete two preprocessor constants that are no longer used.
Patch from Michael Reed <m dot reed at mykolab dot com>.

9 years agoargument to sshkey_from_private() and sshkey_demote() can't be NULL
djm [Thu, 15 Oct 2015 23:08:23 +0000 (23:08 +0000)]
argument to sshkey_from_private() and sshkey_demote() can't be NULL

9 years agoAfter spawning, the parent can pledge "stdio rpath wpath cpath"
deraadt [Thu, 15 Oct 2015 23:06:46 +0000 (23:06 +0000)]
After spawning, the parent can pledge "stdio rpath wpath cpath"
from rob pierce

9 years agoRemove three distracting aliases for NULL.
mmcc [Thu, 15 Oct 2015 22:53:50 +0000 (22:53 +0000)]
Remove three distracting aliases for NULL.

ok nicm@

9 years agoSimplify the part of args() that is handling .Bl -column phrases:
schwarze [Thu, 15 Oct 2015 22:45:07 +0000 (22:45 +0000)]
Simplify the part of args() that is handling .Bl -column phrases:
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@.

9 years agoWhen blk_full() handles an .It line in .Bl -column and indirectly
schwarze [Thu, 15 Oct 2015 22:27:09 +0000 (22:27 +0000)]
When blk_full() handles an .It line in .Bl -column and indirectly
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.

9 years agoit is perhaps better style to not call close() on -1, even if harmless
tedu [Thu, 15 Oct 2015 22:21:28 +0000 (22:21 +0000)]
it is perhaps better style to not call close() on -1, even if harmless

9 years agomake sure req is zeroed in tcp case
tedu [Thu, 15 Oct 2015 22:17:43 +0000 (22:17 +0000)]
make sure req is zeroed in tcp case

9 years agobetter memory handling of the request/cache chain
tedu [Thu, 15 Oct 2015 22:12:26 +0000 (22:12 +0000)]
better memory handling of the request/cache chain

9 years agodo not insert entry into cache until it's fully formed
tedu [Thu, 15 Oct 2015 21:59:54 +0000 (21:59 +0000)]
do not insert entry into cache until it's fully formed

9 years agodoh, not all requests are the same size. check len first.
tedu [Thu, 15 Oct 2015 21:56:52 +0000 (21:56 +0000)]
doh, not all requests are the same size. check len first.

9 years agoassert is the wrong tool
tedu [Thu, 15 Oct 2015 21:39:15 +0000 (21:39 +0000)]
assert is the wrong tool

9 years agothe inet sockets don't work well with inet6 addrs. pick family from addr.
tedu [Thu, 15 Oct 2015 21:35:27 +0000 (21:35 +0000)]
the inet sockets don't work well with inet6 addrs. pick family from addr.
detected by naddy

9 years agoeverybody can build rebound
tedu [Thu, 15 Oct 2015 21:27:37 +0000 (21:27 +0000)]
everybody can build rebound

9 years agono mail for _rebound. deraadt
tedu [Thu, 15 Oct 2015 21:25:44 +0000 (21:25 +0000)]
no mail for _rebound. deraadt

9 years agointroduce logerr, since most logging is followed by exit
tedu [Thu, 15 Oct 2015 21:25:05 +0000 (21:25 +0000)]
introduce logerr, since most logging is followed by exit

9 years agodon't allow NSD to pick up libevent from /usr/local if the libevent2
sthen [Thu, 15 Oct 2015 21:22:11 +0000 (21:22 +0000)]
don't allow NSD to pick up libevent from /usr/local if the libevent2
package is installed.

9 years agonow with _rebound user, we can try a little harder at privdrop
tedu [Thu, 15 Oct 2015 21:20:09 +0000 (21:20 +0000)]
now with _rebound user, we can try a little harder at privdrop

9 years ago_rebound user and group (52)
tedu [Thu, 15 Oct 2015 21:19:06 +0000 (21:19 +0000)]
_rebound user and group (52)

9 years agomake the HUP interlocking in the parent work better.
tedu [Thu, 15 Oct 2015 20:58:14 +0000 (20:58 +0000)]
make the HUP interlocking in the parent work better.

9 years agotrivial KNF
deraadt [Thu, 15 Oct 2015 20:47:11 +0000 (20:47 +0000)]
trivial KNF

9 years agoIn syslogd replace the dprintf() macro with a logdebug() function
bluhm [Thu, 15 Oct 2015 20:26:47 +0000 (20:26 +0000)]
In syslogd replace the dprintf() macro with a logdebug() function
as dprintf(3) is in libc now and does something different.
OK guenther@

9 years agoPledge login_token with "stdio rpath wpath cpath fattr getpw tty".
bluhm [Thu, 15 Oct 2015 20:14:23 +0000 (20:14 +0000)]
Pledge login_token with "stdio rpath wpath cpath fattr getpw tty".
OK deraadt@

9 years agojust a space in usage, from deraadt
tedu [Thu, 15 Oct 2015 20:13:57 +0000 (20:13 +0000)]
just a space in usage, from deraadt

9 years agoRemove an unused included header (sys/stat.h).
mmcc [Thu, 15 Oct 2015 20:01:53 +0000 (20:01 +0000)]
Remove an unused included header (sys/stat.h).

9 years agoadd a hint about the config file, until it changes
tedu [Thu, 15 Oct 2015 19:51:45 +0000 (19:51 +0000)]
add a hint about the config file, until it changes

9 years agochild can be pledged down a bit to just sockets and io
tedu [Thu, 15 Oct 2015 19:49:22 +0000 (19:49 +0000)]
child can be pledged down a bit to just sockets and io

9 years agoWhen using a pf rule with both nat-to and rdr-to, it could happen
bluhm [Thu, 15 Oct 2015 19:48:44 +0000 (19:48 +0000)]
When using a pf rule with both nat-to and rdr-to, it could happen
that the nated source port was reused as destination port.  Do not
initialize nport at the beginning of the function, but where it is
needed.
OK sashan@

9 years agoimport rebound, a lightweight dns proxy, for further polishing
tedu [Thu, 15 Oct 2015 19:43:30 +0000 (19:43 +0000)]
import rebound, a lightweight dns proxy, for further polishing

9 years agoIntroduce an unsigned char variable for the ctype function calls.
mmcc [Thu, 15 Oct 2015 19:36:50 +0000 (19:36 +0000)]
Introduce an unsigned char variable for the ctype function calls.

ok millert@

9 years agoDon't Xr flock, since that is not the locking method used.
deraadt [Thu, 15 Oct 2015 19:35:24 +0000 (19:35 +0000)]
Don't Xr flock, since that is not the locking method used.
ok millert

9 years agoRemove disklabel -B (NUMBOOT) support. All the platforms which used to need
miod [Thu, 15 Oct 2015 19:31:15 +0000 (19:31 +0000)]
Remove disklabel -B (NUMBOOT) support. All the platforms which used to need
it are now using MI installboot for that purpose.

ok krw@ deraadt@

9 years agoAvoid a race between fopen(3) and fchmod(2). Use umask(2) and
bluhm [Thu, 15 Oct 2015 19:30:03 +0000 (19:30 +0000)]
Avoid a race between fopen(3) and fchmod(2).  Use umask(2) and
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@

9 years agoNo need to create links for xxboot now that MI installboot is the preferred
miod [Thu, 15 Oct 2015 19:29:32 +0000 (19:29 +0000)]
No need to create links for xxboot now that MI installboot is the preferred
way to install boot blocks.

9 years agoUse MI installboot instead of disklabel -B to install boot blocks.
miod [Thu, 15 Oct 2015 19:28:31 +0000 (19:28 +0000)]
Use MI installboot instead of disklabel -B to install boot blocks.
ok krw@ deraadt@

9 years agoAdd an extra argument to bootstrap() to allow for a limited overlap between an
miod [Thu, 15 Oct 2015 19:27:30 +0000 (19:27 +0000)]
Add an extra argument to bootstrap() to allow for a limited overlap between an
existing partition and the boot blocks span, and update all callers to require
an overlap limit of zero sectors (thus not changing their behaviour).

Then, add proper support for vax: copy the 2nd-stage boot block to /boot and
install the 1st-stage boot block at the beginning of the disk, retaining the
disklabel; allow for an overlap of up to 16 sectors, which is perfectly fine
as long as your `a' partition is FFS.

Note that regular installs will not even have such an overlap, because the
default OpenBSD span on a disk on vax starts at sector 16, but installation
media use sperific layout which require this.

ok krw@

9 years agoadd missing comma and missing range restriction, found by smilint
sthen [Thu, 15 Oct 2015 19:18:01 +0000 (19:18 +0000)]
add missing comma and missing range restriction, found by smilint

9 years agorelaydMIBObjects, not relaydMIBOjbects. From Rob Pierce.
sthen [Thu, 15 Oct 2015 19:15:02 +0000 (19:15 +0000)]
relaydMIBObjects, not relaydMIBOjbects. From Rob Pierce.

9 years agoRemove some unnecessary NULL-checks before free(). Change two bzero()
mmcc [Thu, 15 Oct 2015 18:40:38 +0000 (18:40 +0000)]
Remove some unnecessary NULL-checks before free(). Change two bzero()
calls on pf data to explicit_bzero().

ok mikeb@

9 years agoAdd TIOCFLUSH to "tty" in support of tcflush()
deraadt [Thu, 15 Oct 2015 17:55:41 +0000 (17:55 +0000)]
Add TIOCFLUSH to "tty" in support of tcflush()

9 years agoExposing FIOASYNC in pledge "ioctl" is a mistake; remove it, cannot find safe uses...
deraadt [Thu, 15 Oct 2015 17:50:05 +0000 (17:50 +0000)]
Exposing FIOASYNC in pledge "ioctl" is a mistake; remove it, cannot find safe uses of it

9 years agoPlegde x99token with "stdio rpath wpath cpath fattr getpw tty".
bluhm [Thu, 15 Oct 2015 17:23:09 +0000 (17:23 +0000)]
Plegde x99token with "stdio rpath wpath cpath fattr getpw tty".
with and OK deraadt@

9 years agoHandle F_ISATTY in the fcntl() stub as well
deraadt [Thu, 15 Oct 2015 16:38:04 +0000 (16:38 +0000)]
Handle F_ISATTY in the fcntl() stub as well
ok guenther

9 years agoremove '!' (subshell) and 'v' (edit) commands from ramdisk more(1) command.
deraadt [Thu, 15 Oct 2015 16:10:57 +0000 (16:10 +0000)]
remove '!' (subshell) and 'v' (edit) commands from ramdisk more(1) command.
first off, ^Z job control was added to BSD unix sometime around 1980 and is
a much better mechanism since the parent shell can contain what is going on.
!command support becomes a visible defect when programs are pledge'd
secondly this saves space.
ok miod tobias

9 years agocorrects pledge code for fsck_ffs and fsck_ext2fs
semarie [Thu, 15 Oct 2015 15:11:10 +0000 (15:11 +0000)]
corrects pledge code for fsck_ffs and fsck_ext2fs

on filesystem error, fsck will try to display username of inode, resulting need
of "getpw" for not SMALL version.

add a missed (?) -DSMALL in distrib/special/ for fsck_ffs and fsck_ext2fs

found by hard way by ajacoutot@

OK millert@

9 years agoLet the rx path of cnmac run without the kernel lock. To avoid the need
visa [Thu, 15 Oct 2015 14:06:04 +0000 (14:06 +0000)]
Let the rx path of cnmac run without the kernel lock. To avoid the need
of a mutex, the path no longer cleans up the queue of tx requests.

ok mpi@

9 years agoFix previous. The port number is not included in sc_src and it is
yasuoka [Thu, 15 Oct 2015 13:59:21 +0000 (13:59 +0000)]
Fix previous.  The port number is not included in sc_src and it is
checked already at beginning of the loop.

ok reyk

9 years agoin6_pcbconnect() returns EADDRNOTAVAIL when
vgross [Thu, 15 Oct 2015 10:27:18 +0000 (10:27 +0000)]
in6_pcbconnect() returns EADDRNOTAVAIL when
all the ports in the range portfirst .. portlast
are in use.

ok millert@, mpi@

9 years agoiobuf_queue() should return the number of bytes it queued on success, not 0
gilles [Thu, 15 Oct 2015 08:29:41 +0000 (08:29 +0000)]
iobuf_queue() should return the number of bytes it queued on success, not 0

ok eric@

9 years agoLet "all" as an argument for "resume envelope", "pause envelope"
sunil [Thu, 15 Oct 2015 08:18:23 +0000 (08:18 +0000)]
Let "all" as an argument for "resume envelope", "pause envelope"
and "remove" subcommands.

seems potentially useful millert@, Ok gilles@

9 years agoA classic case for bzero() -> explicit_bzero()
mmcc [Thu, 15 Oct 2015 06:35:54 +0000 (06:35 +0000)]
A classic case for bzero() -> explicit_bzero()

ok deraadt@

9 years agoCast arguments of ctype functions to Char, a lexism defined as unsigned
mmcc [Thu, 15 Oct 2015 05:57:09 +0000 (05:57 +0000)]
Cast arguments of ctype functions to Char, a lexism defined as unsigned
char.

Part of a larger attempt to audit ctype function argument types with
Coccinelle.

ok deraadt@

9 years agoFIOCLEX & FIONCLEX should be in base ioctl set
deraadt [Thu, 15 Oct 2015 04:58:54 +0000 (04:58 +0000)]
FIOCLEX & FIONCLEX should be in base ioctl set

9 years agogive up; include stdlib.h from the .h file, sigh
deraadt [Thu, 15 Oct 2015 04:41:09 +0000 (04:41 +0000)]
give up; include stdlib.h from the .h file, sigh

9 years agofsck_ffs has a ^T signal handler which opens /dev/tty late. Hoist that
deraadt [Thu, 15 Oct 2015 03:10:05 +0000 (03:10 +0000)]
fsck_ffs has a ^T signal handler which opens /dev/tty late.  Hoist that
opening to before the pledge, and cache the fd.
looked over by millert

9 years agolock needs pledge(proc exec) to use bsd auth system. from trondd
tedu [Thu, 15 Oct 2015 02:35:04 +0000 (02:35 +0000)]
lock needs pledge(proc exec) to use bsd auth system. from trondd

9 years agoFix a crash that occurs when printing the filename in a malformed NFS
lteo [Thu, 15 Oct 2015 02:33:25 +0000 (02:33 +0000)]
Fix a crash that occurs when printing the filename in a malformed NFS
request packet.

From Kevin Reay who obtained the fix from the tcpdump.org repo (part of
commit 6191f36146f5d286304e9b6e893477fe509d83ab).

ok canacar@ sthen@

9 years agoAdd missing includes to make the pf(4) man page example program compile
lteo [Thu, 15 Oct 2015 02:26:27 +0000 (02:26 +0000)]
Add missing includes to make the pf(4) man page example program compile
again.

Spotted by and based on a diff from Jack J. Woehr.

9 years agoavoid using a var uninitialised
jsg [Thu, 15 Oct 2015 01:14:33 +0000 (01:14 +0000)]
avoid using a var uninitialised
ok jung@

9 years agoFALTHROUGH->FALLTHROUGH in comment, ok deraadt a few days ago
sthen [Wed, 14 Oct 2015 23:15:37 +0000 (23:15 +0000)]
FALTHROUGH->FALLTHROUGH in comment, ok deraadt a few days ago

9 years agoDocument flock request
millert [Wed, 14 Oct 2015 22:39:04 +0000 (22:39 +0000)]
Document flock request

9 years agoAdd a dummy "flock" request that will allow file locking. It is
millert [Wed, 14 Oct 2015 22:34:47 +0000 (22:34 +0000)]
Add a dummy "flock" request that will allow file locking.  It is
not currently enforced but we want the kernel to be able to parse
it for an upcoming diff in the next few days.

9 years agosmtpd in tree is no longer neither 5.4.4, nor 5.4.5, bump SMTPD_VERSION
gilles [Wed, 14 Oct 2015 22:16:38 +0000 (22:16 +0000)]
smtpd in tree is no longer neither 5.4.4, nor 5.4.5, bump SMTPD_VERSION