Re: sndiod hangs

2015-07-17 Thread Alexandre Ratchov
On Mon, Jul 13, 2015 at 12:52:14PM +0200, Alexandre Ratchov wrote: On Sat, Jul 11, 2015 at 02:23:03PM +0200, Mark Kettenis wrote: Every now and then sndiod hangs on me. Usually I discover this as mplayer hangs while playing a video or hangs while opening the audio device on startup.

Re: [patch] Disklabel message tweak

2015-07-17 Thread Michael McConville
On Fri, Jul 17, 2015 at 03:53:09PM +0200, Benny Lofgren wrote: On 2015-07-17 08:57, Theo de Raadt wrote: The phrase No label changes. was selected because it is true (there is nothing to save). I don't see what further adds to make this more accurate or understandable. Perhaps phrasing

Re: Fix socketpair(2) handling of unix datagram sockets using cloexec/nonblock

2015-07-17 Thread Jeremy Evans
On 07/16 05:05, Philip Guenther wrote: On Thu, Jul 16, 2015 at 4:54 PM, Jeremy Evans jer...@openbsd.org wrote: Fix socketpair(2) on Unix datagram sockets that use SOCK_CLOEXEC or SOCK_NONBLOCK. This fixes a failure in the ruby test suite. OK? No, that'll have false positives on

Re: [patch] Disklabel message tweak

2015-07-17 Thread Benny Lofgren
On 2015-07-17 08:57, Theo de Raadt wrote: The phrase No label changes. was selected because it is true (there is nothing to save). I don't see what further adds to make this more accurate or understandable. I would even argue that adding further makes it more INaccurate and also adds

Re: Ask for password for failed commands

2015-07-17 Thread Bob Beck
I concur. Vadim I like the basic idea, but I do not like that in the bogus case we still run all the priviledged user auth code. On Thu, Jul 16, 2015 at 4:30 PM, Ted Unangst t...@tedunangst.com wrote: Vadim Zhukov wrote: Ask for a password when we're going to fail() anyway, to avoid leaking

Re: Ask for password for failed commands

2015-07-17 Thread David Gwynne
On 17 Jul 2015, at 16:18, Bob Beck b...@openbsd.org wrote: I concur. Vadim I like the basic idea, but I do not like that in the bogus case we still run all the priviledged user auth code. sudo also has the -l flag, which lists what commands you're allowed to run. however, it looks like if

Re: [patch] Disklabel message tweak

2015-07-17 Thread Theo de Raadt
This is another trivial patch, but I've always found the disklabel message No label changes confusing. For example, if you print (p), add a label (a), write (w), print to check your changes (p), and then quit (q), it seems odd to be told No label changes. Index: sbin/disklabel/editor.c

merging usb_video_header_desc and usb_video_header_desc_all

2015-07-17 Thread Ludovic Coues
Following yesterday feedback, I wrote a patch merging usb_video_header_desc and usb_video_header_desc_all in uvideo.c . Current kernel compile fine with it on amd64 and video display image. At the moment, I can't test the patch on other platform. So I'm looking for feedback, on the pattern used

Re: sa_family_t is not always equal to u_int8_t

2015-07-17 Thread Florian Obser
OK florian@ On Fri, Jul 17, 2015 at 01:41:17AM +0200, Alexandr Nedvedicky wrote: On Thu, Jul 16, 2015 at 11:10:06PM +, Miod Vallat wrote: cvs diff -p output: Please send unified diffs (diff -u). The easiest way is to have a diff -up line in your ~/.cvsrc file. Or diff -uNp if

sed -i

2015-07-17 Thread Jasper Lievisse Adriaanse
Hi, Here's a diff to add the '-i' flag to sed to do inplace edits. It's mostly from FreeBSD with some adjustments to prevent a race with unlink() and fopen() during the tempfile creation. It's been tested in a full ports bulk (thanks aja), and went through a build of base and xenocara. Regress

Re: tcpdump: decode 802.11 country element

2015-07-17 Thread Stefan Sperling
On Fri, Jul 17, 2015 at 03:59:12AM +0300, Vadim Zhukov wrote: 2015-07-17 2:53 GMT+03:00 Stefan Sperling s...@stsp.name: I don't think we should bother with invalid data. If it's not valid, we should silently skip it. Else tcpdump would have to print all sorts of warnings. I don't insist

Re: sed -i

