Re: remove /dev/sound*

2016-09-08 Thread Michael W. Bombardieri
Hi Alexandre, Do you know if any applications in ports use /dev/sound as default audio device. Maybe they are not smart enough to try /dev/audio if /dev/sound fails. - Michael On Thu, Sep 08, 2016 at 08:12:45AM +0200, Alexandre Ratchov wrote: > As audio(4) manual says "In all respects

Re: remove /dev/sound*

2016-09-08 Thread Alexandre Ratchov
On Thu, Sep 08, 2016 at 01:47:02PM +0800, Michael W. Bombardieri wrote: > Hi Alexandre, > > Do you know if any applications in ports use /dev/sound as default audio > device. > Maybe they are not smart enough to try /dev/audio if /dev/sound fails. > Hi, I'm not aware of any port using

ksh tab completion: ^_: unexpected `^'

2016-09-08 Thread Stuart Henderson
I just ran into this which was introduced with custom completions (I haven't setup any complete_* arrays). $ ag "(foo)[^_]" /u results in ksh: ^_: unexpected `^'

Re: ksh tab completion: ^_: unexpected `^'

2016-09-08 Thread Nicholas Marriott
Yeah we probably shouldn't bother to look for commands that aren't [A-Za-z0-9_-]: Index: edit.c === RCS file: /cvs/src/bin/ksh/edit.c,v retrieving revision 1.56 diff -u -p -r1.56 edit.c --- edit.c 7 Sep 2016 04:42:31 -

Re: ksh tab completion: ^_: unexpected `^'

2016-09-08 Thread Stuart Henderson
On 2016/09/08 10:45, Nicholas Marriott wrote: > Yeah we probably shouldn't bother to look for commands that aren't > [A-Za-z0-9_-]: I don't think - is necessary, it's not a valid character for an array name so it can't be used here anyway. Otherwise OK. > Index: edit.c >

remove /dev/sound*

2016-09-08 Thread Alexandre Ratchov
As audio(4) manual says "In all respects /dev/audio and /dev/sound are identical". Only one of them is needed and this diff is to remove /dev/sound. OK? Index: etc/MAKEDEV.common === RCS file: /cvs/src/etc/MAKEDEV.common,v

Re: remove /dev/sound*

2016-09-08 Thread Stuart Henderson
On 2016/09/08 13:47, Michael W. Bombardieri wrote: > Hi Alexandre, > > Do you know if any applications in ports use /dev/sound as default audio > device. > Maybe they are not smart enough to try /dev/audio if /dev/sound fails. Here are search results - there are false positoves from

Re: replace microtime with getmicrouptime in ip_mroute.c

2016-09-08 Thread Florian Obser
OK florian@ On Thu, Sep 08, 2016 at 11:54:01AM +1000, David Gwynne wrote: > it uses the time to rate limit the sending of assertion messages. > > there are two reasons for this change. > > firstly, using uptime instead of wall time means the intervals will > be measured against a a monotonic

Re: remove unreachable code from all audio drivers

2016-09-08 Thread Philip Guenther
On Wed, 7 Sep 2016, Alexandre Ratchov wrote: > This diff deletes unreachable code in low-level audio drivers. As > this touches all archs, tests (a quick kernel build is enough) are > welcome on anything but amd64 and i386. > > OK? Kernel builds and boots and a file recorded with aucat -o plays

mg: region.c:preadin() - Also check for read() error

2016-09-08 Thread Mark Lumsden
Source Joachim Nilsson: Coverity Scan found this interesting buglet. If read() fails the code, before this patch, would trigger a "Negative array index write". ok? Index: region.c === RCS file: /cvs/src/usr.bin/mg/region.c,v

Re: mg: region.c:preadin() - Also check for read() error

2016-09-08 Thread Florian Obser
Haha OK florian@ On Thu, Sep 08, 2016 at 07:58:29AM +, Mark Lumsden wrote: > Source Joachim Nilsson: > > Coverity Scan found this interesting buglet. If read() fails the code, > before this patch, would trigger a "Negative array index write". > > ok? > > Index: region.c >

ps -o etime

2016-09-08 Thread Carlin Bingham
The "etime" keyword is currently an alias for "start". posix says it should be the amount of time since the program started running, in the format [[dd-]hh:]mm:ss, I've encountered some code that doesn't work on openbsd because that's what it expects. The commit that added this in '97 says it was

Re: Bridge broken in 6.0?

2016-09-08 Thread Henning Brauer
* Aaron Riekenberg [2016-09-05 13:04]: > Thanks for the explanation. > > I am curious though - is dhclient really the right place to fix this? I > might use some other dhcp client (dhcpcd in ports for example) or some > other application that uses BPF. Should every

Re: ksh tab completion: ^_: unexpected `^'

2016-09-08 Thread sven falempin
This does not include UTF8 basic character, so if someone do And it want to do it again for that file ... sviňák , does not work. This problem should be address in isalnum, i guess, i think some c++ lib did it already, and i have a headache everytime i want to use \w in a regexp. current $

Re: ps -o etime

2016-09-08 Thread Ted Unangst
Carlin Bingham wrote: > The "etime" keyword is currently an alias for "start". posix says it > should be the amount of time since the program started running, in the > format [[dd-]hh:]mm:ss, I've encountered some code that doesn't work on > openbsd because that's what it expects. The commit that

Re: ps -o etime

2016-09-08 Thread Todd C. Miller
On Thu, 08 Sep 2016 23:15:01 +1200, Carlin Bingham wrote: > The "etime" keyword is currently an alias for "start". posix says it > should be the amount of time since the program started running, in the > format [[dd-]hh:]mm:ss, I've encountered some code that doesn't work on > openbsd because

ksh(1): manual says $PPID is read-only

2016-09-08 Thread Anthony Coulter
The ksh(1) manual says that PPID should be read-only. But: $ man ksh | grep PPID PPID The process ID of the shell's parent (read-only). $ echo ${PPID} 5967 $ PPID=123 $ echo ${PPID} 123 We can fix either the manual or ksh

Re: ksh tab completion: ^_: unexpected `^'

