CVS: cvs.openbsd.org: src

2017-12-11 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2017/12/12 00:55:36

Modified files:
sys/sys: proc.h 

Log message:
stray , snuck in



CVS: cvs.openbsd.org: src

2017-12-11 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2017/12/12 00:47:58

Modified files:
libexec/ld.so  : dir.c 

Log message:
spacing



CVS: cvs.openbsd.org: src

2017-12-11 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2017/12/11 18:13:14

Modified files:
sys/sys: syscall.h syscallargs.h 
sys/kern   : init_sysent.c syscalls.c 

Log message:
sync



CVS: cvs.openbsd.org: src

2017-12-11 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2017/12/11 18:12:34

Modified files:
sys/kern   : kern_fork.c kern_exec.c kern_pledge.c 
 syscalls.master 
sys/sys: pledge.h proc.h 
include: unistd.h 
lib/libc/sys   : execve.2 pledge.2 
usr.bin/kdump  : ktrstruct.c 

Log message:
pledge()'s 2nd argument becomes char *execpromises, which becomes the
pledge for a new execve image immediately upon start.  Also introduces
"error" which makes violations return -1 ENOSYS instead of killing the
program ("error" may not be handed to a setuid/setgid program, which
may be missing/ignoring syscall return values and would continue with
inconsistant state)
Discussion with many
florian has used this to improve the strictness of a daemon



CVS: cvs.openbsd.org: src

2017-12-11 Thread joshua stein
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/12/11 17:24:21

Modified files:
sys/net80211   : ieee80211_node.c 

Log message:
Fix the behavior of preferring weaker-but-still-good 5Ghz APs over
2Ghz APs because the 5Ghz band is generally less saturated.

The previous implementation was dependent upon the order of walking
APs.

ok stsp



CVS: cvs.openbsd.org: src

2017-12-11 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2017/12/11 17:18:58

Modified files:
bin/csh: const.c csh.c 
bin/ksh: lex.c main.c 

Log message:
Include hostname in shell prompts by default

With tmux, ssh and vmd, we tend to open shells on many different hosts
simultaneously and the default prompts '$ ' and '# ' for {,k}sh as well
as  '% ' and '# ' for csh become dangerous: it's very easy to issue a
command on the wrong host.

This can easily be avoided by displaying the hostname in the prompt.
Everything beyond "hostname{$,#,%} " is going to be a matter of taste,
so we left it at that. If you use an FQDN, only the first part (the
output of 'hostname -s') will be printed.

requested by and ok deraadt; mostly positive feedback many
ok anton, brynet, bcallah and others



CVS: cvs.openbsd.org: src

2017-12-11 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2017/12/11 16:33:44

Modified files:
games/grdc : grdc.c 

Log message:
The code can be simplified by using clock_gettime(2)'s CLOCK_REALTIME
instead of gettimeofday(2).

>From Scott Cheloha, ok jca



CVS: cvs.openbsd.org: src

2017-12-11 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/12/11 16:31:16

Modified files:
sys/sys: time.h 

Log message:
Proper do {} while (0) idiom in TIMESPEC_TO_TIMEVAL/TIMEVAL_TO_TIMESPEC

>From Scott Cheloha, ok tb@



CVS: cvs.openbsd.org: src

2017-12-11 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2017/12/11 16:24:59

Modified files:
sys/dev/fdt: sxiccmu.c sxiccmu_clocks.h 

Log message:
Implement support for the "next-generation" clock bindings for the
Allwinner A80.



CVS: cvs.openbsd.org: src

2017-12-11 Thread Stefan Sperling
CVSROOT:/cvs
Module name:src
Changes by: s...@cvs.openbsd.org2017/12/11 15:23:00

Modified files:
sys/net80211   : ieee80211_output.c 

Log message:
Omit the PMKID count field from RSN information elements (IE) if the PMKID
list has zero elements and PMKID would be the last field in the RSN IE.

This is correct as per 802.11-2012 8.4.2.27.1 and aligns net80211 code with
behaviour of bwfm(4) firmware, unblocking further progress in that driver.

ok patrick@ phessler@



CVS: cvs.openbsd.org: xenocara

2017-12-11 Thread Okan Demirmen
CVSROOT:/cvs
Module name:xenocara
Changes by: o...@cvs.openbsd.org2017/12/11 13:58:18

Modified files:
app/cwm: calmwm.h kbfunc.c menu.c 

Log message:
Unconditionally show prompt on menus, regardless of invocation.



CVS: cvs.openbsd.org: src

2017-12-11 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2017/12/11 10:13:34

Modified files:
sys/ufs/ffs: ffs_vfsops.c 

Log message:
Disable DIOCCACHESYNC code, which I believe does the opposite
and can cause pending IO's on wd(4) to be thrown away.  Still
trying to find a solution.



