uninitialised variable crashes in bgpd config parser

2017-10-18 Thread Jonathan Gray
Index: parse.y === RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v retrieving revision 1.315 diff -u -p -r1.315 parse.y --- parse.y 21 Aug 2017 14:41:22 - 1.315 +++ parse.y 19 Oct 2017 05:32:03 - @@ -3181,7 +3181,7 @@

fix memory handling in acme-client config parser

2017-10-18 Thread Jonathan Gray
Use after free and a memory leak. Index: parse.y === RCS file: /cvs/src/usr.sbin/acme-client/parse.y,v retrieving revision 1.17 diff -u -p -U4 -r1.17 parse.y --- parse.y 23 Mar 2017 12:59:32 - 1.17 +++ parse.y 19 Oct

Re: ksh: skip long history lines

2017-10-18 Thread Ori Bernstein
On Thu, 19 Oct 2017 00:22:51 +0200 Jeremie Courreges-Anglas wrote: > Those variables are static so that error messages are only printed once > in the shell lifetime. history reload happens each time the shell > detects that the histfile has been modified, which can happen often

ksh: extra rewind call

2017-10-18 Thread Jeremie Courreges-Anglas
This call was added along with the magic check, but it not actually needed: history_load already calls rewind(3). I feel like the magic check should also be in history_load(), so that a ksh process can recover at runtime from a binary->plaintext history file migration. Worth the trouble? ok for

Re: ksh: skip long history lines

2017-10-18 Thread Jeremie Courreges-Anglas
Hi Ori, thanks for your feedback. Reply and updated diff below, On Wed, Oct 18 2017, Ori Bernstein wrote: > On Wed, 18 Oct 2017 22:33:51 +0200 > Jeremie Courreges-Anglas wrote: > >> >> It would be nice to support arbitrarily long lines, but a first step

Re: queue packet in loopback

2017-10-18 Thread Alexandr Nedvedicky
Hello, On Wed, Oct 18, 2017 at 08:13:09PM +0200, Alexander Bluhm wrote: > On Wed, Oct 18, 2017 at 10:48:30AM +0200, Alexandr Nedvedicky wrote: > > I think you also want to add if_ih_remove() to loop_clone_destroy(). > > Yes, thanks for catching that. > > > I feel it should be called

Re: Httpd support for internal redirects.

2017-10-18 Thread Ori Bernstein
Pinging this patch. On Tue, 10 Oct 2017 21:31:20 -0700 Ori Bernstein wrote: > My website generator is a little stupid at times. It generates > files with .html suffixes, but urls without them. > > I worked around this with some redirects, but it never felt > quite right

Re: tftpd(8): diff for ip path rewrite

2017-10-18 Thread Jan Klemkow
On Wed, Oct 18, 2017 at 08:37:48PM +, Jason McIntyre wrote: > On Wed, Oct 18, 2017 at 10:25:13PM +0200, Jan Klemkow wrote: > > This diff adds an option for client IP address path prefixes to the > > tftpd(8). First, I used the -r rewrite socket for this, but... > > > > If you use the rewrite

Re: ksh: skip long history lines

2017-10-18 Thread Ori Bernstein
On Wed, 18 Oct 2017 22:33:51 +0200 Jeremie Courreges-Anglas wrote: > > It would be nice to support arbitrarily long lines, but a first step > would be to skip them gracefuly. > > The code modifies the loop condition: no tests against ferror(3)/feof(3) > are performed any more

ksh: skip long history lines

