Re: Add machdep.lidaction=3 - powerdown laptop upon lid closing

2017-07-27 Thread Bryan Steele
On Fri, Jul 28, 2017 at 12:09:17AM +0100, Marco Bonetti wrote: > It looks like spaces and tabs got mangled, I'm resending the diff in-line in > this email. > > Any other comments / OKs ? > > Index: etc/etc.amd64/sysctl.conf > === >

Re: Add machdep.lidaction=3 - powerdown laptop upon lid closing

2017-07-27 Thread Marco Bonetti
It looks like spaces and tabs got mangled, I'm resending the diff in-line in this email. Any other comments / OKs ? Index: etc/etc.amd64/sysctl.conf === RCS file: /cvs/src/etc/etc.amd64/sysctl.conf,v retrieving revision 1.7 diff -u

Re: netstat: uint32_t is never < 0

2017-07-27 Thread Sebastian Benoit
Florian Obser(flor...@openbsd.org) on 2017.07.27 19:48:24 +: > /usr/src/usr.bin/netstat/inet.c:342:19: warning: comparison of unsigned > expression < 0 is always false [-Wtautological-compare] > if (kf->t_state < 0 || kf->t_state >= TCP_NSTATES) >

Re: bgplg: an array is never NULL

2017-07-27 Thread Sebastian Benoit
Florian Obser(flor...@openbsd.org) on 2017.07.27 19:51:38 +: > ... pointed out by clang > > OK? ok benno@ > diff --git usr.bin/bgplg/misc.c usr.bin/bgplg/misc.c > index 38837cc88c8..1834f38fa0d 100644 > --- usr.bin/bgplg/misc.c > +++ usr.bin/bgplg/misc.c > @@ -51,7 +51,7 @@

Patch with support for pass rewrite for httpd

2017-07-27 Thread Ibrahim Khalifa
Hi, There have been some patches for supporting rewriting in httpd. Since this is a feature I need to be able to switch over to stock httpd, I thought I would chime in with a patch as well. Maybe (or maybe not) this can help move things a step further to get the feature implemented. Some

Re: [patch/route] Allow short commands

2017-07-27 Thread Denis Fondras
> > +1 for a specific alias for "del" though. > > I also worry about this. However the addition of a few well-selected > shortenings is OK. > Here is a patch that adds the "del" shortcut. I am not sure the usage() et man are changed the "right way" though. Index: keywords.h

bgplg: an array is never NULL

