Re: kern_time.c: use timeout_add_tv(9)

2019-07-21 Thread Scott Cheloha
On Sun, Jul 21, 2019 at 04:36:00AM +0200, Klemens Nanni wrote: > Simply omit conversions from timevals to hz and use the proper API. > > First one is trivial, the second one truncates the converted number of > ticks to at leat one, which timeout_add_*(9) does automatically, so stop > doing it

Re: apmd: zap useless globals

2019-07-21 Thread Ted Unangst
Klemens Nanni wrote: > Initialize stack variables directly instead of using global state in > between. > > OK? sure

apmd: zap useless globals

2019-07-21 Thread Klemens Nanni
Initialize stack variables directly instead of using global state in between. OK? Index: apmd.c === RCS file: /cvs/src/usr.sbin/apmd/apmd.c,v retrieving revision 1.85 diff -u -p -r1.85 apmd.c --- apmd.c 28 Jun 2019 13:32:46

Re: [patch] Re-add 'proc' to vi(1) when running in secure mode.

2019-07-21 Thread Bryan Steele
On Sun, Jul 21, 2019 at 05:57:32PM +0200, Ingo Schwarze wrote: > Hi, > > Bryan Steele wrote on Fri, Jul 19, 2019 at 06:14:56PM -0400: > > On Sat, Jul 20, 2019 at 12:03:03AM +0200, Jesper Wallin wrote: > >> On Fri, Jul 19, 2019 at 05:14:03PM -0400, Bryan Steele wrote: > > >>> I suspect that in

Re: [patch] Re-add 'proc' to vi(1) when running in secure mode.

2019-07-21 Thread Ingo Schwarze
Hi, Bryan Steele wrote on Fri, Jul 19, 2019 at 06:14:56PM -0400: > On Sat, Jul 20, 2019 at 12:03:03AM +0200, Jesper Wallin wrote: >> On Fri, Jul 19, 2019 at 05:14:03PM -0400, Bryan Steele wrote: >>> I suspect that in secure/-S mode, the :pre[serve] should either be >>> disabled, or modified to

Re: ping(8): better "-i wait" edge case handling

2019-07-21 Thread Klemens Nanni
On Sun, Jul 21, 2019 at 08:30:23AM -0500, Scott Cheloha wrote: > Sure. Here's a diff that uses UINT_MAX. The oldest known person > lived to 123. French, if I recall correctly. UINT_MAX gives us 136 > years, so we have a bit of room to grow just in case someone beats the > record. And 52 bits

Re: ping(8): better "-i wait" edge case handling

2019-07-21 Thread Scott Cheloha
On Sun, Jul 21, 2019 at 11:49:10AM +0200, Mark Kettenis wrote: > > Date: Sun, 21 Jul 2019 10:50:27 +0200 > > From: Claudio Jeker > > > > On Sat, Jul 20, 2019 at 08:12:40AM -0500, Scott Cheloha wrote: > > > There are cases for ping(8)'s "-i wait" option that we don't handle > > > correctly. > > >

Re: bridge(4)+pf(4) fix incoming interface

2019-07-21 Thread Eygene Ryabinkin
Wed, Jul 17, 2019 at 04:35:22PM -0300, Martin Pieuchot wrote: > The diff below does a bit of plumbing to avoid code duplication: > > - rename the original port member descriptor from `bif' to `bif0' > - check for bad source MAC (loop prevention) early > - check for wrongly crafted packet before

Re: ping(8): better "-i wait" edge case handling

2019-07-21 Thread Mark Kettenis
> Date: Sun, 21 Jul 2019 10:50:27 +0200 > From: Claudio Jeker > > On Sat, Jul 20, 2019 at 08:12:40AM -0500, Scott Cheloha wrote: > > There are cases for ping(8)'s "-i wait" option that we don't handle > > correctly. > > > > Negative values smaller than -1: > > > > $ doas ping -i -0.1 localhost

Re: ping(8): better "-i wait" edge case handling

2019-07-21 Thread Claudio Jeker
On Sat, Jul 20, 2019 at 08:12:40AM -0500, Scott Cheloha wrote: > There are cases for ping(8)'s "-i wait" option that we don't handle > correctly. > > Negative values smaller than -1: > > $ doas ping -i -0.1 localhost > [no error] > > Positive values less than one microsecond: > > $ doas ping

OpenBSD::Pledge documentation bug

2019-07-21 Thread Edgar Pettijohn
Please see attached diff. Thanks, Edgar Index: Pledge.pm === RCS file: /cvs/src/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/lib/OpenBSD/Pledge.pm,v retrieving revision 1.3 diff -u -p -u -p -r1.3 Pledge.pm --- Pledge.pm 9 Sep 2017