openbsd
6 years agoparse SIZE advertisement
eric [Sat, 9 Jun 2018 10:01:17 +0000 (10:01 +0000)]
parse SIZE advertisement

6 years agosort previous;
jmc [Sat, 9 Jun 2018 06:36:31 +0000 (06:36 +0000)]
sort previous;

6 years agoslightly better wording re handing of $TERM, from Jakub Jelen
djm [Sat, 9 Jun 2018 03:18:11 +0000 (03:18 +0000)]
slightly better wording re handing of $TERM, from Jakub Jelen
via bz2386

6 years agoadd a SetEnv directive for sshd_config to allow an administrator to
djm [Sat, 9 Jun 2018 03:03:10 +0000 (03:03 +0000)]
add a SetEnv directive for sshd_config to allow an administrator to
explicitly specify environment variables set in sessions started by
sshd. These override the default environment and any variables set
by user configuration (PermitUserEnvironment, etc), but not the SSH_*
variables set by sshd itself.

ok markus@

6 years agoadd a SetEnv directive to ssh_config that allows setting environment
djm [Sat, 9 Jun 2018 03:01:12 +0000 (03:01 +0000)]
add a SetEnv directive to ssh_config that allows setting environment
variables for the remote session (subject to the server accepting them)

refactor SendEnv to remove the arbitrary limit of variable names.

ok markus@

6 years agoreorder child environment preparation so that variables read from
djm [Sat, 9 Jun 2018 02:58:02 +0000 (02:58 +0000)]
reorder child environment preparation so that variables read from
~/.ssh/environment (if enabled) do not override SSH_* variables
set by the server.

6 years agoMinor cleanup in ifuse_ops_setattr.
helg [Fri, 8 Jun 2018 23:43:40 +0000 (23:43 +0000)]
Minor cleanup in ifuse_ops_setattr.

ok mpi@

6 years agoInstead of working out which pane to resize with the mouse by walking
nicm [Fri, 8 Jun 2018 20:54:22 +0000 (20:54 +0000)]
Instead of working out which pane to resize with the mouse by walking
the panes list, look through the layout cells for the nearest border and
resize that cell. From Dan Aloni in GitHub issue 1374.

6 years agoBail out if fchmod(2) fails.
cheloha [Fri, 8 Jun 2018 19:24:46 +0000 (19:24 +0000)]
Bail out if fchmod(2) fails.

Don't quietly install ld.so.hints with mode 0600 because this adds
overhead to shlib lookup for non-root processes.

From Nan Xiao.

ok guenther@

6 years agoTest DH params allocation and free.
jsing [Fri, 8 Jun 2018 17:28:36 +0000 (17:28 +0000)]
Test DH params allocation and free.

6 years agoConstipate all the struct lock_type's so they go into .rodata
guenther [Fri, 8 Jun 2018 15:38:52 +0000 (15:38 +0000)]
Constipate all the struct lock_type's so they go into .rodata

ok visa@

6 years agoConstipate all the struct lock_type's so they go into .rodata
guenther [Fri, 8 Jun 2018 15:38:15 +0000 (15:38 +0000)]
Constipate all the struct lock_type's so they go into .rodata

ok visa@

6 years agoThe udp control option processing was implemented three times.
bluhm [Fri, 8 Jun 2018 14:09:57 +0000 (14:09 +0000)]
The udp control option processing was implemented three times.
Multicast lacked receive destination port.  Better use a function
and do it all in one place.  The pipex chunk does not use the
options, so it can happen before.  Adding the udp header length to
the ip header length was done inconsistently.  Do it explicitly
when needed.
OK mpi@ visa@

6 years agoNew semaphore implementation making sem_post async-safe.
pirofti [Fri, 8 Jun 2018 13:53:01 +0000 (13:53 +0000)]
New semaphore implementation making sem_post async-safe.

POSIX dictates that sem_post() needs to be async-safe here[0] and is
thus included in the list of safe functions to call from within a signal
handler here[1].

