CVS: cvs.openbsd.org: src

2020-08-19 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2020/08/19 21:09:28

Modified files:
usr.sbin/ospfd : kroute.c 

Log message:
Use the ROUTE_FLAGFILTER setsockopt to filter out routing socket messages
for L2 and broadcast routes, since we don't need them at all.

ok kn@ remi@ dlg@



CVS: cvs.openbsd.org: src

2020-08-19 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2020/08/19 19:47:45

Modified files:
sys/scsi   : cd.c sd.c sdvar.h st.c 

Log message:
Revert DYING. At least some USB memory sticks get very upset.



CVS: cvs.openbsd.org: src

2020-08-19 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2020/08/19 16:46:20

Modified files:
sys/scsi   : scsi_base.c scsi_ioctl.c 

Log message:
Replace last 2 'blah & (flag1 | flag2) == 0' with !ISSET(blah, (flag1 | flag2)).



CVS: cvs.openbsd.org: src

2020-08-19 Thread Greg Steuck
CVSROOT:/cvs
Module name:src
Changes by: gne...@cvs.openbsd.org  2020/08/19 13:24:03

Modified files:
sys/arch/amd64/amd64: machdep.c 

Log message:
Use sysctl_bounded_args for simple cases in cpu_sysctl on amd64

deraadt@: fine



CVS: cvs.openbsd.org: src

2020-08-19 Thread Greg Steuck
CVSROOT:/cvs
Module name:src
Changes by: gne...@cvs.openbsd.org  2020/08/19 13:22:53

Modified files:
sys/netmpls: mpls.h mpls_raw.c 

Log message:
Convert mpls_sysctl to sysctl_bounded_args

OK claudio@



CVS: cvs.openbsd.org: src

2020-08-19 Thread Tobias Heider
CVSROOT:/cvs
Module name:src
Changes by: to...@cvs.openbsd.org   2020/08/19 13:09:26

Modified files:
sbin/iked  : ikev2_pld.c 

Log message:
Restructure traffic selector payload parsing.  Add additional size and
sanity checks.

Feedback and ok patrick@



CVS: cvs.openbsd.org: src

2020-08-19 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2020/08/19 08:53:39

Modified files:
sys/scsi   : cd.c sd.c sdvar.h st.c 

Log message:
Nuke SDF_DYING, CDF_DYING and ST_DYING flags. Use the scsi_link flag
SDEV_S_DYING instead. Makes it clear that the scsi_link and the [cd|sd|st]
device  always agree on their state.



CVS: cvs.openbsd.org: src

2020-08-19 Thread Ricardo Mestre
CVSROOT:/cvs
Module name:src
Changes by: mes...@cvs.openbsd.org  2020/08/19 08:23:26

Modified files:
usr.sbin/relayd: relayd.c 

Log message:
add unveil(2) again

this allows reading from anywhere in the filesystem (in order to read the
config file and those ones included from it), but also executing, which I
missed from my last attempt, because it's required for "check script(s)".

even though it's a broad permission, and the main proc cannot be pledged due to
forbidden ioctls, then this at least prevents it from creating/writing/deleting
files which is not required here.

OK benno@ a long time ago



CVS: cvs.openbsd.org: src

2020-08-19 Thread Klemens Nanni
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2020/08/19 05:23:59

Modified files:
sys/net: if.c 

Log message:
Allow SIOCSWGDPID and SIOCSWGMAXFLOW ioctls for non-root

ifconfig(8) detects switch(4) through its unique SIOCSWGDPID ioctl(2) and
further does another switch specific ioctl for the default output regardless
of configuration and/or members.

But since these two ioctls are limited to root, running ifconfig as
unprivileged user makes switch interfaces partially appear as bridge devices
because the detection fails, e.g. STP parameters are shown instead of
datapath id and flow parameters.

ifioctl() limits a list of set/write ioctls to root, but these two read-only
ioctls seem to have been listed by mistake, so remove them to omit the root
check and fix "ifconfig switch" output for unprivileged users.

Feedback from dlg



CVS: cvs.openbsd.org: src

2020-08-19 Thread Klemens Nanni
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2020/08/19 05:10:42

Modified files:
usr.bin/rsync  : socket.c 

Log message:
Handle EADDRNOAVAIL from connect(2) gracefully

The server's DNS name may yield multiple addresses of different address
families;  in case the local client has no suitable address, i.e. connect(2)
fails with EADDRNOTAVAIL, do not fail hard but try the next address instead.

Report (IPv6 only client with dualstack server) and diff from Sasha Romijn.

OK job



CVS: cvs.openbsd.org: src

2020-08-19 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2020/08/19 04:10:58

Modified files:
sys/kern   : kern_sig.c 
sys/arch/alpha/alpha: trap.c 
sys/arch/amd64/amd64: trap.c 
sys/arch/arm/arm: fault.c undefined.c 
sys/arch/arm64/arm64: trap.c 
sys/arch/hppa/hppa: trap.c 
sys/arch/i386/i386: trap.c 
sys/arch/i386/isa: npx.c 
sys/arch/m88k/m88k: m88100_fp.c m88110_fp.c trap.c 
sys/arch/mips64/mips64: fp_emulate.c trap.c 
sys/arch/powerpc/powerpc: trap.c 
sys/arch/powerpc64/powerpc64: trap.c 
sys/arch/sparc64/fpu: fpu.c 
sys/arch/sparc64/sparc64: emul.c trap.c 

Log message:
Push KERNEL_LOCK/UNLOCK() dance inside trapsignal().

ok kettenis@, visa@



CVS: cvs.openbsd.org: src

2020-08-19 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2020/08/19 01:15:42

Modified files:
usr.bin/tmux   : alerts.c 

Log message:
Set alert flag for the current window if the session is unattached.
GitHub issues 1182 and 2299. From Eric Garver.



CVS: cvs.openbsd.org: src

2020-08-19 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2020/08/19 00:37:23

Modified files:
usr.bin/tmux   : input.c 

Log message:
Respond to colour requests if a colour is available, from Michal Goral.