2016-09-08 Thread Nicholas Marriott
This is incoherent and I don't see what it has to do with the issue, you will need to provide a diff yourself. On Thu, Sep 08, 2016 at 09:18:19AM -0400, sven falempin wrote: > This does not include UTF8 basic character, > > so if someone do > > And it want to do it again for that file ...

Re: ksh(1): manual says $PPID is read-only

2016-09-08 Thread Theo Buehler
On Thu, Sep 08, 2016 at 09:22:28AM -0600, Todd C. Miller wrote: > On Thu, 08 Sep 2016 10:08:23 -0400, Anthony Coulter wrote: > > > We can fix either the manual or ksh itself; this diff takes the latter > > approach. It is tempting to do this with "typeset -ir PPID" but that > > actually doesn't

Re: ksh(1): manual says $PPID is read-only

2016-09-08 Thread Todd C. Miller
On Thu, 08 Sep 2016 17:33:37 +0200, Theo Buehler wrote: > Your fix looks correct to me and accomplishes the desired effect. Should > we perhaps introduce > > #define NO_RO_CHECK 0x4 > > and replace the 5 occurrences of the magic number in var.c? Yes, I would like that. - todd

Re: ksh(1): manual says $PPID is read-only

2016-09-08 Thread Theo Buehler
On Thu, Sep 08, 2016 at 10:08:23AM -0400, Anthony Coulter wrote: [..] > We can fix either the manual or ksh itself; this diff takes the latter > approach. It is tempting to do this with "typeset -ir PPID" but that > actually doesn't work: > > $ FOO=123 > $ typeset -ir FOO >

Re: ksh(1): manual says $PPID is read-only

2016-09-08 Thread Todd C. Miller
On Thu, 08 Sep 2016 10:08:23 -0400, Anthony Coulter wrote: > We can fix either the manual or ksh itself; this diff takes the latter > approach. It is tempting to do this with "typeset -ir PPID" but that > actually doesn't work: > > $ FOO=123 > $ typeset -ir FOO > ksh: FOO: is

Re: ksh(1): manual says $PPID is read-only

2016-09-08 Thread Todd C. Miller
I've committed my fix to make "typeset -ir PPID" work and adjusted the PPID line in initcoms[] accordingly. - todd

Installer: get nameserver from rebound.conf

2016-09-08 Thread Christian Weisgerber
If you have set up a machine to use rebound(8), then boot the install media to perform an upgrade, you won't be able to fetch the sets over the network because there is no nameserver in resolv.conf and rebound isn't running. The diff below adds the nameserver from rebound.conf to the ramdisk's

Re: remove /dev/sound*

2016-09-08 Thread Alexandre Ratchov
On Thu, Sep 08, 2016 at 08:22:16AM +0100, Stuart Henderson wrote: > On 2016/09/08 13:47, Michael W. Bombardieri wrote: > > Hi Alexandre, > > > > Do you know if any applications in ports use /dev/sound as default audio > > device. > > Maybe they are not smart enough to try /dev/audio if

Re: Fix Wacom Intuos S 2 descriptor and make wsmouse work

2016-09-08 Thread Ulf Brosziewski
Maybe one day I'll get it right: s/wsmouse_input_sync()/wsmouse_input_sync(ms->sc_wsmousedev)/ On 09/07/2016 12:12 AM, Ulf Brosziewski wrote: > Hi, I was a bit hasty, I should have mentioned that calling > wsmouse_input_sync is required here. The equivalent of your > code would would be this:

Re: random malloc junk

2016-09-08 Thread Daniel Micay
On Wed, 2016-09-07 at 18:29 -0400, Ted Unangst wrote: > Instead of always using a fixed byte pattern, I think malloc should > use a > random pattern. Now, this sometimes means it's harder to identify > exactly > what's used after free, so we should provide a means to get the old > 0xdf > pattern

Re: random malloc junk

2016-09-08 Thread Daniel Micay
A nice security property of 0xdf filling is that a use-after-free of a pointer is guaranteed to fault in a typical environment since it ends up pointing outside userspace (I assume that's the case on OpenBSD). A heap spray could potentially allow exploiting a random pointer. Perhaps it would be

Re: random malloc junk

2016-09-08 Thread Daniel Micay
> BTW, we should revisit canaries and work further on moving them > closer to requested size. There's a chance this diff wil complicate > that. Can switch the canary code to memcpy/memcmp (to handle unaligned canaries) and could then use the last byte as an index to the start of the canary. For

reduce double caching in mfs

2016-09-08 Thread Ted Unangst
Currently, the bufcache doesn't know that mfs is backed by memory. All i/o to mfs ends up being double cached, once in the userland process and again in the kernel bufcache. This is wasteful. In particular, it means one can't use mfs to increase the effective size of the buffer cache. Reading or

ports; why I removed SIGNING_PARAMETERS

2016-09-08 Thread Marc Espie
It used to make some kind of sense when pkg_create could indeed create the signed package in one pass. Now, the new signing mode means you have to build the package and copy it anyway. Heck, the code is not even inside pkg_sign proper, pkg_sign is going to become a shell that just keeps the