The old semaphore implementation is using spinlocks and __thrsleep to
synchronize between threads.

Let's say there are two threads: T0 and T1 and the semaphore has V=0.
T1 calls sem_wait() and it will now sleep (spinlock) until someone else
sem_post()'s. Let's say T0 sends a signal to T1 and exits.
The signal handler calls sem_post() which is meant to unblock T1 by
incrementing V. With the old semaphore implementation we we are now in a
deadlock as sem_post spinlocks on the same lock.

The new implementation does not suffer from this defect as it
uses futexes to resolve locking and thus sem_post does not need to spin.
Besides fixing this defect and making us POSIX compliant, this should
also improve performance as there should be less context switching and
thus less time spent in the kernel.

For architectures that do not provied futexes and atomic operations,
the old implementation will be used and it is now being renamed to
rthread_sem_compat as discussed with mpi@.

[0] -- http://pubs.opengroup.org/onlinepubs/9699919799/functions/sem_post.html
[1] -- http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html

OK visa@, mpi@, guenther@

6 years agoTweak previous - check for a NULL client and simplify manual text.
nicm [Fri, 8 Jun 2018 09:43:58 +0000 (09:43 +0000)]
Tweak previous - check for a NULL client and simplify manual text.

6 years agoAdd -x- and -y- to use client size, from Stefan Assmann in GitHub issue 1372.
nicm [Fri, 8 Jun 2018 09:41:34 +0000 (09:41 +0000)]
Add -x- and -y- to use client size, from Stefan Assmann in GitHub issue 1372.

6 years agoHandle AENs for logical disk creation and deletion.
jmatthew [Fri, 8 Jun 2018 07:14:02 +0000 (07:14 +0000)]
Handle AENs for logical disk creation and deletion.
SAS3 and newer controllers allow these operations at any time
through the server management interface - tested on a SAS3108
(Lenovo x3650 M5) and SAS3508 (Dell R6415).

ok dlg@

6 years agoRework sensors and bio(4) support to use the target number from the logical
jmatthew [Fri, 8 Jun 2018 07:09:50 +0000 (07:09 +0000)]
Rework sensors and bio(4) support to use the target number from the logical
disk list, rather than assuming target numbers match the position in the
list.  Now we always allocate enough sensors for the maximum number of
logical disks, so we can store sensor information indexed by target number.
While here, split up the logical disk sensor code simplify adding and
removing sensors for logical disks as they're created and destroyed.

ok dlg@

6 years agoGreatly simplify the resampling routine using the fact it processes
ratchov [Fri, 8 Jun 2018 06:21:56 +0000 (06:21 +0000)]
Greatly simplify the resampling routine using the fact it processes
exactly one block.

6 years agoThe conversion chain processes exactly one block, so no need to
ratchov [Fri, 8 Jun 2018 06:20:49 +0000 (06:20 +0000)]
The conversion chain processes exactly one block, so no need to
calculate & count the number of processed samples. This allows to move
the calls to processing routines in dev_mix_badd() and
dev_sub_bcopy(), which is much simpler. No behaviour change.

6 years agofix incorrect expansion of %i in load_public_identity_files(); reported by
djm [Fri, 8 Jun 2018 03:35:36 +0000 (03:35 +0000)]
fix incorrect expansion of %i in load_public_identity_files(); reported by
Roumen Petrov

6 years agofix some over-long lines and __func__ up some debug messages
djm [Fri, 8 Jun 2018 01:55:40 +0000 (01:55 +0000)]
fix some over-long lines and __func__ up some debug messages

6 years agoPrevent ggc3 error: redefinition of `fuse_dirh_t'
helg [Thu, 7 Jun 2018 22:28:11 +0000 (22:28 +0000)]
Prevent ggc3 error: redefinition of `fuse_dirh_t'

OK millert@