CVS: cvs.openbsd.org: src

2017-12-11 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/12/11 07:11:22

Modified files:
sys/kern   : vfs_subr.c 

Log message:
Format the vnode lists of ddb show mount properly in columns.
OK krw@



CVS: cvs.openbsd.org: src

2017-12-11 Thread Martijn van Duren
CVSROOT:/cvs
Module name:src
Changes by: mart...@cvs.openbsd.org 2017/12/11 06:25:57

Modified files:
usr.bin/sed: compile.c sed.1 

Log message:
Fix and change y command in the following ways:
- When 'n' is used as a delimiter escaping 'n' will remain a newline
instead of becoming a 'n' character. This is how POSIX specifies how this
should work. Other implementations tested also do this wrong.
- '[' and maybe other characters are not special during the parsing of the
y command and don't need to be matched or treated special in any way.
- POSIX specifies that a backslash followed by anything other than the
delimiter, 'n', and another backslash, as well as repeating characters in
string1 are unspecified. Since the various implementations handle these
situations in opposing ways choose to error out on them to prevent people
falling into the pitfall of expecting identical behaviour on various
implementations.

Inspired by the sed.1 patch by kshe59  zoho  eu
Feedback and OK millert@
Manpage bits OK jmc@



CVS: cvs.openbsd.org: src

2017-12-11 Thread Helg Bredow
CVSROOT:/cvs
Module name:src
Changes by: h...@cvs.openbsd.org2017/12/11 05:38:54

Modified files:
lib/libfuse: fuse_opt.c 
regress/lib/libfuse: fuse-opt-parse.c 

Log message:
sscanf(3) is now used to parse templates that contain format specifiers
(e.g. %u, %o) other than %s. This aligns libfuse with the Linux reference
implementation.

ok mpi@



CVS: cvs.openbsd.org: src

2017-12-11 Thread Helg Bredow
CVSROOT:/cvs
Module name:src
Changes by: h...@cvs.openbsd.org2017/12/11 05:31:00

Modified files:
lib/libfuse: fuse_opt.c 

Log message:
Update to fuse_opt_parse(3) so that all option templates are now matched for
the supplied option. This allows the following templates to be supplied to set
multiple members of a struct at the same time. e.g.

#define FUSE_LIB_OPT(t, p, v) { t, offsetof(struct fuse_config, p), v }

static const struct fuse_opt fuse_lib_opts[] = {
FUSE_LIB_OPT("gid=",  set_gid, 1),
FUSE_LIB_OPT("gid=%u",gid, 0),
FUSE_OPT_END
};

If "-ogid=1000" is passed to fuse_opt_parse(3) it will set both:

fuse_config.set_gid=1
fuse_config.gid=1000

ok mpi@



CVS: cvs.openbsd.org: src

2017-12-11 Thread Helg Bredow
CVSROOT:/cvs
Module name:src
Changes by: h...@cvs.openbsd.org2017/12/11 05:01:55

Modified files:
lib/libfuse: fuse_opt.c 
regress/lib/libfuse: fuse-opt-match.c 

Log message:
The fuse_opt_match(3) library function does not match options correctly.
libfuse supports option templates of the following form that can be used
to automatically parse arguments supplied on the command line.

"-p "   argument that takes an option e.g -p 22 or -p22
"-p %x" argument that takes an option parsed like sscanf(3)
"cache=yes" matches -ocache=yes or -o cache=yes
"cache=%s"  matches -ocache= or -o cache=
"cache="matches same as above but value is passed to option proc
"noatime"   matches -onoatime or -o atime

For example, it does not match options of the form "-p 22" or
"cache=yes" to the corresponding templates "-p " and "cache=yes".  This
patch fixes that and updates the regression tests accordingly.

ok mpi@



CVS: cvs.openbsd.org: src

2017-12-11 Thread Darren Tucker
CVSROOT:/cvs
Module name:src
Changes by: dtuc...@cvs.openbsd.org 2017/12/11 04:41:56

Modified files:
regress/usr.bin/ssh: scp-uri.sh 

Log message:
use cmp in a loop instead of diff -N to compare directories. The former
works on more platforms for Portable.



CVS: cvs.openbsd.org: src

2017-12-11 Thread Brent Cook
CVSROOT:/cvs
Module name:src
Changes by: bc...@cvs.openbsd.org   2017/12/11 04:04:04

Modified files:
lib/libcrypto  : opensslv.h 

Log message:
bump to 2.7.0



CVS: cvs.openbsd.org: src

2017-12-11 Thread Brent Cook
CVSROOT:/cvs
Module name:src
Changes by: bc...@cvs.openbsd.org   2017/12/11 03:50:37

Modified files:
lib/libcrypto  : Tag: OPENBSD_6_2 opensslv.h 

Log message:
bump to 2.6.4