2017-07-27 Thread Florian Obser
... pointed out by clang OK? diff --git usr.bin/bgplg/misc.c usr.bin/bgplg/misc.c index 38837cc88c8..1834f38fa0d 100644 --- usr.bin/bgplg/misc.c +++ usr.bin/bgplg/misc.c @@ -51,7 +51,7 @@ lg_checkperm(struct cmd *cmd) struct stat stbuf; /* No external command to execute, this

nsd: prototypes for __b64_pton and __b64_ntop

2017-07-27 Thread Florian Obser
... to silence clang warnings, it kinda has a point... e.g.: /usr/src/usr.sbin/nsd/zonec.c:642:6: warning: implicit declaration of function '__b64_pton' is invalid in C99 [-Wimplicit-function-declaration] i = __b64_pton(b64, buffer, B64BUFSIZE);

Re: [patch/route] Allow short commands

2017-07-27 Thread Theo de Raadt
> > I took bgpctl as an example. If there is an ambiguity, route(8) will > > complain. > > As stated in the man "Commands may be abbreviated to the minimum unambiguous > > prefix". I guess the shortcuts are to be used only interactively. Using the > > longer keyword in a script or in hostname.if

Re: [patch/route] Allow short commands

2017-07-27 Thread Jeremie Courreges-Anglas
On Thu, Jul 27 2017, Stuart Henderson wrote: > On 2017/07/27 19:53, Denis Fondras wrote: >> Thank you for your comment. >> >> > This will lead to usage and documentation issues (aside from your >> > diff not including a manpage change): >> > >> >> You are right, I missed

Re: [patch/route] Allow short commands

2017-07-27 Thread Stuart Henderson
On 2017/07/27 19:53, Denis Fondras wrote: > Thank you for your comment. > > > This will lead to usage and documentation issues (aside from your > > diff not including a manpage change): > > > > You are right, I missed the manpage bits. > > > With your diff, someone might write somewhere > > >

Re: [patch/route] Allow short commands

2017-07-27 Thread Denis Fondras
Thank you for your comment. > This will lead to usage and documentation issues (aside from your > diff not including a manpage change): > You are right, I missed the manpage bits. > With your diff, someone might write somewhere > > just type "route a default 192.0.2.1" to configure a default

Re: vmd: reset queue_size if queue_select is invalid

2017-07-27 Thread Mike Larkin
On Wed, Jul 26, 2017 at 09:37:30PM -0700, Nick Owens wrote: > hello tech@, > > here is a diff that will follow the virtio spec a little closer, and > allows 9front's (http://9front.org) virtio-blk driver to correctly find > the number of queues. i know that virtio-blk only has one queue, but >

Re: [patch/route] Allow short commands

2017-07-27 Thread Sebastian Benoit
Denis Fondras(open...@ledeuns.net) on 2017.07.26 18:42:13 +0200: > Hi, > > I use route(8) a lot and I thought being able to use shorter commands/keywords > could be nice. Like : > > route a default 192.0.2.1 > route del default > > Regards, > Denis This will lead to usage and documentation

Re: [diff] httpd: tls client cert & CRL checks

2017-07-27 Thread Jack Burton
On Thu, 27 Jul 2017 13:10:14 +0200 Jan Klemkow wrote: > Hi Jack, > > On Fri, Jul 21, 2017 at 06:33:43PM +0930, Jack Burton wrote: > > Thoughts? > > I've tested your diff. The main feature looks fine to me. TLS > connections with and with out Clients certs, as well as

Re: printf(3) return value on ENOMEM

2017-07-27 Thread Theo de Raadt
> But you do find careful checks in unusually well-written software > (abbreviated): > > /usr/src/usr.sbin/ntpd/ntpd.c > int writefreq(double d) { > r = fprintf(freqfp, "%.3f\n", d * 1e6); /* scale to ppm */ > if (r < 0 || fflush(freqfp) != 0) { > > So, our current libc can trick

Re: DRM pool fix

2017-07-27 Thread Mark Kettenis
> Date: Thu, 27 Jul 2017 17:26:57 +0200 > From: Martin Pieuchot > > Fix a copy/paste, found while trying to track the possible leak I'm > seeing. > > ok? Ouch. Eh, yes. ok kettenis@ > Index: i915/i915_gem.c >

Re: printf(3) return value on ENOMEM

2017-07-27 Thread Ingo Schwarze
Hi Theo, Theo de Raadt wrote on Wed, Jul 26, 2017 at 11:27:03PM -0600: > Ted Unangst wrote: >> returning -1 to indicate error, ignoring the possibility of short >> output, seems like the option that results in less damage. as an >> application author, it's the only behavior i can reasonably code

DRM pool fix

2017-07-27 Thread Martin Pieuchot
Fix a copy/paste, found while trying to track the possible leak I'm seeing. ok? Index: i915/i915_gem.c === RCS file: /cvs/src/sys/dev/pci/drm/i915/i915_gem.c,v retrieving revision 1.108 diff -u -p -r1.108 i915_gem.c ---

Re: [PATCH] ure improvement

2017-07-27 Thread sc dying
On 2017/07/27 12:22, Martin Pieuchot wrote: > On 25/07/17(Tue) 00:30, sc dying wrote: >> On 2017/07/24 14:35, Martin Pieuchot wrote: >>> [...] >>> Here's a diff to try and play with. I'd guess the problem is in >>> pipe_close(). Which state has the EP you're closing? Do we close >>> the EP

Re: printf(3) return value on ENOMEM

2017-07-27 Thread Ingo Schwarze
Hi Ted, Ted Unangst wrote on Thu, Jul 27, 2017 at 01:08:24AM -0400: > Ingo Schwarze wrote: >> So i say in all cases above, return -1, set ENOMEM, and it doesn't >> matter much whether anything is printed, except that asprintf(3) >> must of course free(3) any allocated memory before returning and

Re: snmpd getbulk replies

2017-07-27 Thread Stuart Henderson
On 2017/07/27 14:01, Gerhard Roth wrote: > could you please try the updated patch below. I guess the non-repeater > parameters was completely ignored before. Nearly there :) > - msg->sm_maxrepetitions); > +

Re: w: Remove XXX'ed check

2017-07-27 Thread Klemens Nanni
On Thu, Jul 27, 2017 at 02:03:05PM +0200, Jeremie Courreges-Anglas wrote: > On Thu, Jul 27 2017, Klemens Nanni wrote: > > Only main() calls pr_args() in L330 with ep->kp as argument which in > > turn is set in L257 or L266 for every utmp entry. kp is checked against > > NULL