2015-07-17 Thread Brian Callahan
On 07/17/15 12:10, Jasper Lievisse Adriaanse wrote: Hi, Here's a diff to add the '-i' flag to sed to do inplace edits. It's mostly from FreeBSD with some adjustments to prevent a race with unlink() and fopen() during the tempfile creation. It's been tested in a full ports bulk (thanks

Re: bridge(4) and etherip fix

2015-07-17 Thread Kazuya GODA
I tested this patch and etherip is working. ok goda On 2015/07/16 17:52, Martin Pieuchot wrote: goda@ found a regression due to the recent M_PROTO1 change. Apparently gif(4) is using this flag to know that a packet comes from bridge(4) and wants etherip encapsulation. Instead of hiding

Re: sed -i

2015-07-17 Thread Robert Peichaer
On Fri, Jul 17, 2015 at 06:10:46PM +0200, Jasper Lievisse Adriaanse wrote: Hi, Here's a diff to add the '-i' flag to sed to do inplace edits. It's mostly from FreeBSD with some adjustments to prevent a race with unlink() and fopen() during the tempfile creation. It's been tested in a full

Re: tcpdump: decode 802.11 country element

2015-07-17 Thread Stefan Sperling
On Fri, Jul 17, 2015 at 09:05:28PM +0300, Vadim Zhukov wrote: The tcpdump is hard. :( indeed :-/ Index: print-802_11.c === RCS file: /cvs/src/usr.sbin/tcpdump/print-802_11.c,v retrieving revision 1.21 diff -u -p -r1.21

Re: Thinkpad active cooling

2015-07-17 Thread Mark Kettenis
Tobias Ulmer schreef op 2015-07-15 05:42: On Wed, Jul 15, 2015 at 05:12:41AM +0300, Paul Irofti wrote: I am not familiar with all the fan hack specifics so please keep that in mind if my questions and comments seem trivial. This is an attempt to solve the problem slightly differently. -

Re: Kill arp_ifinit()?

2015-07-17 Thread Claudio Jeker
On Tue, Jul 14, 2015 at 07:57:32PM +0200, Martin Pieuchot wrote: On 07/07/15(Tue) 18:02, Martin Pieuchot wrote: Maybe not yet but at least I'd like to do the ARP request a bit later. We create a RTF_LOCAL route entry for every configured address. So use this information to emit a

Re: tcpdump: decode 802.11 country element

2015-07-17 Thread Vadim Zhukov
17 июля 2015 г. 20:07 пользователь Stefan Sperling s...@stsp.name написал: On Fri, Jul 17, 2015 at 03:59:12AM +0300, Vadim Zhukov wrote: 2015-07-17 2:53 GMT+03:00 Stefan Sperling s...@stsp.name: I don't think we should bother with invalid data. If it's not valid, we should silently skip

tcpdump mpls pseudowire support

2015-07-17 Thread Rafael Zalamena
This diff adds support for detection of pseudowires inside of MPLS tagged packets. Basically it teaches MPLS to look for ethernet headers when there is no sign of IP headers. Index: interface.h === RCS file:

Re: sed -i

2015-07-17 Thread Brian Callahan
On 07/17/15 13:51, Antoine Jacoutot wrote: On Fri, Jul 17, 2015 at 12:57:12PM -0400, Brian Callahan wrote: On 07/17/15 12:10, Jasper Lievisse Adriaanse wrote: Hi, Here's a diff to add the '-i' flag to sed to do inplace edits. It's mostly from FreeBSD with some adjustments to prevent a

Re: sed -i

2015-07-17 Thread Antoine Jacoutot
On Fri, Jul 17, 2015 at 12:57:12PM -0400, Brian Callahan wrote: On 07/17/15 12:10, Jasper Lievisse Adriaanse wrote: Hi, Here's a diff to add the '-i' flag to sed to do inplace edits. It's mostly from FreeBSD with some adjustments to prevent a race with unlink() and fopen()

Re: sed -i

2015-07-17 Thread Alexander Schrijver
On Fri, Jul 17, 2015 at 06:10:46PM +0200, Jasper Lievisse Adriaanse wrote: Here's a diff to add the '-i' flag to sed to do inplace edits. It's mostly from FreeBSD with some adjustments to prevent a race with unlink() and fopen() during the tempfile creation. \o/

Re: Thinkpad active cooling

2015-07-17 Thread Mark Kettenis
Tobias Ulmer schreef op 2015-07-15 02:33: As we all know, some Thinkpads have problems with their EC fan control. EC is not spinning up the fans to maximum speed, let alone blast mode. They also do not offer ACPI methods to spin the fan up. Previous diffs doing manual fan control were always

Re: tcpdump: decode 802.11 country element

2015-07-17 Thread Vadim Zhukov
17 июля 2015 г. 21:58 пользователь Stefan Sperling s...@stsp.name написал: On Fri, Jul 17, 2015 at 09:05:28PM +0300, Vadim Zhukov wrote: The tcpdump is hard. :( indeed :-/ Index: print-802_11.c === RCS file:

Re: sed -i

2015-07-17 Thread Jérémie Courrèges-Anglas
Jasper Lievisse Adriaanse jas...@openbsd.org writes: Hi, Here's a diff to add the '-i' flag to sed to do inplace edits. It's mostly from FreeBSD with some adjustments to prevent a race with unlink() and fopen() during the tempfile creation. It's been tested in a full ports bulk (thanks

snmpd kroute diff

2015-07-17 Thread Claudio Jeker
Anyone running snmpd that can test this diff? It should help better report connected routes in -current. Similar diffs were commited to various routing daemons already. -- :wq Claudio Index: kroute.c === RCS file:

Re: httpd: hsts (rfc 6797)

2015-07-17 Thread Reyk Floeter
On Sat, Jul 18, 2015 at 12:14:37AM +, Florian Obser wrote: OK? As discussed, I like the implementation this way. Comments below. Reyk diff --git httpd.conf.5 httpd.conf.5 index b3eaad8..bfca29f 100644 --- httpd.conf.5 +++ httpd.conf.5 @@ -262,6 +262,18 @@ root directory of .Xr

Re: Get Ruby 2.2 test suite passing

2015-07-17 Thread Theo de Raadt
Ted Unangst wrote: Jeremy Evans wrote: As an aside, crypt(passwd, $2) returns : instead of NULL. I'm not sure if that's a security issue, but I think it is and we should fix it. I'll see if I can get a patch for that and send it to tech@. This is a weird edge case where niels

httpd: default type

2015-07-17 Thread Reyk Floeter
Hi, as requested by many, the following simple diff allows to change the default media type globally or per location, eg. default type text/plain Note that this diff conflicts with florian's HSTS diff, we'll reassign the flag in httpd.h based on which one goes in first. OK? Reyk

Patch to add -f flag to cat(1)

2015-07-17 Thread Sevan Janiyan
Hi, Attached is a patch to add the -f flag to cat(1). -f ensures that cat is opening a regular file in non blocking mode aborts otherwise. Obtained from NetBSD src/bin/cat/cat.c r1.22 r1.34 Sevan Janiyan From NetBSD cat.c r1.22, r1.34 cat.1 r1.18, r1.25 Index: bin/cat/cat.c

indent ifconfig(8) bridge rules output

2015-07-17 Thread Rafael Zalamena
This diff indents the output of bridge rules in ifconfig or ifconfig bridgeX. Old output: $ ifconfig bridge0 bridge0: flags=41UP,RUNNING groups: bridge priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp designated: id 00:00:00:00:00:00 priority 0

tcpdump wireless example

2015-07-17 Thread Stefan Sperling
I've been asked to add an example to tcpdump(8) that shows how wireless frames can be printed. Do we want something like that in this man page? Index: tcpdump.8 === RCS file: /cvs/src/usr.sbin/tcpdump/tcpdump.8,v retrieving revision

syslogd TCP input with octet counting

2015-07-17 Thread Alexander Bluhm
Hi, To accept all possible syslog over TCP framing methods, implement octet couting. This makes our TCP receiving side compatible to the sending format. ok? bluhm Index: usr.sbin/syslogd/syslogd.c === RCS file:

Re: indent ifconfig(8) bridge rules output

2015-07-17 Thread Reyk Floeter
On Sat, Jul 18, 2015 at 01:54:39AM -0300, Rafael Zalamena wrote: This diff indents the output of bridge rules in ifconfig or ifconfig bridgeX. OK reyk@ Old output: $ ifconfig bridge0 bridge0: flags=41UP,RUNNING groups: bridge priority 32768 hellotime 2 fwddelay 15 maxage

Re: tcpdump mpls pseudowire support

2015-07-17 Thread Claudio Jeker
On Fri, Jul 17, 2015 at 03:24:17PM -0300, Rafael Zalamena wrote: This diff adds support for detection of pseudowires inside of MPLS tagged packets. Basically it teaches MPLS to look for ethernet headers when there is no sign of IP headers. The addition of controlword_print() is for sure OK.

tcpdump: display 11n HT-operation element

2015-07-17 Thread Stefan Sperling
Make tcpdump display the HT-operation element in 802.11n management frames. Sample output from hackroom: htop=40MHz channels 40:39,protect non-HT,non-greenfield STA,non-HT STA ok? Index: print-802_11.c === RCS file:

Re: Get Ruby 2.2 test suite passing

2015-07-17 Thread Ted Unangst
Stuart Henderson wrote: On 2015/07/17 20:24, Ted Unangst wrote: Jeremy Evans wrote: As an aside, crypt(passwd, $2) returns : instead of NULL. I'm not sure if that's a security issue, but I think it is and we should fix it. I'll see if I can get a patch for that and send it to tech@.

OpenNTPD: Remove _PATH_DEVNULL

2015-07-17 Thread Brent Cook
/dev/null will be available on any POSIX system, but _PATH_DEVNULL may not, e.g. Solaris. There doesn't seem to be any advantage to using the define (and we don't use it much in the tree either.) http://pubs.opengroup.org/onlinepubs/95399/basedefs/xbd_chap10.html --- src/usr.sbin/ntpd/ntp.c

Re: Get Ruby 2.2 test suite passing

2015-07-17 Thread Bob Beck
On Fri, Jul 17, 2015 at 06:48:31PM -0600, Theo de Raadt wrote: my perspective is: absent clear knowledge of what programs are doing, attempts to second guess them in a library function are perilous. let us be standards compliant, and then at least any resulting holes are clearly the

Re: Get Ruby 2.2 test suite passing

2015-07-17 Thread Theo de Raadt
The only objection I can see is something stupid that does not check the error condition, derefs NULL, drops a core file in an insecure place, and therefore leaks information. To my mind this is a buggy program, combined with an insecure configuration, and we shouldn't be trying to save

Re: httpd: hsts (rfc 6797)

2015-07-17 Thread Ted Unangst
Reyk Floeter wrote: On Fri, Jul 17, 2015 at 08:20:11PM -0400, Ted Unangst wrote: Florian Obser wrote: OK? diff --git httpd.conf.5 httpd.conf.5 index b3eaad8..bfca29f 100644 --- httpd.conf.5 +++ httpd.conf.5 @@ -262,6 +262,18 @@ root directory of .Xr httpd 8 and

Re: httpd: hsts (rfc 6797)

2015-07-17 Thread Ted Unangst
Florian Obser wrote: OK? diff --git httpd.conf.5 httpd.conf.5 index b3eaad8..bfca29f 100644 --- httpd.conf.5 +++ httpd.conf.5 @@ -262,6 +262,18 @@ root directory of .Xr httpd 8 and defaults to .Pa /run/slowcgi.sock . +.It Ic hsts Oo Ar option Oc +Enable HTTP Strict Transport

Re: Get Ruby 2.2 test suite passing

2015-07-17 Thread Theo de Raadt
my perspective is: absent clear knowledge of what programs are doing, attempts to second guess them in a library function are perilous. let us be standards compliant, and then at least any resulting holes are clearly the program's fault. such programs always deference the pointer. So I agree

Re: Thinkpad active cooling

2015-07-17 Thread Vadim Zhukov
17 июля 2015 г. 22:24 пользователь Mark Kettenis mark.kette...@xs4all.nl написал: Tobias Ulmer schreef op 2015-07-15 05:42: On Wed, Jul 15, 2015 at 05:12:41AM +0300, Paul Irofti wrote: I am not familiar with all the fan hack specifics so please keep that in mind if my questions and comments

httpd: hsts (rfc 6797)

2015-07-17 Thread Florian Obser
OK? diff --git httpd.conf.5 httpd.conf.5 index b3eaad8..bfca29f 100644 --- httpd.conf.5 +++ httpd.conf.5 @@ -262,6 +262,18 @@ root directory of .Xr httpd 8 and defaults to .Pa /run/slowcgi.sock . +.It Ic hsts Oo Ar option Oc +Enable HTTP Strict Transport Security. +Valid options are: +.Bl -tag

Re: httpd: hsts (rfc 6797)

2015-07-17 Thread Carlin Bingham
On Sat, 18 Jul 2015, at 12:14 PM, Florian Obser wrote: OK? diff --git httpd.conf.5 httpd.conf.5 index b3eaad8..bfca29f 100644 --- httpd.conf.5 +++ httpd.conf.5 @@ -262,6 +262,18 @@ root directory of .Xr httpd 8 and defaults to .Pa /run/slowcgi.sock . +.It Ic hsts Oo Ar option Oc

Re: OpenNTPD: Remove _PATH_DEVNULL

2015-07-17 Thread Claudio Jeker
On Fri, Jul 17, 2015 at 07:43:11PM -0500, Brent Cook wrote: /dev/null will be available on any POSIX system, but _PATH_DEVNULL may not, e.g. Solaris. There doesn't seem to be any advantage to using the define (and we don't use it much in the tree either.) Also OK claudio@