6 years agoprepare for dri3proto
matthieu [Thu, 7 Jun 2018 21:23:44 +0000 (21:23 +0000)]
prepare for dri3proto

6 years agoremove unused flags and obsolete comments
eric [Thu, 7 Jun 2018 16:28:14 +0000 (16:28 +0000)]
remove unused flags and obsolete comments

ok gilles@

6 years agotest the correct configuration option name
djm [Thu, 7 Jun 2018 14:29:43 +0000 (14:29 +0000)]
test the correct configuration option name

6 years agoMake callers of VOP_CREATE(9) and VOP_MKNOD(9) responsible for
visa [Thu, 7 Jun 2018 13:37:27 +0000 (13:37 +0000)]
Make callers of VOP_CREATE(9) and VOP_MKNOD(9) responsible for
unlocking the directory vnode.

OK mpi@, helg@

6 years agoadd some EXIT STATUS sections; from matthew martin
jmc [Thu, 7 Jun 2018 11:37:21 +0000 (11:37 +0000)]
add some EXIT STATUS sections; from matthew martin

6 years agouse RELAY_* flags where appropriate
eric [Thu, 7 Jun 2018 11:31:51 +0000 (11:31 +0000)]
use RELAY_* flags where appropriate

ok gilles@

6 years agotweak previous;
jmc [Thu, 7 Jun 2018 11:26:14 +0000 (11:26 +0000)]
tweak previous;

6 years agoAttach bwfm(4) to the Broadcom 4356 found in the GPD Pocket.
patrick [Thu, 7 Jun 2018 11:24:19 +0000 (11:24 +0000)]
Attach bwfm(4) to the Broadcom 4356 found in the GPD Pocket.

Tested by mlarkin@

6 years agoSome PCIe-based bwfm(4) chips also require that we supply an NVRAM
patrick [Thu, 7 Jun 2018 11:18:25 +0000 (11:18 +0000)]
Some PCIe-based bwfm(4) chips also require that we supply an NVRAM
binary.  In case we have an (optional) NVRAM binary, copy it to the
end of the chip's memory.

Tested by mlarkin@ on his GPD Pocket.

6 years agotweak previous;
jmc [Thu, 7 Jun 2018 09:41:46 +0000 (09:41 +0000)]
tweak previous;

6 years agoput ".Re" in the right place;
jmc [Thu, 7 Jun 2018 09:41:14 +0000 (09:41 +0000)]
put ".Re" in the right place;

6 years agosome permitlisten fixes from markus@ that I missed in my insomnia-fueled
djm [Thu, 7 Jun 2018 09:26:42 +0000 (09:26 +0000)]
some permitlisten fixes from markus@ that I missed in my insomnia-fueled
commits last night

6 years agoThe global zero addresses must not change, mark them constant.
bluhm [Thu, 7 Jun 2018 08:46:24 +0000 (08:46 +0000)]
The global zero addresses must not change, mark them constant.
OK tb@ visa@

6 years agosimplify the codepath for backup relay setup
eric [Thu, 7 Jun 2018 07:06:06 +0000 (07:06 +0000)]
simplify the codepath for backup relay setup

ok gilles@

6 years agoMention enabling PIE by default is turned off by using "-pg".
yasuoka [Thu, 7 Jun 2018 05:40:08 +0000 (05:40 +0000)]
Mention enabling PIE by default is turned off by using "-pg".

6 years agoPass -nopie to the linker when -pg is specified to make the
yasuoka [Thu, 7 Jun 2018 05:31:32 +0000 (05:31 +0000)]
Pass -nopie to the linker when -pg is specified to make the
profiler(gprof) work properly.

ok mpi

6 years agopermitlisten/PermitListen unit test from Markus
djm [Thu, 7 Jun 2018 04:46:34 +0000 (04:46 +0000)]
permitlisten/PermitListen unit test from Markus