2017-10-18 Thread Jeremie Courreges-Anglas
It would be nice to support arbitrarily long lines, but a first step would be to skip them gracefuly. The code modifies the loop condition: no tests against ferror(3)/feof(3) are performed any more (I don't see their point). We could print a warning on ferror(), though, but that would be

tftpd(8): diff for ip path rewrite

2017-10-18 Thread Jan Klemkow
Hi, This diff adds an option for client IP address path prefixes to the tftpd(8). First, I used the -r rewrite socket for this, but... If you use the rewrite socket feature, the tftpd(8) will exit with an error when the rewrite socket is closed. A reopen of the socket is not possible, if its

ksh: remove the deprecated emacs-usemeta option

2017-10-18 Thread Jeremie Courreges-Anglas
This would make ''set -o emacs-usemeta'' a fatal error, which means that subsequent lines in your kshrc will not be run. I think people were given enough time to cope with this (6.2 users get a warning). ok? Index: misc.c === RCS

Re: queue packet in loopback

2017-10-18 Thread Alexander Bluhm
On Wed, Oct 18, 2017 at 10:48:30AM +0200, Alexandr Nedvedicky wrote: > I think you also want to add if_ih_remove() to loop_clone_destroy(). Yes, thanks for catching that. > I feel it should be called after if_detach(). I disagree. Other pseudo-interfaces call it before. But more

Re: KAME ioctl leftovers

2017-10-18 Thread Claudio Jeker
On Wed, Oct 18, 2017 at 01:34:27PM +0200, Martin Pieuchot wrote: > Kill ioctl(2) added with original KAME import that have never been used. > FreeBSD also stopped supporting them in 2013. > > ok? Agreed, if it builds OK claudio. The amount of - is shocking... > Index: sys/sockio.h >

Re: spamdb: allow keys to be specified in list mode

2017-10-18 Thread Jason McIntyre
On Wed, Oct 18, 2017 at 10:22:00AM -0600, Todd C. Miller wrote: > I often want to query a specific key instead of dumping out the > entire database. This lets you do things like: > > $ spamdb 180.124.41.143 > TRAPPED|180.124.41.143|1508373987 > > or: > > $ spamdb 74.125.198.26 180.124.41.143

spamdb: allow keys to be specified in list mode

2017-10-18 Thread Todd C. Miller
I often want to query a specific key instead of dumping out the entire database. This lets you do things like: $ spamdb 180.124.41.143 TRAPPED|180.124.41.143|1508373987 or: $ spamdb 74.125.198.26 180.124.41.143 107.161.26.205 WHITE|74.125.198.26|||1506223558|1506223558|1509333958|1|0

Re: libfuse: patch to prevent fuse-zip from dumping core

2017-10-18 Thread Helg Bredow
On Wed, 18 Oct 2017 15:03:21 +0200 Martin Pieuchot wrote: > On 18/10/17(Wed) 12:51, Helg Bredow wrote: > > On Wed, 18 Oct 2017 10:04:07 +0200 > > Martin Pieuchot wrote: > > > > > On 17/10/17(Tue) 15:30, Helg Bredow wrote: > > > > If you execute "fuse-zip -V"

Re: libfuse: patch to prevent fuse-zip from dumping core

2017-10-18 Thread Martin Pieuchot
On 18/10/17(Wed) 12:51, Helg Bredow wrote: > On Wed, 18 Oct 2017 10:04:07 +0200 > Martin Pieuchot wrote: > > > On 17/10/17(Tue) 15:30, Helg Bredow wrote: > > > If you execute "fuse-zip -V" it prints the version and then dumps core. > > > This is because fuse-zip does not

Re: libfuse: patch to prevent fuse-zip from dumping core

2017-10-18 Thread Helg Bredow
On Wed, 18 Oct 2017 10:04:07 +0200 Martin Pieuchot wrote: > On 17/10/17(Tue) 15:30, Helg Bredow wrote: > > If you execute "fuse-zip -V" it prints the version and then dumps core. > > This is because fuse-zip does not initialise the mount point pointer to > > NULL. This patch

umb/ppp/gre: dead ioctls

2017-10-18 Thread Martin Pieuchot
These ioctl(2)s are handled by ifioctl() and never passed down to the drivers. ok? Index: net/if_gre.c === RCS file: /cvs/src/sys/net/if_gre.c,v retrieving revision 1.87 diff -u -p -r1.87 if_gre.c --- net/if_gre.c11 Aug 2017

Re: KAME ioctl leftovers

2017-10-18 Thread Florian Obser
On Wed, Oct 18, 2017 at 11:34:27AM +, Martin Pieuchot wrote: > Kill ioctl(2) added with original KAME import that have never been used. > FreeBSD also stopped supporting them in 2013. usr.sbin/bind is looking at SIOCGLIFADDR, but it looks like it's properly guarded by #ifdef. debian

if_ioctl is not NULL

2017-10-18 Thread Martin Pieuchot
All are drivers provides it and if_attach() now asserts that it is not NULL. Let's get rid of those checks, ok? Index: netinet/in.c === RCS file: /cvs/src/sys/netinet/in.c,v retrieving revision 1.140 diff -u -p -r1.140 in.c ---

KAME ioctl leftovers

2017-10-18 Thread Martin Pieuchot
Kill ioctl(2) added with original KAME import that have never been used. FreeBSD also stopped supporting them in 2013. ok? Index: sys/sockio.h === RCS file: /cvs/src/sys/sys/sockio.h,v retrieving revision 1.70 diff -u -p -r1.70

kqueue_scan() in parallel

2017-10-18 Thread Martin Pieuchot
Diff below is the last version of my kqueue diff to allow grabbing the solock() and possibly sleeping, inside kqueue_scan(). Sleeping in kqueue_scan() is not a problem since threads are already doing it when no event are available, in that case `kq_count' is 0. When this happens, a thread going

Re: queue packet in loopback

2017-10-18 Thread Alexandr Nedvedicky
Hello, thanks for great explanation of the problem. I like your approach. I have just two small nitpicks/questions see below. > > Index: net/if_loop.c > === > RCS file: /data/mirror/openbsd/cvs/src/sys/net/if_loop.c,v >

Re: libfuse: patch to prevent fuse-zip from dumping core

2017-10-18 Thread Martin Pieuchot
On 17/10/17(Tue) 15:30, Helg Bredow wrote: > If you execute "fuse-zip -V" it prints the version and then dumps core. This > is because fuse-zip does not initialise the mount point pointer to NULL. This > patch ensures that it's always initialised to NULL. It's hard to understand your fix if you