Re: OpenNTPD: replace bzero with memset

2015-07-17 Thread Claudio Jeker
On Fri, Jul 17, 2015 at 07:41:11PM -0500, Brent Cook wrote: This diff converts bzero calls to memset, which is more portable and compilers can optimize as well. OK claudio@ --- src/usr.sbin/ntpd/client.c | 2 +- src/usr.sbin/ntpd/config.c | 6 +++--- src/usr.sbin/ntpd/control.c | 2 +-

Re: Get Ruby 2.2 test suite passing

2015-07-17 Thread Ted Unangst
Ted Unangst wrote: Jeremy Evans wrote: As an aside, crypt(passwd, $2) returns : instead of NULL. I'm not sure if that's a security issue, but I think it is and we should fix it. I'll see if I can get a patch for that and send it to tech@. This is a weird edge case where niels decided to

Re: httpd: hsts (rfc 6797)

2015-07-17 Thread Reyk Floeter
On Fri, Jul 17, 2015 at 08:51:54PM -0400, Ted Unangst wrote: Reyk Floeter wrote: On Fri, Jul 17, 2015 at 08:20:11PM -0400, Ted Unangst wrote: Florian Obser wrote: OK? diff --git httpd.conf.5 httpd.conf.5 index b3eaad8..bfca29f 100644 --- httpd.conf.5 +++ httpd.conf.5