6 years agofix regression caused by recent permitlisten option commit:
djm [Thu, 7 Jun 2018 04:31:51 +0000 (04:31 +0000)]
fix regression caused by recent permitlisten option commit:
authorized_keys lines that contained permitopen/permitlisten were
being treated as invalid.

6 years agoApply the retpoline transformation to indirect jumps in the raw ASM
guenther [Thu, 7 Jun 2018 04:09:35 +0000 (04:09 +0000)]
Apply the retpoline transformation to indirect jumps in the raw ASM

ok mlarkin@ mortimer@ deraadt@

6 years agoTreat XSAVEOPT and other XSAVE extensions like other cpu flags
guenther [Thu, 7 Jun 2018 04:07:28 +0000 (04:07 +0000)]
Treat XSAVEOPT and other XSAVE extensions like other cpu flags

oddness noted by kettenis
ok mlarkin@ deraadt@

6 years agoRemove unused variable.
mortimer [Thu, 7 Jun 2018 01:42:36 +0000 (01:42 +0000)]
Remove unused variable.

Spotted by Nan Xiao.

6 years agoRFC 8106 obsolteted RFC 6106.
florian [Wed, 6 Jun 2018 20:15:13 +0000 (20:15 +0000)]
RFC 8106 obsolteted RFC 6106.
From brad@, OK jmc

6 years agocode cleanup
eric [Wed, 6 Jun 2018 19:12:09 +0000 (19:12 +0000)]
code cleanup

ok gilles@ semarie@

6 years agoThe function dounmount() traverses the mnt_list in forward direction
bluhm [Wed, 6 Jun 2018 19:02:38 +0000 (19:02 +0000)]
The function dounmount() traverses the mnt_list in forward direction
to call vfs_busy() for all nested mount points.  vfs_stall() called
vfs_busy() in reverser order for all mount points.  Change the
direction of the latter to resolve the lock order conflict.
OK visa@

6 years agoswitch config file parsing to getline(3) as this avoids static limits
markus [Wed, 6 Jun 2018 18:29:18 +0000 (18:29 +0000)]
switch config file parsing to getline(3) as this avoids static limits
noted by gerhard@; ok dtucker@, djm@

6 years agoregress test for PermitOpen
djm [Wed, 6 Jun 2018 18:25:33 +0000 (18:25 +0000)]
regress test for PermitOpen

6 years agoman bits for permitlisten authorized_keys option
djm [Wed, 6 Jun 2018 18:24:15 +0000 (18:24 +0000)]
man bits for permitlisten authorized_keys option

6 years agoman bits for PermitListen
djm [Wed, 6 Jun 2018 18:24:00 +0000 (18:24 +0000)]
man bits for PermitListen

6 years agopermitlisten option for authorized_keys; ok markus@
djm [Wed, 6 Jun 2018 18:23:32 +0000 (18:23 +0000)]
permitlisten option for authorized_keys; ok markus@

6 years agoAdd a PermitListen directive to control which server-side addresses
djm [Wed, 6 Jun 2018 18:22:41 +0000 (18:22 +0000)]
Add a PermitListen directive to control which server-side addresses
may be listened on when the client requests remote forwarding (ssh -R).

This is the converse of the existing PermitOpen directive and this
includes some refactoring to share much of its implementation.

feedback and ok markus@

6 years agosync
deraadt [Wed, 6 Jun 2018 14:42:07 +0000 (14:42 +0000)]
sync

6 years agoAfter pledge the frontend process is only accepting from
florian [Wed, 6 Jun 2018 14:08:28 +0000 (14:08 +0000)]
After pledge the frontend process is only accepting from
an AF_UNIX socket (the control socket) so replace inet with
unix pledge.

6 years agoMake sure cr17 matches curcpu() on non-MULTIPROCESSOR kernels.
aoyama [Wed, 6 Jun 2018 12:58:05 +0000 (12:58 +0000)]
Make sure cr17 matches curcpu() on non-MULTIPROCESSOR kernels.

