[patch] Fix file descriptor leak in nohup.c

2018-09-07 Thread Nan Xiao
Hi tech@, The following patch fixes file descriptor leak in `dofile' function. Sorry if I am wrong, thanks! Index: nohup.c === RCS file: /cvs/src/usr.bin/nohup/nohup.c,v retrieving revision 1.17 diff -u -p -r1.17 nohup.c --- nohup.c

csh: simplify strsave()

2018-09-07 Thread Michael Mikonos
Hello, The function strsave() in csh(1) is practically strdup(3). The only difference is memory allocation failure results in calling the stderror() error handler, which will later exit. This patch makes the code (IMO) clearer by removing two loops. xmalloc() behaves the same as xreallocarray()

Re: [patch] rebound: add NULL pointer checks

2018-09-07 Thread Clemens Goessnitzer
On 07/09/18 21:15, Clemens Goessnitzer wrote: This patch adds 2 missing NULL pointer checks to rebound.c after malloc(). Clemens Updated patch to also check the return of calloc() Clemens Index: rebound.c === RCS file:

Re: [patch] rebound: add NULL pointer checks

2018-09-07 Thread Theo Buehler
On Fri, Sep 07, 2018 at 09:15:30PM +0200, Clemens Goessnitzer wrote: > This patch adds 2 missing NULL pointer checks to rebound.c after malloc(). The same function also contains an unchecked calloc. > Index: rebound.c > === > RCS

[patch] rebound: add NULL pointer checks

2018-09-07 Thread Clemens Goessnitzer
This patch adds 2 missing NULL pointer checks to rebound.c after malloc(). Clemens Index: rebound.c === RCS file: /cvs/src/usr.sbin/rebound/rebound.c,v retrieving revision 1.98 diff -u -p -r1.98 rebound.c --- rebound.c 1 May 2018

remove packet header

2018-09-07 Thread Alexander Bluhm
Hi, During fragment reassembly, mbuf chains with packet headers are created. The resulting security bug has been fixed months ago, but the cleanup to avoid the creation of such strange chains is still missing. See this NetBSD commit:

Re: pfctl: remove wildcard address on loopback remnants

2018-09-07 Thread Claudio Jeker
On Fri, Sep 07, 2018 at 12:23:05PM +0200, Klemens Nanni wrote: > henning@ removed this functionality years ago, see the lo.4 diff: > > revision 1.27 > date: 2011/04/02 14:38:09; author: henning; state: Exp; lines: +2 > -37; > rmeove the link1 hack, it is in the way, it is

Re: iostat: add "sp" column for CP_SPIN

2018-09-07 Thread Jeremie Courreges-Anglas
On Wed, Sep 05 2018, Solene Rapenne wrote: > Solene Rapenne wrote: >> Naoki Fukaumi wrote: >> > hi tech@, >> > >> > new cpu state, CP_SPIN, was added, >> > https://marc.info/?l=openbsd-cvs=152630109526317=2 >> > >> > but there is no column for it in the header of iostat, >> > >> > $ iostat

Re: pfctl: remove wildcard address on loopback remnants

2018-09-07 Thread Jeremie Courreges-Anglas
On Fri, Sep 07 2018, Klemens Nanni wrote: > henning@ removed this functionality years ago, see the lo.4 diff: > > revision 1.27 > date: 2011/04/02 14:38:09; author: henning; state: Exp; lines: +2 > -37; > rmeove the link1 hack, it is in the way, it is only half-baked and >

Re: csh: blkfree() usage

2018-09-07 Thread Jeremie Courreges-Anglas
On Fri, Sep 07 2018, Michael Mikonos wrote: > ping. > > On Thu, Aug 30, 2018 at 12:20:37AM +0800, Michael Mikonos wrote: >> Hello, >> >> In csh(1) the function blkfree() behaves like free(3) and >> performs no action if its argument is NULL, so the caller >> can avoid checking. >> >> I lightly

Re: bgpd make prefix-set fast

2018-09-07 Thread Sebastian Benoit
ok benno, one tab too much Claudio Jeker(cje...@diehard.n-r-g.com) on 2018.09.07 10:08:27 +0200: > After bringing in as-set this diff makes prefix-set fast by using a > bitwise search trie for fast lookups. It does not yet change the bad > syntax of prefix-sets but benno@ and I will tackle that

Re: cp(1) Fix incomplete -i behaviour [1/3]

2018-09-07 Thread Stefan Sperling
On Fri, Aug 31, 2018 at 09:40:19AM +0200, Martijn van Duren wrote: > 1) Implements the copy_overwrite function so we can reuse it in all > functions. > 2) Add the copy_overwrite function to copy_{link,fifo,special} > 3) Change dne variable to exists for copy_file to be consistent with > the naming

pfctl: remove wildcard address on loopback remnants

2018-09-07 Thread Klemens Nanni
henning@ removed this functionality years ago, see the lo.4 diff: revision 1.27 date: 2011/04/02 14:38:09; author: henning; state: Exp; lines: +2 -37; rmeove the link1 hack, it is in the way, it is only half-baked and doesn't work as you think it does, and the

[patch] Modify local_listen declaration in netcat.c

2018-09-07 Thread Nan Xiao
Hi tech@, The following patch modify `local_listen' declaration to conform to `getaddrinfo', thanks! Index: netcat.c === RCS file: /cvs/src/usr.bin/nc/netcat.c,v retrieving revision 1.193 diff -u -p -r1.193 netcat.c --- netcat.c

Re: csh: blkfree() usage

2018-09-07 Thread Michael Mikonos
ping. On Thu, Aug 30, 2018 at 12:20:37AM +0800, Michael Mikonos wrote: > Hello, > > In csh(1) the function blkfree() behaves like free(3) and > performs no action if its argument is NULL, so the caller > can avoid checking. > > I lightly tested the following patch on i386 and amd64. > In two

Re: httpd: block return with a contentless status

2018-09-07 Thread Sebastian Benoit
Florian Obser(flor...@openbsd.org) on 2018.09.07 10:38:41 +0200: > OK florian@ > or I can commit it if someone gives me an OK go ahead, ok benno@ > On Fri, Sep 07, 2018 at 03:08:53AM +1200, Carlin Bingham wrote: > > If httpd is configured to do "block return" with a 1xx or 204 status, it > >

bgpd make prefix-set fast

2018-09-07 Thread Claudio Jeker
After bringing in as-set this diff makes prefix-set fast by using a bitwise search trie for fast lookups. It does not yet change the bad syntax of prefix-sets but benno@ and I will tackle that once this is hopefully in. The code was inspired by what bird is doing for their prefix-set lookups but

Re: httpd: block return with a contentless status

2018-09-07 Thread Florian Obser
OK florian@ or I can commit it if someone gives me an OK On Fri, Sep 07, 2018 at 03:08:53AM +1200, Carlin Bingham wrote: > If httpd is configured to do "block return" with a 1xx or 204 status, it > sends a response with a Content-Length header and a body, which per RFC > 7230 it must not. > >