Call for testing for tty diff

2015-07-17 Thread Stefan Fritsch
While writing a virtio-console driver, I have found a bug in ttwrite() that can cause hangs. Below is a fix and after talking to Theo, I would like to know if the patch causes regressions for anyone, for example hangs in pty input/output, serial ports, etc. Thanks in advance. Cheers, Stefan

Re: doubled words in libcrypto manuals

2015-07-17 Thread Ingo Schwarze
Hi Theo, Theo Buehler wrote on Wed, Jul 08, 2015 at 10:28:56AM +0200: While dabbling with J. Friedl's script for detecting doubled words in his Mastering Regular Expressions book, I found these four instances of doubled words. Three of these are completely straightforward:

OpenNTPD: replace bzero with memset

2015-07-17 Thread Brent Cook
This diff converts bzero calls to memset, which is more portable and compilers can optimize as well. --- src/usr.sbin/ntpd/client.c | 2 +- src/usr.sbin/ntpd/config.c | 6 +++--- src/usr.sbin/ntpd/control.c | 2 +- src/usr.sbin/ntpd/ntp.c | 6 +++--- src/usr.sbin/ntpd/ntpd.c| 4 ++--

Re: httpd: hsts (rfc 6797)

2015-07-17 Thread Reyk Floeter
On Fri, Jul 17, 2015 at 08:20:11PM -0400, Ted Unangst wrote: Florian Obser wrote: OK? diff --git httpd.conf.5 httpd.conf.5 index b3eaad8..bfca29f 100644 --- httpd.conf.5 +++ httpd.conf.5 @@ -262,6 +262,18 @@ root directory of .Xr httpd 8 and defaults to .Pa

Re: httpd: hsts (rfc 6797)

2015-07-17 Thread Stuart Henderson
On 2015/07/17 20:51, Ted Unangst wrote: Reyk Floeter wrote: On Fri, Jul 17, 2015 at 08:20:11PM -0400, Ted Unangst wrote: Florian Obser wrote: OK? diff --git httpd.conf.5 httpd.conf.5 index b3eaad8..bfca29f 100644 --- httpd.conf.5 +++ httpd.conf.5 @@ -262,6