This fixes that luna88k non-MULTIPROCESSOR kernel with option
DIAGNOSTIC (i.e. GENERIC) will hang silently at boot.

That problem had been caused after the addition of a
MUTEX_ASSERT_UNLOCKED check in kprintf() in sys/kern/subr_prf.c
1.95.

The diff is suggested from Miod Vallat, tested it on
non-MULTIPROCESSOR and MULTIPROCESSOR kernels by me.

6 years agoremove fields that are found in struct dispatcher from struct relayhost
eric [Wed, 6 Jun 2018 12:00:26 +0000 (12:00 +0000)]
remove fields that are found in struct dispatcher from struct relayhost

ok gilles@

6 years agoadd non-regression tests for bad user list files
espie [Wed, 6 Jun 2018 10:33:07 +0000 (10:33 +0000)]
add non-regression tests for bad user list files

6 years agoif the parser can't find a starting line in user db, it won't look
espie [Wed, 6 Jun 2018 10:13:10 +0000 (10:13 +0000)]
if the parser can't find a starting line in user db, it won't look
at any line, so it won't error out.
Add logic to make it error out.

6 years agoPrefix fields of pfkey & routing PCBs, part 2, no functionnal change.
mpi [Wed, 6 Jun 2018 07:12:51 +0000 (07:12 +0000)]
Prefix fields of pfkey & routing PCBs, part 2, no functionnal change.

ok tb@

6 years agoPrefix fields of pfkey & routing PCBs, no functionnal change.
mpi [Wed, 6 Jun 2018 07:10:12 +0000 (07:10 +0000)]
Prefix fields of pfkey & routing PCBs, no functionnal change.

ok visa@, tb@

6 years agoPass the socket to sounlock(), this prepare the terrain for per-socket
mpi [Wed, 6 Jun 2018 06:55:22 +0000 (06:55 +0000)]
Pass the socket to sounlock(), this prepare the terrain for per-socket
locking.

ok visa@, bluhm@

6 years agoAsseert that a pfkey or routing socket is referenced by a `fp' instead
mpi [Wed, 6 Jun 2018 06:47:01 +0000 (06:47 +0000)]
Asseert that a pfkey or routing socket is referenced by a `fp' instead
of calling sofree(), when its PCB is detached.