Re: [PATCH] ure improvement

2017-07-27 Thread Martin Pieuchot
On 25/07/17(Tue) 00:30, sc dying wrote: > On 2017/07/24 14:35, Martin Pieuchot wrote: > > [...] > > Here's a diff to try and play with. I'd guess the problem is in > > pipe_close(). Which state has the EP you're closing? Do we close > > the EP correctly? > > EP 3 is RX pipe, EP 4 is TX pipe. >

Re: w: Remove XXX'ed check

2017-07-27 Thread Jeremie Courreges-Anglas
On Thu, Jul 27 2017, Klemens Nanni wrote: > Only main() calls pr_args() in L330 with ep->kp as argument which in > turn is set in L257 or L266 for every utmp entry. kp is checked against > NULL already in L229. > > Even if kp was somehow NULL chances are high we'd fail before

Re: snmpd getbulk replies

2017-07-27 Thread Gerhard Roth
On Thu, 27 Jul 2017 12:46:23 +0100 Stuart Henderson wrote: > On 2017/07/27 10:58, Gerhard Roth wrote: > > Hi, > > > > snmpd uses the same storage for sm_error and sm_nonrepeaters. Same applies > > to sm_errorindex and sm_maxrepetitions. If we produce a response PDU to > >

Re: snmpd getbulk replies

2017-07-27 Thread Stuart Henderson
On 2017/07/27 10:58, Gerhard Roth wrote: > Hi, > > snmpd uses the same storage for sm_error and sm_nonrepeaters. Same applies > to sm_errorindex and sm_maxrepetitions. If we produce a response PDU to > a getbulk request, sm_error will carry the number of non-repeaters from > the request and

w: Remove XXX'ed check

2017-07-27 Thread Klemens Nanni
Only main() calls pr_args() in L330 with ep->kp as argument which in turn is set in L257 or L266 for every utmp entry. kp is checked against NULL already in L229. Even if kp was somehow NULL chances are high we'd fail before pr_args() was called anyway since L244, L256 and L265 would then cause a

Re: [diff] httpd: tls client cert & CRL checks

2017-07-27 Thread Jan Klemkow
Hi Jack, On Fri, Jul 21, 2017 at 06:33:43PM +0930, Jack Burton wrote: > Thoughts? I've tested your diff. The main feature looks fine to me. TLS connections with and with out Clients certs, as well as with and without certificate revocation lists seams to work. Also, the tests are passing.

Re: less(1) - segmentation fault with '-g'

2017-07-27 Thread Klemens Nanni
On Thu, Jul 27, 2017 at 10:31:51AM +0100, Larry Hynes wrote: > $ env | grep LESS > LESSHISTFILE=- > LESS="-i -M -R -g -c" > LESSCHARSET=utf-8 > > $ unset LESS > $ unset LESSCHARSET > $ unset LESSHISTFILE > > $ LESS="-g" > $ echo 'foo\nbar\nfoo\nbar\nfoo\nbar' | less > > While in less, '/' to

less(1) - segmentation fault with '-g'

2017-07-27 Thread Larry Hynes
Hi $ env | grep LESS LESSHISTFILE=- LESS="-i -M -R -g -c" LESSCHARSET=utf-8 $ unset LESS $ unset LESSCHARSET $ unset LESSHISTFILE $ LESS="-g" $ echo 'foo\nbar\nfoo\nbar\nfoo\nbar' | less While in less, '/' to search, then '^N', or '!', to search for lines which do NOT match the pattern,

snmpd getbulk replies

2017-07-27 Thread Gerhard Roth
Hi, snmpd uses the same storage for sm_error and sm_nonrepeaters. Same applies to sm_errorindex and sm_maxrepetitions. If we produce a response PDU to a getbulk request, sm_error will carry the number of non-repeaters from the request and sm_errorindex the max. number of repetitions. This is

caesar(6) documents incorrect frequencies

2017-07-27 Thread Matthew Martin
The man page documents frequencies that are different than the code uses e.g. C (3.61 vs 2.7) and D (4.78 vs 3.8). This seems a bit much for a man page. If anyone prefers the letter ordering be kept, the correct order is ETSAORINDHLCPMUYFWGBVKXQZJ . - Matthew Martin diff --git caesar.6 caesar.6