This is different from TCP which does not always detach `inpcb's from
sockets.  In the pfkey & routing case caling sofree() there is a noop
whereas for TCP it's needed to free closed connections.

Having fewer sofree() makes it easier to understand the code and move
the locks down.

ok visa@

6 years agodocument missing database filters
remi [Wed, 6 Jun 2018 05:52:59 +0000 (05:52 +0000)]
document missing database filters

ok stsp@ claudio@ jca@

6 years agoprint metric for Intra-Area-Prefix LSAs
remi [Wed, 6 Jun 2018 05:51:43 +0000 (05:51 +0000)]
print metric for Intra-Area-Prefix LSAs

ok stsp@ claudio@ jca@

6 years agopluart(4) is mi now
jsg [Wed, 6 Jun 2018 02:53:44 +0000 (02:53 +0000)]
pluart(4) is mi now

6 years agoAdd RETGUARD to clang for amd64. This security mechanism uses per-function
mortimer [Wed, 6 Jun 2018 00:14:29 +0000 (00:14 +0000)]
Add RETGUARD to clang for amd64. This security mechanism uses per-function
random cookies to protect access to function return instructions, with the
effect that the integrity of the return address is protected, and function
return instructions are harder to use in ROP gadgets.

On function entry the return address is combined with a per-function random
cookie and stored in the stack frame. The integrity of this value is verified
before function return, and if this check fails, the program aborts. In this way
RETGUARD is an improved stack protector, since the cookies are per-function. The
verification routine is constructed such that the binary space immediately
before each ret instruction is padded with int03 instructions, which makes these
return instructions difficult to use in ROP gadgets. In the kernel, this has the
effect of removing approximately 50% of total ROP gadgets, and 15% of unique
ROP gadgets compared to the 6.3 release kernel. Function epilogues are
essentially gadget free, leaving only the polymorphic gadgets that result from
jumping into the instruction stream partway through other instructions. Work to
remove these gadgets will continue through other mechanisms.

Remaining work includes adding this mechanism to assembly routines, which must
be done by hand. Many thanks to all those who helped test and provide feedback,
especially deaadt, tb, espie and naddy.

ok deraadt@

6 years agoMove pluart(4) to dev/fdt.
kettenis [Tue, 5 Jun 2018 20:41:19 +0000 (20:41 +0000)]
Move pluart(4) to dev/fdt.

ok jsg@

6 years agoUnify arm64 and armv7 pluart(4) implementations.
kettenis [Tue, 5 Jun 2018 19:23:01 +0000 (19:23 +0000)]
Unify arm64 and armv7 pluart(4) implementations.

ok jsg@

6 years agoAdd missing csi_dh_params_dup() calls.
jsing [Tue, 5 Jun 2018 18:06:07 +0000 (18:06 +0000)]
Add missing csi_dh_params_dup() calls.

6 years agoUse proper markup for ioctl arguments instead of documenting them using
anton [Tue, 5 Jun 2018 16:43:19 +0000 (16:43 +0000)]
Use proper markup for ioctl arguments instead of documenting them using
free-form text.

ok jmc@

6 years agoremove struct relayhost from struct envelope.
eric [Tue, 5 Jun 2018 11:34:21 +0000 (11:34 +0000)]
remove struct relayhost from struct envelope.

ok gilles@

6 years agoRecognise Cortex A76. Only adding to arm64 as it only supports aarch32
jsg [Tue, 5 Jun 2018 09:45:08 +0000 (09:45 +0000)]
Recognise Cortex A76.  Only adding to arm64 as it only supports aarch32
for EL0/userland.  MIDR value from ATF.

ok kettenis@

6 years agoRevert introduction of fdinsert(), a sanitify check triggers when
mpi [Tue, 5 Jun 2018 09:29:05 +0000 (09:29 +0000)]
Revert introduction of fdinsert(), a sanitify check triggers when
closing a LARVAL file.

Found the hardway by sthen@.

6 years agoSwitch from lazy FPU switching to semi-eager FPU switching: track whether
guenther [Tue, 5 Jun 2018 06:39:10 +0000 (06:39 +0000)]
Switch from lazy FPU switching to semi-eager FPU switching: track whether
curproc's xstate ("extended state") is loaded in the CPU or not.
 - context switch, sendsig(), vmm, and doing CPU crypto in the kernel all
   check the flag and, if set, save the old thread's state to the PCB,
   clear the flag, and then load the _blank_ state
 - when returning to userspace, if the flag is clear then set it and restore
   the thread's state

This simpler tracking also fixes the restoring of FPU state after nested
signal handlers.

With this, %cr0's TS flag is never set, the FPU #DNA trap can no
longer happen, and IPIs are no longer necessary for flushing or
syncing FPU state; on the other hand, restoring xstate while returning
to userspace means we have to handle xrstor faulting if we could
be loading an altered state.  If that happens, reset the state,
fake a #GP fault (SIGBUS), and recheck for ASTs.

While here, regularize fxsave/fxrstor vs xsave/xrstor handling, by
using codepatching to switch to xsave/xrstor when present in the
CPU.  In addition, code patch in use of xsaveopt in most places
when the CPU supports that.  Use the 64bit-wide variants of the
instructions in all cases so that x87 instruction fault IPs are
reported correctly.

This change has three motivations:
1) with modern clang, SSE registers are used even in rcrt0.o, making
   lazy FPU switching a smaller benefit vs trap costs
2) the Intel SDM warns that lazy FPU switching may increase power costs
3) post-Spectre rumors suggest that the %cr0 TS flag might not block
   speculation, permitting leaking of information about FPU state
   (AES keys?) across protection boundaries.

tested by many in snaps; prodding from deraadt@

6 years agoTurn all instances of Fn into proper cross references. While here, remove
anton [Tue, 5 Jun 2018 06:32:26 +0000 (06:32 +0000)]
Turn all instances of Fn into proper cross references. While here, remove
redundant references to termios and favor Po/Pc for parenthesis enclosing.

ok jmc@ schwarze@

6 years agodocument "match tag"; ok gilles
jmc [Tue, 5 Jun 2018 05:58:12 +0000 (05:58 +0000)]
document "match tag"; ok gilles

6 years agoSplit "return to userspace via iretq" from intr_fast_exit into intr_user_exit.
guenther [Tue, 5 Jun 2018 05:04:31 +0000 (05:04 +0000)]
Split "return to userspace via iretq" from intr_fast_exit into intr_user_exit.
Move AST handling from the bottom of alltraps and Xdoreti to the
 top of the new routine.
syscall-return-via-iretq and the FPU #DNA trap jump into intr_user_exit after
 the AST check (already performed for the former, skipped for the latter)
Delete a couple debugging hooks mlarkin@ and I used during Meltdown work

tested by many in snaps; thanks to brynet@ for spurious interrrupt testing
earlier reviews and comments kettenis@ mlarkin@; prodding from deraadt@

6 years agoRemove the cpu_reset_needs_v4_MMU_disable flag; it's always true for hardware
kettenis [Mon, 4 Jun 2018 22:10:58 +0000 (22:10 +0000)]
Remove the cpu_reset_needs_v4_MMU_disable flag; it's always true for hardware
that OpenBSD runs on.

ok patrick@

6 years agoUse process-private futexes. This avoids the overhead of calling into uvm
kettenis [Mon, 4 Jun 2018 22:08:56 +0000 (22:08 +0000)]
Use process-private futexes.  This avoids the overhead of calling into uvm
to look up the mapping for the futex address.

ok visa@, mpi@

6 years agohonor SIZE extension when advertised by peer
gilles [Mon, 4 Jun 2018 21:46:56 +0000 (21:46 +0000)]
honor SIZE extension when advertised by peer

ok millert@

6 years agofor "match", document that envelopes that do not match anything are rejected,
jmc [Mon, 4 Jun 2018 21:13:34 +0000 (21:13 +0000)]
for "match", document that envelopes that do not match anything are rejected,
and that rules are evaluated sequentially, first match wins;

ok gilles

6 years agoremove "from local" (the default) from one of the match rules: the line
jmc [Mon, 4 Jun 2018 21:10:58 +0000 (21:10 +0000)]
remove "from local" (the default) from one of the match rules: the line
immediately above also uses this notation, it's shorter, and it keeps
two examples in the man page which claim to be the same as the default config
(but with exceptions) in sync;

ok gilles

6 years agoSync VFS documentation with reality
kn [Mon, 4 Jun 2018 19:42:54 +0000 (19:42 +0000)]
Sync VFS documentation with reality

Missed during the "Namecache revamp" in 2009.

Reported by Georg Bege <georg at bege dot email>, thanks.

OK visa jmc mpi jca

6 years agoAllow specifying binary via ROUTE
kn [Mon, 4 Jun 2018 19:22:13 +0000 (19:22 +0000)]
Allow specifying binary via ROUTE

OK bluhm jca

6 years agoZap unused mifi_t.
kn [Mon, 4 Jun 2018 19:20:12 +0000 (19:20 +0000)]
Zap unused mifi_t.

OK bluhm mpi jca

6 years agoZap unused sockaddr.
kn [Mon, 4 Jun 2018 19:17:37 +0000 (19:17 +0000)]
Zap unused sockaddr.

OK bluhm deraadt jca

6 years agodrop BUMPTIME
cheloha [Mon, 4 Jun 2018 18:16:43 +0000 (18:16 +0000)]
drop BUMPTIME

unused since v1.76, ca 5.3

ok kettenis@ deraadt@

6 years agoFix file descriptor leak.
gerhard [Mon, 4 Jun 2018 18:05:18 +0000 (18:05 +0000)]
Fix file descriptor leak.

Patch submitted by Nan Xiao, ok tb@ sthen@ millert@ deraadt@ jca@

6 years agotweak previous;
jmc [Mon, 4 Jun 2018 16:34:09 +0000 (16:34 +0000)]
tweak previous;

6 years agoadd support for mda wrappers allowing postmaster to define command wrappers
gilles [Mon, 4 Jun 2018 15:57:46 +0000 (15:57 +0000)]
add support for mda wrappers allowing postmaster to define command wrappers
that will be executed (with recipient privileges) before calling the users'
mail delivery agent

ok eric@

6 years agoin non-DIAGNOSTIC kernels, rw_assert_wrlock becomes a nop which leaves the
deraadt [Mon, 4 Jun 2018 15:04:57 +0000 (15:04 +0000)]
in non-DIAGNOSTIC kernels, rw_assert_wrlock becomes a nop which leaves the
local variable dangling, so calculate the lock address by hand at invocation
ok kettenis

6 years ago4-bit bus width is mandatory for SDIO cards that support High Speed
patrick [Mon, 4 Jun 2018 13:33:10 +0000 (13:33 +0000)]
4-bit bus width is mandatory for SDIO cards that support High Speed
mode, so switch from 1-bit to 4-bit bus width if the host controller
supports it.

ok kettenis@

6 years agoRemove the extra pager code when compiled without the BACKWARDS flag.
martijn [Mon, 4 Jun 2018 13:29:07 +0000 (13:29 +0000)]
Remove the extra pager code when compiled without the BACKWARDS flag.
Most terminals have scrollback options, or can be achieved via tmux, so
it's not needed.

OK millert@

6 years agoDefinitively choose the existing semantics for the scroll and null command.
martijn [Mon, 4 Jun 2018 13:26:21 +0000 (13:26 +0000)]
Definitively choose the existing semantics for the scroll and null command.
POSIX states: "An empty command list shall be equivalent to the p command",
so changing the behaviour of a null-command in any other case is a
violation of POSIX.

OK millert@

6 years agoThe function pf_create_state() calls pf_set_protostate() before
bluhm [Mon, 4 Jun 2018 12:22:45 +0000 (12:22 +0000)]
The function pf_create_state() calls pf_set_protostate() before
pf_state_insert(), so the state key has not been set.  When inlining,
the compiler recognized the NULL pointer dereference in
s->key[PF_SK_STACK]->proto and optimized it away.  But if pf.c was
compiled with -fno-inline, the system crashed during boot.  Add a
NULL check in pf_set_protostate() to handle the situation when the
function is called.
OK sashan@ henning@

6 years agotweak the text of the relaying example: make it clear that the example
jmc [Mon, 4 Jun 2018 12:15:10 +0000 (12:15 +0000)]
tweak the text of the relaying example: make it clear that the example
allows delivery as well as relaying (for authenticated users), and that
passing to an external mda is possible, but not required;

ok gilles

6 years agoCleanup IPsec output error handling with consistent goto drop.
bluhm [Mon, 4 Jun 2018 12:13:01 +0000 (12:13 +0000)]
Cleanup IPsec output error handling with consistent goto drop.
from markus@; OK mpi@

6 years ago"match auth" matches transactions that *have been* authenticated;
jmc [Mon, 4 Jun 2018 11:52:40 +0000 (11:52 +0000)]
"match auth" matches transactions that *have been* authenticated;
ok gilles

6 years agoSwitch to SDIO High Speed mode if the host controller supports it.
patrick [Mon, 4 Jun 2018 10:37:14 +0000 (10:37 +0000)]
Switch to SDIO High Speed mode if the host controller supports it.

ok kettenis@