Re: [PATCH] [www] faq/current.html - fix formatting

2021-02-10 Thread Raf Czlonka
Ping.

On Tue, Feb 02, 2021 at 01:45:25AM GMT, Raf Czlonka wrote:
> Hello,
> 
> Fix formatting of the snmpd.conf configuration snippet.
> 
> While there:
> 
> - reduce whitespace from three to two lines as per the comment:
> 
>   

[PATCH] [www] faq/current.html - fix formatting

2021-02-01 Thread Raf Czlonka
Hello,

Fix formatting of the snmpd.conf configuration snippet.

While there:

- reduce whitespace from three to two lines as per the comment:


Re: New ujoy(4) device for USB gamecontrollers

2021-01-15 Thread Raf Czlonka
On Fri, Jan 15, 2021 at 01:23:01PM GMT, Thomas Frohwein wrote:
> On Sat, Jan 09, 2021 at 10:16:16AM +0100, Marcus Glocker wrote:
> > On Thu, Jan 07, 2021 at 08:20:35PM +0100, Marcus Glocker wrote:
> > 
> > > > I have heard from others who tried the diff that the PS4 controller is
> > > > causing problems with the way it attaches. I ordered one to trial-and-
> > > > error this myself at home. Could you share output of lsusb -vv? Thanks
> > > > for giving it a try!
> > > 
> > > Sure, here we go.
> > > If I can find anything myself in the meantime I let you know.
> > 
> > So the problem doesn't seem to be in your new ujoy(4) code, but how the
> > dev/hid/hid.c:hid_is_collection() function tries to cope with the PS4
> > controller.
> 
> So with the hid_is_collection() problem not easy to mitigate [1],
> should we table the ujoy(4) proposal for now pending a fix for the
> problems with the PS4 controller? Or is this interesting enough for
> some to work on moving forward despite this issue and finding a
> solution for this specific (and in some ways unusual) device later?
> 
> 3-4 have tested and reported to me so far. It seems so far that the
> only new breakage is with the PS4 controller, and there is probably
> another solution that can be found later that doesn't break other
> drivers like [1]?
> 
> [1] https://marc.info/?l=openbsd-tech=161043081617336=mbox

Hi Thomas,

Hadn't had a chance to test your diff yet but, FWIW, I rely on PS4
controller working so would appreciate if it remained in a working
state :^)

Cheers,

Raf



Re: clean /dev from /etc/daily ?

2020-11-23 Thread Raf Czlonka
On Mon, Nov 23, 2020 at 12:53:01PM GMT, Solene Rapenne wrote:
> A common mistake when using dd is to create a file in /dev which
> fills up the space of / and may stay silent until / gets filled up
> by something else that will fail.
> 
> Would it be OK to add this in /etc/daily?
> 
> find /dev -type f ! -name MAKEDEV -delete
> 
> AFAIK /dev should have only MAKEDEV as a regular file.
> hier(7) says /dev only have block and character devices
> with the exception of MAKEDEV.
> 

Whichever way this ends up going - or not - please don't forget
about MAKEDEV.local

Cheers,

Raf



Re: [PATCH] Add USB Product ID for Logitech Webcam Pro 9000

2020-10-17 Thread Raf Czlonka
Ping.

On Sun, Oct 11, 2020 at 11:33:21AM BST, Raf Czlonka wrote:
> Hi all,
> 
> I just dug a Logitech Webcam Pro 9000 (for Business) out.
> 
> After a quick test, it seems to be working just fine but the
> Product ID isn't pretty-printed:
> 
>   $ usbdevs | grep 0x0809   
>   addr 08: 046d:0809 Logitech, product 0x0809
> 
> lsusb confirms the Product ID:
> 
>   $ doas lsusb -v | grep 0x0809
> idProduct  0x0809 Webcam Pro 9000
> 
> Regards,
> 
> Raf
> 
> Index: sys/dev/usb/usbdevs
> ===
> RCS file: /cvs/src/sys/dev/usb/usbdevs,v
> retrieving revision 1.721
> diff -u -p -r1.721 usbdevs
> --- sys/dev/usb/usbdevs   5 Oct 2020 05:28:13 -   1.721
> +++ sys/dev/usb/usbdevs   11 Oct 2020 10:29:54 -
> @@ -2672,6 +2672,7 @@ product LOGITECH QUICKCAMWEB0x0801  Quic
>  product LOGITECH WEBCAMC200  0x0802  Webcam C200
>  product LOGITECH WEBCAMC250  0x0804  Webcam C250
>  product LOGITECH WEBCAMC500  0x0807  Webcam C500
> +product LOGITECH WEBCAMPRO9000   0x0809  Webcam Pro 9000
>  product LOGITECH QUICKCAMPRO 0x0810  QuickCam Pro
>  product LOGITECH WEBCAMC210  0x0819  Webcam C210
>  product LOGITECH WEBCAMC310  0x081b  Webcam C310



[PATCH] Add USB Product ID for Logitech Webcam Pro 9000

2020-10-11 Thread Raf Czlonka
Hi all,

I just dug a Logitech Webcam Pro 9000 (for Business) out.

After a quick test, it seems to be working just fine but the
Product ID isn't pretty-printed:

$ usbdevs | grep 0x0809   
addr 08: 046d:0809 Logitech, product 0x0809

lsusb confirms the Product ID:

$ doas lsusb -v | grep 0x0809
  idProduct  0x0809 Webcam Pro 9000

Regards,

Raf

Index: sys/dev/usb/usbdevs
===
RCS file: /cvs/src/sys/dev/usb/usbdevs,v
retrieving revision 1.721
diff -u -p -r1.721 usbdevs
--- sys/dev/usb/usbdevs 5 Oct 2020 05:28:13 -   1.721
+++ sys/dev/usb/usbdevs 11 Oct 2020 10:29:54 -
@@ -2672,6 +2672,7 @@ product LOGITECH QUICKCAMWEB  0x0801  Quic
 product LOGITECH WEBCAMC2000x0802  Webcam C200
 product LOGITECH WEBCAMC2500x0804  Webcam C250
 product LOGITECH WEBCAMC5000x0807  Webcam C500
+product LOGITECH WEBCAMPRO9000 0x0809  Webcam Pro 9000
 product LOGITECH QUICKCAMPRO   0x0810  QuickCam Pro
 product LOGITECH WEBCAMC2100x0819  Webcam C210
 product LOGITECH WEBCAMC3100x081b  Webcam C310



Re: [PATCH] [xenocara] app/xenodm/config/Xsetup_0 - reduce the number of lines

2020-06-16 Thread Raf Czlonka
Ping.

CC'ing espie@ as he committed the initial code.

Cheers,

Raf

On Sun, Jun 07, 2020 at 07:30:39PM BST, Raf Czlonka wrote:
> Hi all,
> 
> I've been running openbsd-backgrounds on all of my desktop machines and
> thought this can be simplified a bit:
> 
> - fewer lines to uncomment
> - easier to automate, i.e. via one liner, script, config management, etc.
> - still under 80 columns wide
> 
> For your consideration.
> 
> Cheers,
> 
> Raf
> 
> Index: app/xenodm/config/Xsetup_0
> ===
> RCS file: /cvs/xenocara/app/xenodm/config/Xsetup_0,v
> retrieving revision 1.6
> diff -u -p -r1.6 Xsetup_0
> --- app/xenodm/config/Xsetup_029 Jun 2019 13:33:06 -  1.6
> +++ app/xenodm/config/Xsetup_07 Jun 2020 18:29:16 -
> @@ -6,9 +6,6 @@ xconsole -geometry 480x130-0-0 -daemon -
>  #  install package openbsd-backgrounds
>  #  then uncomment:
>  #
> -# if test -x /usr/local/bin/openbsd-wallpaper
> -# then
> -#/usr/local/bin/openbsd-wallpaper
> -# fi
> +# test -x /usr/local/bin/openbsd-wallpaper && 
> /usr/local/bin/openbsd-wallpaper
>  
>  # sxpm OpenBSD.xpm &



[PATCH] [xenocara] app/xenodm/config/Xsetup_0 - reduce the number of lines

2020-06-07 Thread Raf Czlonka
Hi all,

I've been running openbsd-backgrounds on all of my desktop machines and
thought this can be simplified a bit:

- fewer lines to uncomment
- easier to automate, i.e. via one liner, script, config management, etc.
- still under 80 columns wide

For your consideration.

Cheers,

Raf

Index: app/xenodm/config/Xsetup_0
===
RCS file: /cvs/xenocara/app/xenodm/config/Xsetup_0,v
retrieving revision 1.6
diff -u -p -r1.6 Xsetup_0
--- app/xenodm/config/Xsetup_0  29 Jun 2019 13:33:06 -  1.6
+++ app/xenodm/config/Xsetup_0  7 Jun 2020 18:29:16 -
@@ -6,9 +6,6 @@ xconsole -geometry 480x130-0-0 -daemon -
 #  install package openbsd-backgrounds
 #  then uncomment:
 #
-# if test -x /usr/local/bin/openbsd-wallpaper
-# then
-#  /usr/local/bin/openbsd-wallpaper
-# fi
+# test -x /usr/local/bin/openbsd-wallpaper && /usr/local/bin/openbsd-wallpaper
 
 # sxpm OpenBSD.xpm &



[PATCH] [src] usr.bin/audioctl/audioctl.8, usr.bin/mixerctl/mixerctl.8 - manpages moved to section 8, mark them as such

2020-04-22 Thread Raf Czlonka
Hi all,

Recently moved manpages bear section 1 number - update accordingly.

Regards,

Raf

Index: usr.bin/audioctl/audioctl.8
===
RCS file: /cvs/src/usr.bin/audioctl/audioctl.8,v
retrieving revision 1.3
diff -u -p -r1.3 audioctl.8
--- usr.bin/audioctl/audioctl.8 22 Apr 2020 21:39:21 -  1.3
+++ usr.bin/audioctl/audioctl.8 22 Apr 2020 23:55:27 -
@@ -27,7 +27,7 @@
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
 .Dd $Mdocdate: April 22 2020 $
-.Dt AUDIOCTL 1
+.Dt AUDIOCTL 8
 .Os
 .Sh NAME
 .Nm audioctl
Index: usr.bin/mixerctl/mixerctl.8
===
RCS file: /cvs/src/usr.bin/mixerctl/mixerctl.8,v
retrieving revision 1.4
diff -u -p -r1.4 mixerctl.8
--- usr.bin/mixerctl/mixerctl.8 22 Apr 2020 21:39:21 -  1.4
+++ usr.bin/mixerctl/mixerctl.8 22 Apr 2020 23:56:20 -
@@ -28,7 +28,7 @@
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
 .Dd $Mdocdate: April 22 2020 $
-.Dt MIXERCTL 1
+.Dt MIXERCTL 8
 .Os
 .Sh NAME
 .Nm mixerctl



[PATCH] [src] - etc/root/root.mail - correct time zone

2020-04-05 Thread Raf Czlonka
Hi all,

Time zone change.

Regards,

Raf

Index: etc/root/root.mail
===
RCS file: /cvs/src/etc/root/root.mail,v
retrieving revision 1.137
diff -u -p -r1.137 root.mail
--- etc/root/root.mail  5 Apr 2020 16:15:39 -   1.137
+++ etc/root/root.mail  6 Apr 2020 02:36:53 -
@@ -1,6 +1,6 @@
-From dera...@do-not-reply.openbsd.org Fri May  1 06:30:00 MST 2020
+From dera...@do-not-reply.openbsd.org Fri May  1 06:30:00 MDT 2020
 Return-Path: root
-Date: May 1 06:30:00 MST 2020
+Date: May 1 06:30:00 MDT 2020
 From: dera...@do-not-reply.openbsd.org (Theo de Raadt)
 To: root
 Subject: Welcome to OpenBSD 6.7!



Re: Audio control API, part 1: libsndio, sndiod bits

2020-02-26 Thread Raf Czlonka
On Mon, Feb 24, 2020 at 09:33:19AM GMT, Alexandre Ratchov wrote:
> On Thu, Feb 13, 2020 at 05:15:34AM +0000, Raf Czlonka wrote:
> > On Sun, Feb 09, 2020 at 12:13:02PM GMT, Alexandre Ratchov wrote:
> > > +++ lib/libsndio/sioctl_aucat.c   8 Feb 2020 14:49:37 -
> > > [...]
> > > + * Copyright (c) 2010-2011 Alexandre Ratchov 
> > > 
> > > [...]
> > > 
> > > +++ lib/libsndio/sioctl_open.38 Feb 2020 14:49:37 -
> > > [...]
> > > +.\" Copyright (c) 2011 Alexandre Ratchov 
> > > 
> > > [...]
> > > 
> > > +++ lib/libsndio/sioctl_priv.h8 Feb 2020 14:49:38 -
> > > [...]
> > > + * Copyright (c) 2008 Alexandre Ratchov 
> > > 
> > > [...]
> > > 
> > > +++ lib/libsndio/sioctl_sun.c 8 Feb 2020 14:49:38 -
> > > [...]
> > > + * Copyright (c) 2010-2011 Alexandre Ratchov 
> > > 
> > > [...]
> > > 
> > > +++ lib/libsndio/sioctl.c 8 Feb 2020 14:49:37 -
> > > [...]
> > > + * Copyright (c) 2008 Alexandre Ratchov 
> > > 
> > > [...]
> > > 
> > > +++ usr.bin/sndioctl/sndioctl.1   9 Feb 2020 11:05:02 -
> > > [...]
> > > +.\" Copyright (c) 2007 Alexandre Ratchov 
> > > 
> > > [...]
> > > 
> > > +++ usr.bin/sndioctl/sndioctl.c   9 Feb 2020 11:05:02 -
> > > [...]
> > > + * Copyright (c) 2007-2011 Alexandre Ratchov 
> > > 
> > > [...]
> > > 
> > > +++ usr.bin/sndiod/dev_sioctl.c   8 Feb 2020 14:49:38 -
> > > [...]
> > > + * Copyright (c) 2014 Alexandre Ratchov 
> > > 
> > > [...]
> > > 
> > > +++ usr.bin/sndiod/dev_sioctl.h   8 Feb 2020 14:49:38 -
> > > [...]
> > > + * Copyright (c) 2014 Alexandre Ratchov 
> > > 
> > > [...]
> > > 
> > 
> > Hi Alexandre,
> > 
> > Shouldn't all of these dates be adjusted?
> > 
> 
> Sure; added 2020 as copyright year. Thanks.

Hi Alexandre,

AFAIK, range would only be applicable if the files were "changed" (for a
lack of a better term) each year between the years stated (inclusive)[0].

After license.template[1]:

It is important to specify the year of the copyright.  Additional years
should be separated by a comma, e.g.
Copyright (c) 2003, 2004

Which then *could* change to range should the, consecutive, years
formed a long line, i.e.:

Copyright (c) 2003-2010

[0] https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
[1] https://cvsweb.openbsd.org/src/share/misc/license.template?rev=HEAD

Regards,

Raf



Re: [PATCH] [www] books.html - remove superfluous angle bracket

2020-02-14 Thread Raf Czlonka
Ping.

On Mon, Nov 25, 2019 at 11:16:09AM GMT, Raf Czlonka wrote:
> Regards,
> 
> Raf
> 
> Index: books.html
> ===
> RCS file: /cvs/www/books.html,v
> retrieving revision 1.117
> diff -u -p -r1.117 books.html
> --- books.html1 Jun 2019 23:12:47 -   1.117
> +++ books.html25 Nov 2019 11:15:11 -
> @@ -355,7 +355,7 @@ Lots of examples and real world code sni
>  
>  Network administration
>  
> ->Das SSH-Buch
> +Das SSH-Buch
>  (German)
>  by Timo Dotzauer and Tobias Ltticke
>  ISBN 3-938626-03-8



[PATCH] [www] faq/current.html - be consistent with naming of the 'id' attribute

2020-02-14 Thread Raf Czlonka
Hi all,

Small inconsistency.

Personally, I prefer id *without* the 'r' but the below is "the odd
one out" so...

Regards,

Raf

Index: faq/current.html
===
RCS file: /cvs/www/faq/current.html,v
retrieving revision 1.1029
diff -u -p -r1.1029 current.html
--- faq/current.html13 Feb 2020 16:29:21 -  1.1029
+++ faq/current.html14 Feb 2020 13:46:41 -
@@ -229,7 +229,7 @@ root crontab or /etc/weekly.local<
 /etc/locate.rc.
 
 
-2020/02/13 - man.conf(5) _whatdb directive no longer 
supported
+2020/02/13 - man.conf(5) _whatdb directive no longer 
supported
 
 In https://man.openbsd.org/man.conf.5;>man.conf(5),
 change lines of the form



Re: Audio control API, part 1: libsndio, sndiod bits

2020-02-12 Thread Raf Czlonka
On Sun, Feb 09, 2020 at 12:13:02PM GMT, Alexandre Ratchov wrote:
> +++ lib/libsndio/sioctl_aucat.c   8 Feb 2020 14:49:37 -
> [...]
> + * Copyright (c) 2010-2011 Alexandre Ratchov 
> 
> [...]
> 
> +++ lib/libsndio/sioctl_open.38 Feb 2020 14:49:37 -
> [...]
> +.\" Copyright (c) 2011 Alexandre Ratchov 
> 
> [...]
> 
> +++ lib/libsndio/sioctl_priv.h8 Feb 2020 14:49:38 -
> [...]
> + * Copyright (c) 2008 Alexandre Ratchov 
> 
> [...]
> 
> +++ lib/libsndio/sioctl_sun.c 8 Feb 2020 14:49:38 -
> [...]
> + * Copyright (c) 2010-2011 Alexandre Ratchov 
> 
> [...]
> 
> +++ lib/libsndio/sioctl.c 8 Feb 2020 14:49:37 -
> [...]
> + * Copyright (c) 2008 Alexandre Ratchov 
> 
> [...]
> 
> +++ usr.bin/sndioctl/sndioctl.1   9 Feb 2020 11:05:02 -
> [...]
> +.\" Copyright (c) 2007 Alexandre Ratchov 
> 
> [...]
> 
> +++ usr.bin/sndioctl/sndioctl.c   9 Feb 2020 11:05:02 -
> [...]
> + * Copyright (c) 2007-2011 Alexandre Ratchov 
> 
> [...]
> 
> +++ usr.bin/sndiod/dev_sioctl.c   8 Feb 2020 14:49:38 -
> [...]
> + * Copyright (c) 2014 Alexandre Ratchov 
> 
> [...]
> 
> +++ usr.bin/sndiod/dev_sioctl.h   8 Feb 2020 14:49:38 -
> [...]
> + * Copyright (c) 2014 Alexandre Ratchov 
> 
> [...]
> 

Hi Alexandre,

Shouldn't all of these dates be adjusted?

Regards,

Raf



Re: Audio control API, part 2: add new sndioctl(1) utility

2020-02-12 Thread Raf Czlonka
On Mon, Feb 10, 2020 at 09:14:57PM GMT, Alexandre Ratchov wrote:
> On Mon, Feb 10, 2020 at 09:59:09AM +0000, Raf Czlonka wrote:
> > On Sun, Feb 09, 2020 at 12:14:47PM GMT, Alexandre Ratchov wrote:
> > > Here's a new sndioctl utility similar to mixerctl(1) but using the new
> > > sndio API. Example:
> > > 
> > > $ sndioctl 
> > > output.level=127
> > > app/aucat0.level=127
> > > app/firefox0.level=127
> > > app/firefox1.level=12
> > > app/midisyn0.level=127
> > > app/mpv0.level=127
> > > app/prog5.level=127
> > > app/prog6.level=127
> > > app/prog7.level=127
> > > hw/input.level=62
> > > hw/input.mute=0
> > > hw/output.level=63
> > > hw/output.mute=0
> > > 
> > 
> > Hi Alexandre,
> > 
> > Just a quick question.
> > 
> > Is there a good reason to have the above using "slash" ('/') as the
> > first separator instead of the, more familiar, "dot" ('.') known
> > from sysctl(8)'s MIB (Management Information Base) style names or
> > even the "pseudo" MIB know from mixerctl(1)?
> 
> Hi,
> 
> I don't know if the following qualifies as a "good reason". The first
> part (the group) is a prefix of the control identifier. The identifier
> itself has a strict "[channel]." format. The prefix
> is not always present, examples:
> 
>   output.level<- sndiod volume knob
>   hw/output.level <- underlying hardware volume knob
> 
> I tried to avoid the group part, but as mixers may be nested it seems
> necessary to avoid name clashes.
> 
> In the sndioctl syntax, we could replace '/' by '.' but this looks
> confusing as the syntax doesn't map directly to the underlying
> model. But maybe we should hide such developer-centric details and
> just use only dots to make this look as a MIB.
> 
> Another option I've considered is to drop the group concept in the API
> and simply prefix the stream name to make it unique; in turn we obtain
> a flat control list. It's uglier and seems to complicate GUIs
> task. For instance the group part could be used to represent controls
> of different groups in different sections or to filter-out certain
> groups).

Hi Alexandre,

I honestly can't tell which one of these would be "better" - best
if others chime in.

I was thinking only from a "uniform" interface angle, i.e. if (some
of) these are to be set from the command line, and its similarity
to MIB-like mixerctl(1) variables, I suspect it might cause some
"muscle memory"-related issues ;^)

If no one else shares it, then I rest my case.

Either way, thanks for the explanation.

Regards,

Raf



Re: Audio control API, part 1: libsndio, sndiod bits

2020-02-12 Thread Raf Czlonka
On Tue, Feb 11, 2020 at 07:15:00PM GMT, Alexandre Ratchov wrote:
> On Tue, Feb 11, 2020 at 07:01:28PM +0100, Florian Obser wrote:
> > I've been running the base diffs since you posted them. Firefox,
> > chrome and mpv still make noise :)
> > 
> > I'm puzzled by this:
> > 
> > $ cat /etc/mixerctl.conf
> >   
> > outputs.master=255,255
> > record.enable=off
> > 
> > $ mixerctl outputs.master   
> >   
> > outputs.master=255,255
> > 
> > $ sndioctl 
> > output.level=127
> > 
> > I don't understand how they relate and why one goes to 255 and the
> > other to 127.
> > The error reporting is confusing, too:
> > 
> > $ sndioctl output.level=128 
> >   
> > integer overflow
> > 
> > But no regressions to report :)
> > 
> 
> Thanks, the code is base on MIDI bits, which uses the 0..127 range;
> sndiod, aucat and many codecs also use the 0..127 range. Anyway,
> replaced the error message by:
> 
> $ sndioctl output.level=128 
> 128: expected integer in the 0..127 range
> 
> [...]
> 
> I'm wondering if persents or floating points in the [0:1] range would
> be less confusing and solve most "units" problems.
> 

Hi Alexandre,

I have to say that I also find the two ranges mildly confusing,
i.e. 0-255 in one place, and 0-127 in another. In terms of units,
personally, I'm used to, and quite like, the granularity of 0-255.

Again, not my place so others will certainly be more help here.

One more point regarding the interface, though.

This is the way mixerctl(1) currently behaves:

$ mixerctl outputs.master 
outputs.master=255,255
$ mixerctl outputs.master=100 
outputs.master: 255,255 -> 100,100
$ mixerctl outputs.master=300 
outputs.master: 100,100 -> 255,255

Should sndioctl(1) behave the same way?

Cheers,

Raf



Re: Audio control API, part 2: add new sndioctl(1) utility

2020-02-10 Thread Raf Czlonka
On Sun, Feb 09, 2020 at 12:14:47PM GMT, Alexandre Ratchov wrote:
> Here's a new sndioctl utility similar to mixerctl(1) but using the new
> sndio API. Example:
> 
> $ sndioctl 
> output.level=127
> app/aucat0.level=127
> app/firefox0.level=127
> app/firefox1.level=12
> app/midisyn0.level=127
> app/mpv0.level=127
> app/prog5.level=127
> app/prog6.level=127
> app/prog7.level=127
> hw/input.level=62
> hw/input.mute=0
> hw/output.level=63
> hw/output.mute=0
> 

Hi Alexandre,

Just a quick question.

Is there a good reason to have the above using "slash" ('/') as the
first separator instead of the, more familiar, "dot" ('.') known
from sysctl(8)'s MIB (Management Information Base) style names or
even the "pseudo" MIB know from mixerctl(1)?

Regards,

Raf

> Configuration parameters that are not exposed by sndiod will be
> handled by audioctl(1), including the /etc/mixerctl.conf file at
> system startup.
> 
> Originally the program was designed to handle modern many-channel
> devices by presenting many-channel knobs on a single line; this
> feature isn't used yet as the corresponding kernel bits are missing.
> 
> Index: usr.bin/Makefile
> ===
> RCS file: /cvs/src/usr.bin/Makefile,v
> retrieving revision 1.161
> diff -u -p -u -p -r1.161 Makefile
> --- usr.bin/Makefile  9 Aug 2019 06:18:25 -   1.161
> +++ usr.bin/Makefile  9 Feb 2020 11:05:02 -
> @@ -22,7 +22,7 @@ SUBDIR= apply arch at aucat audioctl awk
>   pr printenv printf quota radioctl rcs rdist rdistd \
>   readlink renice rev rpcgen rpcinfo rs rsync rup rusers rwall \
>   sdiff script sed sendbug shar showmount signify skey \
> - skeyaudit skeyinfo skeyinit sndiod snmp \
> + skeyaudit skeyinfo skeyinit sndioctl sndiod snmp \
>   sort spell split ssh stat su systat \
>   tail talk tcpbench tee telnet tftp tic time \
>   tmux top touch tput tr true tset tsort tty usbhidaction usbhidctl \
> Index: usr.bin/sndioctl/Makefile
> ===
> RCS file: usr.bin/sndioctl/Makefile
> diff -N usr.bin/sndioctl/Makefile
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ usr.bin/sndioctl/Makefile 9 Feb 2020 11:05:02 -
> @@ -0,0 +1,5 @@
> +#$OpenBSD$
> +
> +PROG=sndioctl
> +LDADD+=  -lsndio
> +.include 
> Index: usr.bin/sndioctl/sndioctl.1
> ===
> RCS file: usr.bin/sndioctl/sndioctl.1
> diff -N usr.bin/sndioctl/sndioctl.1
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ usr.bin/sndioctl/sndioctl.1   9 Feb 2020 11:05:02 -
> @@ -0,0 +1,148 @@
> +.\" $OpenBSD$
> +.\"
> +.\" Copyright (c) 2007 Alexandre Ratchov 
> +.\"
> +.\" Permission to use, copy, modify, and distribute this software for any
> +.\" purpose with or without fee is hereby granted, provided that the above
> +.\" copyright notice and this permission notice appear in all copies.
> +.\"
> +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
> +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
> +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
> +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
> +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
> +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
> +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
> +.\"
> +.Dd $Mdocdate: April 8 2011 $
> +.Dt SNDIOCTL 1
> +.Os
> +.Sh NAME
> +.Nm sndioctl
> +.Nd control audio parameters
> +.Sh SYNOPSIS
> +.Nm
> +.Bk -words
> +.Op Fl iv
> +.Op Fl f Ar device
> +.Op Ar command ...
> +.Ek
> +.Nm
> +.Bk -words
> +.Fl d
> +.Ek
> +.Sh DESCRIPTION
> +The
> +.Nm
> +utility can display or change parameters of
> +.Xr sndio 7
> +audio devices.
> +The options are as follows:
> +.Bl -tag -width Ds
> +.It Fl d
> +Dump the raw list of available parameters and exit.
> +Useful as a debug tool.
> +.It Fl f Ar device
> +Use this
> +.Xr sndio 7
> +audio device.
> +.It Fl m
> +Monitor and display audio parameters changes.
> +.It Fl i
> +Display characteristics of requested parameters
> +instead of their values.
> +.It Fl v
> +Enable verbose mode, a.k.a. multi-channel mode.
> +By default parameters affecting different channels
> +of the same stream are disguised as a single mono
> +parameter to hide details that are not essential.
> +.El
> +.Pp
> +If no commands are specified all valid parameters are displayed on
> +.Em stdout .
> +Unless
> +.Fl d ,
> +.Fl m ,
> +or
> +.Fl i
> +are used, displayed parameters are valid commands.
> +The set of available controls depends on the control device.
> +.Pp
> +Commands use the following two formats to display and set
> +parameters respectively:
> +.Pp
> +.Dl group/stream[channel].function
> +.Dl group/stream[channel].function=value
> +.Pp
> +On the 

[PATCH] [www] faq/current.html - pretty print paths

2020-01-28 Thread Raf Czlonka
Hi all,

Using the convention from earlier in the faq/current.html file,
enclose file/directory paths in .

Cheers,

Raf

Index: faq/current.html
===
RCS file: /cvs/www/faq/current.html,v
retrieving revision 1.1021
diff -u -p -r1.1021 current.html
--- faq/current.html28 Jan 2020 00:16:29 -  1.1021
+++ faq/current.html28 Jan 2020 10:42:42 -
@@ -173,8 +173,8 @@ Users are advised to consider alternativ
 
 2020/01/24 - [packages] firefox 71.0: pledge configuration 
change
 Previously, disabling pledge was done by modifying an entry in about:config
-but now it is done using files in /etc/firefox as explained in the pkg-readme
-file, /usr/local/share/doc/pkg-readmes/firefox.
+but now it is done using files in /etc/firefox as explained in 
the pkg-readme
+file, /usr/local/share/doc/pkg-readmes/firefox.
 Unveil has been added to firefox to restrict filesystem access by default.
 To grant access to additional paths or disable unveil, see the pkg-readme file.
 



[PATCH] [src] - usr.sbin/bind/configure{,.in} - /dev/arandom no longer exists

2020-01-08 Thread Raf Czlonka
Hi all,

This effectively reinstates what has been nuked[0] by the recent
import.

[0] 
https://cvsweb.openbsd.org/src/usr.sbin/bind/configure.diff?r1=1.15=1.16=h

Regards,

Raf

Index: usr.sbin/bind/configure
===
RCS file: /cvs/src/usr.sbin/bind/configure,v
retrieving revision 1.30
diff -u -p -u -r1.30 configure
--- usr.sbin/bind/configure 7 Jan 2020 19:11:17 -   1.30
+++ usr.sbin/bind/configure 8 Jan 2020 21:42:29 -
@@ -14200,14 +14200,7 @@ case "$use_randomdev" in
 $as_echo "unspecified" >&6; }
as_fn_error $? " need --with-randomdev=PATH or 
--with-randomdev=no" "$LINENO" 5
esac
-   case "$host" in
-   *-openbsd*)
-   devrandom=/dev/arandom
-   ;;
-   *)
-   devrandom=/dev/random
-   ;;
-   esac
+   devrandom=/dev/random
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $devrandom" >&5
 $as_echo "$devrandom" >&6; }
as_ac_File=`$as_echo "ac_cv_file_$devrandom" | $as_tr_sh`
Index: usr.sbin/bind/configure.in
===
RCS file: /cvs/src/usr.sbin/bind/configure.in,v
retrieving revision 1.29
diff -u -p -u -r1.29 configure.in
--- usr.sbin/bind/configure.in  7 Jan 2020 19:11:17 -   1.29
+++ usr.sbin/bind/configure.in  8 Jan 2020 21:43:25 -
@@ -1061,14 +1061,7 @@ case "$use_randomdev" in
AC_MSG_RESULT(unspecified)
AC_MSG_ERROR([ need --with-randomdev=PATH or 
--with-randomdev=no])
esac
-   case "$host" in
-   *-openbsd*)
-   devrandom=/dev/arandom
-   ;;
-   *)
-   devrandom=/dev/random
-   ;;
-   esac
+   devrandom=/dev/random
AC_MSG_RESULT($devrandom)
AC_CHECK_FILE($devrandom,
  AC_DEFINE_UNQUOTED(PATH_RANDOMDEV,



usbhidaction(1) with a foot pedal/control

2019-12-17 Thread Raf Czlonka
Hi all,

I use a Philips USB foot pedal[0] as an additional input device.
With usbhidaction(1), I can "program" its four "buttons".

After recent changes to uhid(4) device nodes' permissions, my USB
foot pedal "stopped working".

I understand that it is a *very recent* change but I rely on this
input device for my day-to-day computer usage and have a couple of
questions. I understand that the below permissions are final(?).

crw---  1 root  wheel   62,   0 Dec 16 11:17 /dev/uhid0
crw---  1 root  wheel   62,   1 Dec 16 11:17 /dev/uhid1
crw---  1 root  wheel   62,   2 Dec 16 11:17 /dev/uhid2
crw---  1 root  wheel   62,   3 Dec 16 11:17 /dev/uhid3
crw---  1 root  wheel   62,   4 Dec 16 11:17 /dev/uhid4
crw---  1 root  wheel   62,   5 Dec 16 11:17 /dev/uhid5
crw---  1 root  wheel   62,   6 Dec 16 11:17 /dev/uhid6
crw---  1 root  wheel   62,   7 Dec 16 11:17 /dev/uhid7

I use(d) the below script (executed from .xsession) in order to
configure and use the foot pedal:

#!/bin/sh
test -r $HOME/.footpedal.conf && {
pgrep usbhidaction > /dev/null ||
usbhidaction -f $(dmesg | awk '/Footcontrol USB/ {
getline
getline
print $1
}' | tail -n 1) -c $HOME/.footpedal.conf -i
}

$ cat $HOME/.footpedal.conf
Generic_Desktop:Joystick.Generic_Desktop:Pointer.Button:Button_1
1
action1
Generic_Desktop:Joystick.Generic_Desktop:Pointer.Button:Button_2
1
action2
Generic_Desktop:Joystick.Generic_Desktop:Pointer.Button:Button_3
1
action3
Generic_Desktop:Joystick.Generic_Desktop:Pointer.Button:Button_4
1
action4

1. Shall I *simply* introduce chmod(1)/chown(8) step in the above script?

2. Is the situation still more of a "watch this space"?

3. Is there any other way to get the uhid(4) device node (-f option) for
   a particular USB device, other than the above dmesg(8)|awk(1) hack?

4. Or perhaps I'm doing it all wrong?

Relevant bits:

$ dmesg
[...]
uhidev1 at uhub0 port 10 configuration 1 interface 0 "Philips Speech 
Processing Footcontrol USB" rev 1.00/3.02 addr 3
uhidev1: iclass 3/1
uhid0 at uhidev1: input=3, output=0, feature=0
[...]

$ usbdevs -v
Controller /dev/usb0:
addr 01: 8086: Intel, xHCI root hub
 super speed, self powered, config 1, rev 1.00
 driver: uhub0
addr 02: 047d:1002 Kensington, USB/PS2 Wheel Mouse
 low speed, power 100 mA, config 1, rev 4.00
 driver: uhidev0
addr 03: 0911:091a Philips Speech Processing, Footcontrol USB
 full speed, power 100 mA, config 1, rev 3.02
 driver: uhidev1
addr 04: 1209:2301 Keyboardio, Model 01
 full speed, power 500 mA, config 1, rev 1.00, iSerial Ckbio01
 driver: umodem0
 driver: uhidev2
 driver: uhidev3

[0] 
https://www.dictation.philips.com/gb/products/transcription-accessories/foot-control-acc2300/

Thanks in advance,

Raf



[PATCH] [www] books.html - remove superfluous angle bracket

2019-11-25 Thread Raf Czlonka
Regards,

Raf

Index: books.html
===
RCS file: /cvs/www/books.html,v
retrieving revision 1.117
diff -u -p -r1.117 books.html
--- books.html  1 Jun 2019 23:12:47 -   1.117
+++ books.html  25 Nov 2019 11:15:11 -
@@ -355,7 +355,7 @@ Lots of examples and real world code sni
 
 Network administration
 
->Das SSH-Buch
+Das SSH-Buch
 (German)
 by Timo Dotzauer and Tobias Ltticke
 ISBN 3-938626-03-8



Re: [PATCH] [src] bin/ed/README - fix quote/comma

2019-11-17 Thread Raf Czlonka
On Sun, Nov 17, 2019 at 10:23:38AM GMT, Otto Moerbeek wrote:
> On Sun, Nov 17, 2019 at 08:31:00AM +0000, Raf Czlonka wrote:
> 
> > Hi all,
> > 
> > Pretty straightforward - comma snuck in inside the quoted book title.
> 
> This is how I learned it. Myabe a bit old-fashinoed, but not wrong.
> 
>   -Otto

Hi Otto,

Unless I'm misunderstanding CMOS (i.e. american style), comma would
indeed be *inside* quotes, when we are actually "using" quotes,
i.e.  quoting text, or quotes are a part of a boot title itself.

Here, however, quotes are used *instead of* italics to represent
the book title itself, so, i.e. in print, they wouldn't be present
at all.

The below is a bibliographical reference (of sorts) so the comma
should merely separate the book title from the publisher.

Unfortunately, the finer details of CMOS are behind a paywall so I
can't confirm that categorically.

Chances are, I might be wrong, though. In which case, I'd appreciate
pointing me to the source :^)

Cheers,

Raf

> 
> > 
> > Regards,
> > 
> > Raf
> > 
> > Index: bin/ed/README
> > ===
> > RCS file: /cvs/src/bin/ed/README,v
> > retrieving revision 1.5
> > diff -u -p -r1.5 README
> > --- bin/ed/README   15 Jun 2018 08:46:24 -  1.5
> > +++ bin/ed/README   17 Nov 2019 08:29:14 -
> > @@ -16,4 +16,4 @@ The ./test directory contains regression
> >  file in that directory explains how to run these.
> >  
> >  For a description of the ed algorithm, see Kernighan and Plauger's book
> > -"Software Tools in Pascal," Addison-Wesley, 1981.
> > +"Software Tools in Pascal", Addison-Wesley, 1981.
> > 



[PATCH] [src] bin/ed/README - fix quote/comma

2019-11-17 Thread Raf Czlonka
Hi all,

Pretty straightforward - comma snuck in inside the quoted book title.

Regards,

Raf

Index: bin/ed/README
===
RCS file: /cvs/src/bin/ed/README,v
retrieving revision 1.5
diff -u -p -r1.5 README
--- bin/ed/README   15 Jun 2018 08:46:24 -  1.5
+++ bin/ed/README   17 Nov 2019 08:29:14 -
@@ -16,4 +16,4 @@ The ./test directory contains regression
 file in that directory explains how to run these.
 
 For a description of the ed algorithm, see Kernighan and Plauger's book
-"Software Tools in Pascal," Addison-Wesley, 1981.
+"Software Tools in Pascal", Addison-Wesley, 1981.



Re: openrsync(1) usage quirks

2019-11-07 Thread Raf Czlonka
Ping.

On Wed, Aug 28, 2019 at 12:55:33AM BST, Raf Czlonka wrote:
> Hi all,
> 
> Today, I've decided to try openrsync(1) instead of cp(1) and here
> my thoughts so far:
> 
> 1. Without rsync package installed, as is the case on a fresh OpenBSD
> install, openrsync's --rsync-path attribute becomes compulsory, i.e.:
> 
>   $ touch file
>   $ openrsync file /tmp
>   /usr/src/usr.bin/rsync/io.c:224: error: unexpected end of file
> 
> while this succeeds as expected:
> 
>   $ openrsync --rsync-path openrsync file /tmp
> 
> This has caused me a bit of head scratching, especially since the
> attribute's description:
> 
>   Run program on the remote host instead of the default rsync.
> 
> does not apply here - there is no "remote host" to speak of - I ran
> the tests on the local filesystem(s).
> 
> Also, shouldn't it default to openrsync? Or, perhaps an automatic
> fallback to openrsync if rsync is not found or copying is done only
> locally?
> 
> Either way, less typing would be greatly appreciated! :^)
> 
> 2. openrsync does not allow for multiple files to be given as source:
> 
>   $ touch file{1,2}
>   $ openrsync --rsync-path openrsync file{1,2} /tmp
>   /usr/src/usr.bin/rsync/flist.c:1064: error: file2: lstat: No such file 
> or directory
>   /usr/src/usr.bin/rsync/io.c:224: error: unexpected end of file
> 
> This is regardless of whether I use file{1,2}, file*, or "file1 file2".
> rsync obviously complies.
> 
> 3. Given that the binary is installed as openrsync and it is also
> referred as such in the manual page, the EXAMPLES section should
> probably use that name. This has been suggested by Ingo (schwarze@)
> in his diff a while back[0] but it isn't clear to my why it hasn't
> been committed so not cooking up a diff just yet - also, not sure
> what to do about the aforementioned --rsync-path.
> 
> [0] https://marc.info/?l=openbsd-tech=155404994129838=2
> 
> I've also noticed an issue where a content of a source directory
> has been repeatedly copied to a destination (using -rt arguments)
> despite both being identical. This was between FFS and MSDOS
> filesystems if that's of importance. Other directories from the
> same source directory copied into the same destination directory,
> were copied only once. I'll try to reproduce it tomorrow if I can.
> 
> Regards,
> 
> Raf



Re: /etc/daily : flexible df output

2019-10-28 Thread Raf Czlonka
On Mon, Oct 28, 2019 at 09:25:22PM GMT, Raf Czlonka wrote:
> On Mon, Oct 28, 2019 at 01:32:05PM GMT, Andre Stoebe wrote:
> > 
> > -   df -ikl
> > +   df ${DFARGS-"-ikl"}
> > 
> 
> Hi Andre,
> 
> Instead of ${DFARGS-"-ikl"}, you should most likely be using:
> 
>   ${DFARGS:-"-ikl"}
> 
> Cheers,
> 
> Raf

Unless, of course, you were thinking of allowing running df(1)
*without* any options, in which case, sure :^)

R.



Re: /etc/daily : flexible df output

2019-10-28 Thread Raf Czlonka
On Mon, Oct 28, 2019 at 01:32:05PM GMT, Andre Stoebe wrote:
> 
> - df -ikl
> + df ${DFARGS-"-ikl"}
> 

Hi Andre,

Instead of ${DFARGS-"-ikl"}, you should most likely be using:

${DFARGS:-"-ikl"}

Cheers,

Raf



[PATCH] www - 66.html - fix a typo - aggregation

2019-10-18 Thread Raf Czlonka
Hello,

... and a small typo.

Raf
Index: 66.html
===
RCS file: /cvs/www/66.html,v
retrieving revision 1.72
diff -u -p -r1.72 66.html
--- 66.html 17 Oct 2019 13:49:28 -  1.72
+++ 66.html 18 Oct 2019 06:18:22 -
@@ -345,7 +345,7 @@ to 6.6.
 Added https://man.openbsd.org/iavf.4;>iavf(4), a driver 
for
   Intel SR-IOV Virtual Functions of Intel 700 series Ethernet controllers.
 Added https://man.openbsd.org/aggr.4;>aggr(4), a
-  dedicated driver to implement 802.1AX link aggregration.
+  dedicated driver to implement 802.1AX link aggregation.
 Added port protection support
   to https://man.openbsd.org/switch.4;>switch(4). Domain
   membership is checked for unicast, flooded (broadcast) and local



[PATCH] www - 66.html - fix a broken link to relayd(8) man page

2019-10-18 Thread Raf Czlonka
Hi,

The URL to the relayd(8) manual page is incomplete.

Regards,

Raf

Index: 66.html
===
RCS file: /cvs/www/66.html,v
retrieving revision 1.72
diff -u -p -r1.72 66.html
--- 66.html 17 Oct 2019 13:49:28 -  1.72
+++ 66.html 18 Oct 2019 06:16:14 -
@@ -511,7 +511,7 @@ to 6.6.
   support for SNI with new 'tls keypair' option to load additional
   certificates.
 Added support for 'from/to address[/prefix]'
-  in https://man.openbsd.org/.8;>relayd(8) filter rules.
+  in https://man.openbsd.org/relayd.8;>relayd(8) filter rules.
 Implemented RFC 8555 "Automatic Certificate Management
   Environment (ACME)" to
   enable https://man.openbsd.org/acme-client.1;>acme-client(1)



[PATCH] www - 66.html - correct acpi(4) and systat(1) manual pages' sections

2019-10-17 Thread Raf Czlonka
Hello,

acpi manual page is in section 4 - device drivers - and systat in
section 1 - general commands.

While there, fix link to the, now removed, snmpctl(8).

Regards,

Raf

Index: 66.html
===
RCS file: /cvs/www/66.html,v
retrieving revision 1.72
diff -u -p -r1.72 66.html
--- 66.html 17 Oct 2019 13:49:28 -  1.72
+++ 66.html 17 Oct 2019 23:23:09 -
@@ -164,7 +164,7 @@ to 6.6.
   driver for the GPIO controllers on Intel's Apollo Lake SoC.
 Implemented MSI-X support on sparc64.
 Skipped PCI host bridges and devices not present with
-  https://man.openbsd.org/acpi.1;>acpi(1) when establishing
+  https://man.openbsd.org/acpi.4;>acpi(4) when establishing
   the mapping between ACPI device nodes and PCI devices.
 Added the https://man.openbsd.org/ukspan.4;>ukspan(4)
   driver for the Keyspan USA19HS USB serial adapter.
@@ -437,7 +437,7 @@ to 6.6.
   https://man.openbsd.org/freezero.3;>freezero(3)
   on https://man.openbsd.org/free.3;>free(3).
 Make 'systat pf' not require root permissions
-(https://man.openbsd.org/systat.8;>systat(8)).
+(https://man.openbsd.org/systat.1;>systat(1)).
 Added support for the EFI Random Number Generator Protocol,
   using it to XOR random data into the buffer we feed the kernel for
   https://www.openbsd.org/amd64.html;>amd64.
@@ -463,7 +463,7 @@ to 6.6.
 Imported https://man.openbsd.org/snmp.1;>snmp(1),
   a new SNMP client which aims to be netsnmp-compatible for
   supported features, and
-  removed https://man.openbsd.org/snmpctl.8;>snmpctl(8).
+  removed https://man.openbsd.org/OpenBSD-6.5/snmpctl.8;>snmpctl(8).
 Improvements
   in https://man.openbsd.org/ntpd.8;>ntpd(8) DNS
   resolving and constraints checking, especially during



[PATCH] [src] - etc/root/root.mail - correct date

2019-10-17 Thread Raf Czlonka
Hi,

Probably too little to late but still...

Cheers,

Raf

Index: etc/root/root.mail
===
RCS file: /cvs/src/etc/root/root.mail,v
retrieving revision 1.135
diff -u -p -r1.135 root.mail
--- etc/root/root.mail  7 Oct 2019 15:34:31 -   1.135
+++ etc/root/root.mail  17 Oct 2019 23:00:49 -
@@ -1,4 +1,4 @@
-From dera...@do-not-reply.openbsd.org Wed Nov  1 06:30:00 MST 2019
+From dera...@do-not-reply.openbsd.org Fri Nov  1 06:30:00 MST 2019
 Return-Path: root
 Date: Nov 1 06:30:00 MST 2019
 From: dera...@do-not-reply.openbsd.org (Theo de Raadt)



ftpd: vfprintf %s NULL in "Opening %s mode data connection for '%s'%s."

2019-09-13 Thread Raf Czlonka
Hi all,

I've used the base ftpd(8) today:

$ echo $USER | doas tee -a /etc/ftpchroot
$ doas rcctl enable ftpd
$ doas rcctl start ftpd

And, after connecting to it:

$ ftp localhost

authenticating, and listing the content of the directory, I found
this message in /var/log/messages:

ftpd: vfprintf %s NULL in "Opening %s mode data connection for '%s'%s."

I can't seem to be able to reproduce it but it appeared in the logs
twice in the last 5 minutes.

Regards,

Raf



openrsync(1) usage quirks

2019-08-27 Thread Raf Czlonka
Hi all,

Today, I've decided to try openrsync(1) instead of cp(1) and here
my thoughts so far:

1. Without rsync package installed, as is the case on a fresh OpenBSD
install, openrsync's --rsync-path attribute becomes compulsory, i.e.:

$ touch file
$ openrsync file /tmp
/usr/src/usr.bin/rsync/io.c:224: error: unexpected end of file

while this succeeds as expected:

$ openrsync --rsync-path openrsync file /tmp

This has caused me a bit of head scratching, especially since the
attribute's description:

Run program on the remote host instead of the default rsync.

does not apply here - there is no "remote host" to speak of - I ran
the tests on the local filesystem(s).

Also, shouldn't it default to openrsync? Or, perhaps an automatic
fallback to openrsync if rsync is not found or copying is done only
locally?

Either way, less typing would be greatly appreciated! :^)

2. openrsync does not allow for multiple files to be given as source:

$ touch file{1,2}
$ openrsync --rsync-path openrsync file{1,2} /tmp
/usr/src/usr.bin/rsync/flist.c:1064: error: file2: lstat: No such file 
or directory
/usr/src/usr.bin/rsync/io.c:224: error: unexpected end of file

This is regardless of whether I use file{1,2}, file*, or "file1 file2".
rsync obviously complies.

3. Given that the binary is installed as openrsync and it is also
referred as such in the manual page, the EXAMPLES section should
probably use that name. This has been suggested by Ingo (schwarze@)
in his diff a while back[0] but it isn't clear to my why it hasn't
been committed so not cooking up a diff just yet - also, not sure
what to do about the aforementioned --rsync-path.

[0] https://marc.info/?l=openbsd-tech=155404994129838=2

I've also noticed an issue where a content of a source directory
has been repeatedly copied to a destination (using -rt arguments)
despite both being identical. This was between FFS and MSDOS
filesystems if that's of importance. Other directories from the
same source directory copied into the same destination directory,
were copied only once. I'll try to reproduce it tomorrow if I can.

Regards,

Raf



[PATCH] [www] innovations.html - add unwind(8) to the list

2019-04-30 Thread Raf Czlonka
Hi all,

unwind(8) looks like a good candidate for inclusion into
innovations.html[0].

While there, add "released with ..." to the preceding entry.

[0] https://www.openbsd.org/innovations.html

Regards,

Raf

Index: innovations.html
===
RCS file: /cvs/www/innovations.html,v
retrieving revision 1.72
diff -u -p -r1.72 innovations.html
--- innovations.html11 Apr 2019 01:14:07 -  1.72
+++ innovations.html30 Apr 2019 11:16:32 -
@@ -804,7 +804,12 @@
 
 https://man.openbsd.org/rad.8;>rad(8):
 Written and maintained by Florian Obser.
-Imported July 10, 2018.
+Imported July 10, 2018; released with OpenBSD 6.4.
+
+
+https://man.openbsd.org/unwind.8;>unwind(8):
+Written and maintained by Florian Obser.
+Imported January 23, 2019; released with OpenBSD 6.5.
 
 
 



Re: [PATCH] [www] cvsync.html - use class="cmdbox"

2019-04-17 Thread Raf Czlonka
On Wed, Apr 17, 2019 at 10:53:54PM BST, Theo Buehler wrote:
> On Wed, Apr 17, 2019 at 11:34:56PM +0200, Solene Rapenne wrote:
> > On Wed, Apr 17, 2019 at 09:55:26PM +0100, Raf Czlonka wrote:
> > > Hi all,
> > > 
> > > Similar to other pages[0][1], use class="cmdbox", add prompt character
> > > where appropriate, and remove superfluous indentation while there.
> > > 
> > > [0] https://www.openbsd.org/anoncvs.html
> > > [1] https://www.openbsd.org/ddb.html
> > > 
> > > Regards,
> > > 
> > > Raf
> > 
> > this looks much better with this
> > 
> > ok solene@
> > 
> 
> Please send a diff for www/build/mirrors/cvsync.html.* instead

After cvsync.html -> build/mirrors/cvsync.html.head change, the patch
applies just fine but, as requested, re-done for the
build/mirrors/cvsync.html.head below anyway.

> hiro$ head -1 cvsync.html
> 

Arghhh... force of habit:

$ vi +/pre cvsync.html

:^P

Cheers,

Raf

Index: build/mirrors/cvsync.html.head
===
RCS file: /cvs/www/build/mirrors/cvsync.html.head,v
retrieving revision 1.36
diff -u -p -r1.36 cvsync.html.head
--- build/mirrors/cvsync.html.head  2 Apr 2018 02:48:19 -   1.36
+++ build/mirrors/cvsync.html.head  17 Apr 2019 22:37:34 -
@@ -57,8 +57,8 @@ CVS is part of OpenBSD's base system.
 CVSync is an entirely different program and can be installed from
 packages:
 
-
-pkg_add cvsync
+
+# pkg_add cvsync
 
 
 Do not build your own copy from unmodified upstream source -
@@ -69,17 +69,17 @@ used in the OpenBSD repository.
 In order to mirror the OpenBSD repository with CVSync,
 the following configuration file might be used:
 
-
-   config {
-   hostname anoncvs.eu.openbsd.org
-   # If your network link is a T1 or faster, comment out the following 
line.
-   compress
-   collection {
-   name openbsd release rcs
-   prefix /cvs
-   umask 002
-   }
-   }
+
+config {
+hostname anoncvs.eu.openbsd.org
+# If your network link is a T1 or faster, comment out the following line.
+compress
+collection {
+   name openbsd release rcs
+   prefix /cvs
+   umask 002
+}
+}
 
 
 
@@ -93,8 +93,8 @@ The local copy of the files are stored i
 Assuming this file is saved as cvs-syncfile, the
 following command would be used to invoke cvsync
 
-
-cvsync -c cvs-syncfile
+
+$ cvsync -c cvs-syncfile
 
 
 Getting Started Using Rsync
@@ -104,13 +104,13 @@ file synchronization program.
 Again this should be installed from packages.
 Two flavours are available:
 
-
-   # pkg_add rsync
-   Ambiguous: choose package for rsync
-   a   0: 
-   1: rsync-3.1.2p0
-   2: rsync-3.1.2p0-iconv
-   Your choice:
+
+# pkg_add rsync
+Ambiguous: choose package for rsync
+a  0: 
+   1: rsync-3.1.2p0
+   2: rsync-3.1.2p0-iconv
+Your choice:
 
 
 Unless you have other requirements, simply install the standard version
@@ -118,15 +118,15 @@ Unless you have other requirements, simp
 You can select the flavour on the command-line to avoid
 pkg_add(1) prompting for the
 version like so:
-
-   pkg_add rsync--
+
+# pkg_add rsync--
 
 
 In order to mirror the OpenBSD repository with rsync,
 the following command line might be used:
 
-
-   rsync -avz --delete rsync://obsdacvs.cs.toronto.edu/obsdcvs/ 
/cvs/
+
+$ rsync -avz --delete rsync://obsdacvs.cs.toronto.edu/obsdcvs/ /cvs/
 
 
 Using CVS to Work With Your Repository
@@ -135,10 +135,10 @@ Now that you have a local copy of the CV
 to check out, update, or do any of the other CVS operations you would
 normally do against a remote repository, locally.
 For example:
-
-cvs -d/cvs checkout -P src
-cvs -d/cvs up -Pd
-cvs -d/cvs diff -u file.c
+
+$ cvs -d/cvs checkout -P src
+$ cvs -d/cvs up -Pd
+$ cvs -d/cvs diff -u file.c
 
 More details on CVS operation can be found in
 FAQ5, Fetching appropriate source



[PATCH] [www] cvsync.html - use class="cmdbox"

2019-04-17 Thread Raf Czlonka
Hi all,

Similar to other pages[0][1], use class="cmdbox", add prompt character
where appropriate, and remove superfluous indentation while there.

[0] https://www.openbsd.org/anoncvs.html
[1] https://www.openbsd.org/ddb.html

Regards,

Raf

Index: cvsync.html
===
RCS file: /cvs/www/cvsync.html,v
retrieving revision 1.141
diff -u -p -r1.141 cvsync.html
--- cvsync.html 6 Apr 2018 23:41:34 -   1.141
+++ cvsync.html 13 Apr 2019 07:21:21 -
@@ -57,8 +57,8 @@ CVS is part of OpenBSD's base system.
 CVSync is an entirely different program and can be installed from
 packages:
 
-
-pkg_add cvsync
+
+# pkg_add cvsync
 
 
 Do not build your own copy from unmodified upstream source -
@@ -69,17 +69,17 @@ used in the OpenBSD repository.
 In order to mirror the OpenBSD repository with CVSync,
 the following configuration file might be used:
 
-
-   config {
-   hostname anoncvs.eu.openbsd.org
-   # If your network link is a T1 or faster, comment out the following 
line.
-   compress
-   collection {
-   name openbsd release rcs
-   prefix /cvs
-   umask 002
-   }
-   }
+
+config {
+hostname anoncvs.eu.openbsd.org
+# If your network link is a T1 or faster, comment out the following line.
+compress
+collection {
+   name openbsd release rcs
+   prefix /cvs
+   umask 002
+}
+}
 
 
 
@@ -93,8 +93,8 @@ The local copy of the files are stored i
 Assuming this file is saved as cvs-syncfile, the
 following command would be used to invoke cvsync
 
-
-cvsync -c cvs-syncfile
+
+$ cvsync -c cvs-syncfile
 
 
 Getting Started Using Rsync
@@ -104,13 +104,13 @@ file synchronization program.
 Again this should be installed from packages.
 Two flavours are available:
 
-
-   # pkg_add rsync
-   Ambiguous: choose package for rsync
-   a   0: 
-   1: rsync-3.1.2p0
-   2: rsync-3.1.2p0-iconv
-   Your choice:
+
+# pkg_add rsync
+Ambiguous: choose package for rsync
+a  0: 
+   1: rsync-3.1.2p0
+   2: rsync-3.1.2p0-iconv
+Your choice:
 
 
 Unless you have other requirements, simply install the standard version
@@ -118,15 +118,15 @@ Unless you have other requirements, simp
 You can select the flavour on the command-line to avoid
 pkg_add(1) prompting for the
 version like so:
-
-   pkg_add rsync--
+
+# pkg_add rsync--
 
 
 In order to mirror the OpenBSD repository with rsync,
 the following command line might be used:
 
-
-   rsync -avz --delete rsync://obsdacvs.cs.toronto.edu/obsdcvs/ 
/cvs/
+
+$ rsync -avz --delete rsync://obsdacvs.cs.toronto.edu/obsdcvs/ /cvs/
 
 
 Using CVS to Work With Your Repository
@@ -135,10 +135,10 @@ Now that you have a local copy of the CV
 to check out, update, or do any of the other CVS operations you would
 normally do against a remote repository, locally.
 For example:
-
-cvs -d/cvs checkout -P src
-cvs -d/cvs up -Pd
-cvs -d/cvs diff -u file.c
+
+$ cvs -d/cvs checkout -P src
+$ cvs -d/cvs up -Pd
+$ cvs -d/cvs diff -u file.c
 
 More details on CVS operation can be found in
 FAQ5, Fetching appropriate source



[PATCH] [www] 65.html - use class="cmdbox" for command examples

2019-04-13 Thread Raf Czlonka
Hi all,

class="cmdbox" has been introduced last year so, since it is has
already been used in upgrade64.html[0], how about using it for
release pages, too?

I wasn't sure about signify(1) subkeys  tag but added it there
anyway...

[0] https://www.openbsd.org/faq/upgrade64.html

Regards,

Raf
Index: 65.html
===
RCS file: /cvs/www/65.html,v
retrieving revision 1.79
diff -u -p -r1.79 65.html
--- 65.html 13 Apr 2019 03:40:42 -  1.79
+++ 65.html 13 Apr 2019 06:18:11 -
@@ -38,7 +38,7 @@ Artwork by Hans Tseng, Efrain Farias, an
 
 https://man.openbsd.org/signify.1;>signify(1)
 pubkeys for this release:
-
+
 base: RWSZaRmt1LEQT9CtPygf9CvONu8kYPTlVEJdysNoUR62/NkeWgdkc3zY
 fw:   RWQYdGVtTv5IvpH2c+TLQAC4iV7RjoGZ/v75q8MCuC9Mca7nFVCXRefy
 pkg:  RWS5D4+188RI6jULDOFzga0Cm1zrXYUAHT6xu0mLrZidbn6xrMB5aZeR
@@ -907,21 +907,21 @@ This file contains everything you need e
 which are in a separate archive.
 To extract:
 
-
+
 # mkdir -p /usr/src
 # cd /usr/src
 # tar xvfz /tmp/src.tar.gz
-
+
 
 sys.tar.gz contains a source archive starting at 
/usr/src/sys.
 This file contains all the kernel sources you need to rebuild kernels.
 To extract:
 
-
+
 # mkdir -p /usr/src/sys
 # cd /usr/src
 # tar xvfz /tmp/sys.tar.gz
-
+
 
 Both of these trees are a regular CVS checkout.  Using these trees it
 is possible to get a head-start on using the anoncvs servers as
@@ -937,10 +937,10 @@ a fresh checkout of the full OpenBSD sou
 
 A ports tree archive is also provided.  To extract:
 
-
+
 # cd /usr
 # tar xvfz /tmp/ports.tar.gz
-
+
 
 Go read the ports page
 if you know nothing about ports
@@ -955,10 +955,10 @@ So, in order to keep up to date with the
 the ports/ tree available on a read-write medium and update the tree
 with a command like:
 
-
+
 # cd /usr/ports
 # cvs -d anon...@server.openbsd.org:/cvs update -Pd -rOPENBSD_6_5
-
+
 
 [Of course, you must replace the server name here with a nearby anoncvs
 server.]



Unexpected boot(8) behaviour

2019-04-10 Thread Raf Czlonka
On Mon, Apr 08, 2019 at 02:55:46PM BST, Florian Obser wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   flor...@cvs.openbsd.org 2019/04/08 07:55:46
> 
> Modified files:
>   sys/stand/boot : boot.c cmd.c cmd.h 
> 
> Log message:
> Detect /bsd.upgrade kernel and boot it if present instead of default
> /bsd. To be used for unattended upgrades in the future.
> Idea & OK deraadt
> 

Hi all,

This breaks the expected boot(8) behaviour, i.e.:

$ cat /etc/boot.conf
set timeout 1
boot bsd.up

bsd.up is *not* being ran at boot.

It was working fine a couple of days ago.

Regards,

Raf



[PATCH] [src] sbin/unwind/unwind.conf.5 - DoT capitalisation

2019-04-02 Thread Raf Czlonka
Hi all,

Consistently capitalise 'DoT'.

Regards,

Raf

Index: unwind.conf.5
===
RCS file: /cvs/src/sbin/unwind/unwind.conf.5,v
retrieving revision 1.11
diff -u -p -r1.11 unwind.conf.5
--- unwind.conf.5   2 Apr 2019 09:20:52 -   1.11
+++ unwind.conf.5   2 Apr 2019 14:45:00 -
@@ -52,7 +52,7 @@ Macro names may not be reserved words (f
 .Ic forwarder ,
 .Ic port ,
 or
-.Ic Dot ) .
+.Ic DoT ) .
 Macros are not expanded inside quotes.
 .Pp
 For example:



[PATCH] [www] events.html - fix presentation title

2019-03-28 Thread Raf Czlonka
Hi all,

A quick/small title fix.

Regards,

Raf

Index: events.html
===
RCS file: /cvs/www/events.html,v
retrieving revision 1.1150
diff -u -p -r1.1150 events.html
--- events.html 24 Mar 2019 21:51:33 -  1.1150
+++ events.html 28 Mar 2019 22:06:32 -
@@ -189,7 +189,7 @@ June 6-9, 2018, Ottawa, Canada.
 
 http://cuug.ab.ca/;>Calgary Unix Users Group,
 March 27, 2018, Alberta, Canada.
-Theo de Raadt gave a presentation Thwarting (ROP) 
Return Oriented Programming (ROP) Attacks.
+Theo de Raadt gave a presentation Thwarting Return 
Oriented Programming (ROP) Attacks.
 
 
 



[www] [faq] - IPSec -> IPsec [Was: Re: CVS: cvs.openbsd.org: www]

2019-02-22 Thread Raf Czlonka
On Fri, Feb 22, 2019 at 10:07:05PM GMT, Landry Breuil wrote:
> CVSROOT:  /cvs
> Module name:  www
> Changes by:   lan...@cvs.openbsd.org  2019/02/22 15:07:05
> 
> Modified files:
>   faq: index.html 
> Added files:
>   faq: faq17.html 
> 
> Log message:
> Add a (wip!) VPN FAQ, because 'How do i VPN with OpenBSD?' seems to be a
> frequently asked question, and IPSec is hard. Now is the time to polish
> it in-tree.
> 

Spelling/capitalisation is harder still! ;^)

As per https://marc.info/?t=15196474751=1=2

This patch is only for the faq directory.

Regards,

Raf

Index: faq/faq10.html
===
RCS file: /cvs/www/faq/faq10.html,v
retrieving revision 1.285
diff -u -p -r1.285 faq10.html
--- faq/faq10.html  18 Oct 2018 03:14:38 -  1.285
+++ faq/faq10.html  23 Feb 2019 06:08:51 -
@@ -358,7 +358,7 @@ In particular, YP is inadequate if poten
 to your network.
 Anybody gaining root access to any computer connected to your network segments
 carrying YP traffic can bind your YP domain and retrieve its data.
-In some cases, passing YP traffic through SSL or IPSec tunnels might be
+In some cases, passing YP traffic through SSL or IPsec tunnels might be
 an option.
 
 Setting Up a YP Server
Index: faq/faq17.html
===
RCS file: /cvs/www/faq/faq17.html,v
retrieving revision 1.1
diff -u -p -r1.1 faq17.html
--- faq/faq17.html  22 Feb 2019 22:07:05 -  1.1
+++ faq/faq17.html  23 Feb 2019 06:08:51 -
@@ -170,7 +170,7 @@ ikev2_recv: IKE_AUTH response from respo
 sa_state: VALID -> ESTABLISHED from 192.0.2.1:4500 to 198.51.100.1:4500 policy 
'server2_rsa'
 
 
-The IPSec flows can be viewed with https://man.openbsd.org/ipsecctl;>ipsecctl(8):
 
 
@@ -291,7 +291,7 @@ ikev2 'responder_rsa' passive esp \
 tag "ROADW"
 
 
-It also needs to allow IPSec from any host (since clients might connect from
+It also needs to allow IPsec from any host (since clients might connect from
 anywhere), allow traffic tagged ROADW on enc0 and apply NAT to it:
 
 
@@ -356,7 +356,7 @@ After starting the initiator, this addit
 roadwarrior# ipsecctl -f /etc/ipsec.conf
 
 
-This will happen at boot if IPSec has been enabled with
+This will happen at boot if IPsec has been enabled with
 rcctl enable ipsec.
 
 



Re: security.html -> broken link

2019-02-19 Thread Raf Czlonka
On Tue, Feb 19, 2019 at 09:49:15AM GMT, Oleg Pahl wrote:
> Hi @all,
> 
> On https://www.openbsd.org/security.html there is a broken link.
> 
> 
>  --->
> 
> 
>  Full Disclosure
> 
> Like many readers of theBUGTRAQ mailing list
> , we believe in full disclosure
> of security problems.
> 
> * http://online.securityfocus.com/archive/1
> 
> <---
> 
> Please check!
> 
> BR,
> 
> Oleg Pahl
> 

Hi Oleg,

You "forgot" the diff ;^)

Cheers,

Raf

Index: security.html
===
RCS file: /cvs/www/security.html,v
retrieving revision 1.437
diff -u -p -r1.437 security.html
--- security.html   18 Oct 2018 12:29:23 -  1.437
+++ security.html   19 Feb 2019 10:13:10 -
@@ -89,7 +89,7 @@ fixing security problems.
 Full Disclosure
 
 Like many readers of the
-http://online.securityfocus.com/archive/1;>
+https://www.securityfocus.com/archive/1;>
 BUGTRAQ mailing list,
 we believe in full disclosure of security problems.  In the
 operating system arena, we were probably the first to embrace



[www] hackathons.html - fix spelling

2019-01-14 Thread Raf Czlonka
Hi all,

A small spelling fix.

Cheers,

Raf

Index: hackathons.html
===
RCS file: /cvs/www/hackathons.html,v
retrieving revision 1.134
diff -u -p -r1.134 hackathons.html
--- hackathons.html 13 Jan 2019 23:55:05 -  1.134
+++ hackathons.html 14 Jan 2019 12:37:34 -
@@ -89,7 +89,7 @@ so don't worry if you can't understand t
 
 
 
-a2k19: antipodian mini hackathon
+a2k19: antipodean mini hackathon
 Jan 17-24, 2019
 Wellington, New Zealand
 18 developers



Re: /usr/share/calendar/calendar.christian - two entries for "First Sunday of Advent (4th Sunday before Christmas)"

2018-11-11 Thread Raf Czlonka
It's that magical time of the year again :^)

Anyone?

R.

On Sun, Nov 12, 2017 at 08:11:04AM GMT, Raf Czlonka wrote:
> Hi all,
> 
> I've just noticed something strange in the
> /usr/share/calendar/calendar.christian file, namely:
> 
>   11/SunLast  First Sunday of Advent (4th Sunday before Christmas)
>   12/SunFirst First Sunday of Advent (4th Sunday before Christmas)
> 
> Obviously, in any given year either is true - not both.
> 
> I do understand the intent - the beginning of Advent will either
> be on the last Sunday of November or the first Sunday of December
> depending which day of the week Christmas Day falls on.
> 
> Calculating it isn't difficult - last Thursday of November + 3 days -
> but I'm not sure whether adding any additional code to calendar(1)
> is desirable.
> 
> I don't know what the best solution to the above is as currently,
> as it stands, these entries are confusing - at first glance the
> above looks like a bug and after figuring out it isn't one, I'm
> sill none the wise which one it is without consulting another
> calendar.
> 
> Adding code, modifying the above entries or an additional entry in
> the BUGS section in the manual. What are your thought?
> 
> Best regards,
> 
> Raf



[PATCH] [src] usr.sbin/tftp-proxy/tftp-proxy.8 - style improvement

2018-11-04 Thread Raf Czlonka
Hi,

A small style improvement.

Regards,

Raf

Index: usr.sbin/tftp-proxy/tftp-proxy.8
===
RCS file: /cvs/src/usr.sbin/tftp-proxy/tftp-proxy.8,v
retrieving revision 1.8
diff -u -p -r1.8 tftp-proxy.8
--- usr.sbin/tftp-proxy/tftp-proxy.817 Oct 2017 22:47:58 -  1.8
+++ usr.sbin/tftp-proxy/tftp-proxy.84 Nov 2018 11:22:23 -
@@ -140,4 +140,4 @@ pass out quick on $ext_if inet proto udp
 The current stand-alone implementation first appeared in
 .Ox 5.3 .
 .Sh AUTHORS
-.An David Gwynne 
+.An David Gwynne Aq Mt d...@openbsd.org



[PATCH] [src] usr.sbin/ldapd/btree.3 - style fix

2018-11-03 Thread Raf Czlonka
Hi all,

Style fix.

Regards,

Raf

Index: usr.sbin/ldapd/btree.3
===
RCS file: /cvs/src/usr.sbin/ldapd/btree.3,v
retrieving revision 1.4
diff -u -p -r1.4 btree.3
--- usr.sbin/ldapd/btree.3  16 Jul 2013 11:13:33 -  1.4
+++ usr.sbin/ldapd/btree.3  3 Nov 2018 21:45:09 -
@@ -43,9 +43,9 @@
 .Nm btree_get_path ,
 .Nm btree_cmp ,
 .Nm btval_reset
-.Nd Append-only prefix B+Tree database library.
+.Nd append-only prefix B+Tree database library
 .Sh SYNOPSIS
-.Fd #include 
+.In btree.h
 .Ft "struct btree *"
 .Fn "btree_open_fd" "int fd" "unsigned int flags"
 .Ft "struct btree *"



Re: Fix descriptions of smtps vs smtp+tls in smtpd.conf.5

2018-10-25 Thread Raf Czlonka
On Thu, Oct 25, 2018 at 07:11:47AM BST, Gilles Chehade wrote:
> 
> smtpd will _always_ display a 'starttls' log line when the TLS channel starts,
> disregarding if TLS was started at connect time (smtps) or within the protocol
> (smtp+tls, or even smtp since it does opportunistic tls).
> 

I guess this is the confusing bit - seeing 'starttls' in the log
file and thinking 'STARTTLS', i.e. the "TLS upgrade".

R.



Re: [PATCH] src/etc/root/root.mail - URLs -> URL

2018-06-26 Thread Raf Czlonka
Ping.

After installurl(5):

The /etc/installurl file contains a single line specifying
an OpenBSD mirror server URL, [...]

Cheers,

Raf

On Fri, Mar 30, 2018 at 11:05:44PM BST, Raf Czlonka wrote:
> Hi all,
> 
> A small typo - plural -> singular.
> 
> Regards,
> 
> Raf
> 
> Index: etc/root/root.mail
> ===
> RCS file: /cvs/src/etc/root/root.mail,v
> retrieving revision 1.127
> diff -u -p -r1.127 root.mail
> --- etc/root/root.mail23 Mar 2018 15:45:56 -  1.127
> +++ etc/root/root.mail30 Mar 2018 22:02:39 -
> @@ -27,7 +27,7 @@ find further information regarding confi
>  
>  Several popular binary packages (pre-compiled applications) are
>  available from mirror sites.  Mirror selection is usually automatic
> -during install/upgrade -- a mirror URLs from https://www.openbsd.org/ftp.html
> +during install/upgrade -- a mirror URL from https://www.openbsd.org/ftp.html
>  is stored into the file /etc/installurl.  Installation of packages is
>  as simple as:
>  



[PATCH][src] share/man/man8/starttls.8 - use the new cert keyword

2018-06-26 Thread Raf Czlonka
Hi all,

The certificate keyword has been recently shortened to cert.

Regards,

Raf

Index: share/man/man8/starttls.8
===
RCS file: /cvs/src/share/man/man8/starttls.8,v
retrieving revision 1.25
diff -u -p -r1.25 starttls.8
--- share/man/man8/starttls.8   11 Jun 2018 05:49:09 -  1.25
+++ share/man/man8/starttls.8   27 Jun 2018 00:21:56 -
@@ -143,7 +143,7 @@ For
 it's as simple as adding pki configuration to
 .Xr smtpd.conf 5 :
 .Bd -literal -offset indent
-pki mail.example.com certificate "/etc/ssl/mail.example.com.crt"
+pki mail.example.com cert "/etc/ssl/mail.example.com.crt"
 pki mail.example.com key "/etc/ssl/private/mail.example.com.key"
 
 listen on [...] tls pki mail.example.com auth



Re: [patch] Fix inaccurate comment in usr.bin/w/w.c

2018-06-14 Thread Raf Czlonka
On Thu, Jun 14, 2018 at 06:28:47AM BST, Nan Xiao wrote:
> Hi tech@,
> 
> The following patch fix some inaccurate comment in w.c. E.g., there is
> no "-n" option, and "-a" instead. Sorry id I am wrong, thanks!
> 
> Index: w.c
> ===
> RCS file: /cvs/src/usr.bin/w/w.c,v
> retrieving revision 1.65
> diff -u -p -r1.65 w.c
> --- w.c   18 Dec 2017 05:51:53 -  1.65
> +++ w.c   14 Jun 2018 05:17:00 -
> @@ -71,9 +71,9 @@ struct winsize  ws;
>  kvm_t   *kd;
>  time_t   now;/* the current time of day */
>  int  ttywidth;   /* width of tty */
> -int  argwidth;   /* width of tty */
> -int  header = 1; /* true if -h flag: don't print heading */
> -int  nflag = 1;  /* true if -n flag: don't convert addrs */
> +int  argwidth;   /* width of name and args of the current 
> process */
> +int  header = 1; /* false if -h or -M flag: don't print heading 
> */
> +int  nflag = 1;  /* false if -a flag: don't convert addrs */
>  int  sortidle;   /* sort by idle time */
>  char*sel_user;   /* login of particular user selected */
>  char domain[HOST_NAME_MAX+1];

FYI, the '-n' to '-a' change happened nearly 22 years ago[0].

Given that "-a flag" should clearly be in the comment, shouldn't
there a mechanical nflag -> aflag change also take place?

[0] 
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/w/w.c.diff?r1=1.5=1.6=h

Regards,

Raf



[PATCH] [src] usr.sbin/smtpd/smtp.1 - normalise protocol definitions

2018-05-11 Thread Raf Czlonka
Hi all,

This patch normalises the protocol definitions.

Regards,

Raf

Index: usr.sbin/smtpd/smtp.1
===
RCS file: /cvs/src/usr.sbin/smtpd/smtp.1,v
retrieving revision 1.5
diff -u -p -r1.5 smtp.1
--- usr.sbin/smtpd/smtp.1   29 Apr 2018 11:58:45 -  1.5
+++ usr.sbin/smtpd/smtp.1   11 May 2018 10:59:58 -
@@ -66,7 +66,7 @@ The following protocols are available:
 .Pp
 .Bl -tag -width "smtp+notls" -compact
 .It smtp
-Normal SMTP session, with opportunistic STARTTLS.
+Normal SMTP session with opportunistic STARTTLS.
 .It smtp+tls
 Normal SMTP session with mandatory STARTTLS.
 .It smtp+notls
@@ -76,7 +76,7 @@ LMTP session with opportunistic STARTTLS
 .It lmtp+tls
 LMTP session with mandatory STARTTLS.
 .It lmtp+notls
-Plain text LMTP session.
+Plain text LMTP session without TLS.
 .It smtps
 SMTP session with forced TLS on connection.
 .El



[PATCH] [www] faq/faq10.html - remove telnet warnings

2018-04-24 Thread Raf Czlonka
Hi all,

Telnet warnings have been removed over two years ago[0][1].

[0] 
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/skeyinit/skeyinit.c.diff?r1=1.60=1.61=h
[1] 
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/skey/skey.c.diff?r1=1.30=1.31=h

Regards,

Raf

Index: faq/faq10.html
===
RCS file: /cvs/www/faq/faq10.html,v
retrieving revision 1.277
diff -u -p -r1.277 faq10.html
--- faq/faq10.html  2 Apr 2018 02:48:19 -   1.277
+++ faq/faq10.html  25 Apr 2018 03:23:01 -
@@ -238,9 +238,6 @@ your S/Key secret passphrase, which must
 
 
 $ skeyinit
-Reminder - Only use this method if you are directly connected
-   or have an encrypted channel.  If you are using telnet,
-   exit with no password and use skeyinit -s.
 Password:
 [Adding ericj with md5]
 Enter new secret passphrase:
@@ -266,7 +263,6 @@ to find out what command to run:
 $ skeyinfo -v
 otp-md5 95 oshi45820
 $ otp-md5 95 oshi45820
-Reminder - Do not use this program while logged in via telnet.
 Enter secret passphrase:
 NOOK CHUB HOYT SAC DOLE FUME
 
@@ -275,7 +271,6 @@ In order to generate a list of S/Key pas
 
 
 $ otp-md5 -n 5 95 oshi45820
-Reminder - Do not use this program while logged in via telnet.
 Enter secret passphrase:
 91: SHIM SET LEST HANS SMUG BOOT
 92: SUE ARTY YAW SEED KURD BAND



[PATCH] www/63.html - correct OpenBSD 6.3 release date

2018-04-12 Thread Raf Czlonka
Hi all,

The main page[0] reads:

[...], released Apr 2, 2018.

while the 6.3 release page, which the above links to[1] says:

Released Apr 15, 2018

[0] https://www.openbsd.org/
[1] https://www.openbsd.org/63.html

Regards,

Raf

Index: 63.html
===
RCS file: /cvs/www/63.html,v
retrieving revision 1.74
diff -u -p -r1.74 63.html
--- 63.html 8 Apr 2018 11:45:49 -   1.74
+++ 63.html 12 Apr 2018 14:16:46 -
@@ -20,7 +20,7 @@
 
 
 
-Released Apr 15, 2018
+Released Apr 2, 2018
 Copyright 1997-2018, Theo de Raadt.
 
 



[PATCH] src/etc/root/root.mail - URLs -> URL

2018-03-30 Thread Raf Czlonka
Hi all,

A small typo - plural -> singular.

Regards,

Raf

Index: etc/root/root.mail
===
RCS file: /cvs/src/etc/root/root.mail,v
retrieving revision 1.127
diff -u -p -r1.127 root.mail
--- etc/root/root.mail  23 Mar 2018 15:45:56 -  1.127
+++ etc/root/root.mail  30 Mar 2018 22:02:39 -
@@ -27,7 +27,7 @@ find further information regarding confi
 
 Several popular binary packages (pre-compiled applications) are
 available from mirror sites.  Mirror selection is usually automatic
-during install/upgrade -- a mirror URLs from https://www.openbsd.org/ftp.html
+during install/upgrade -- a mirror URL from https://www.openbsd.org/ftp.html
 is stored into the file /etc/installurl.  Installation of packages is
 as simple as:
 



[PATCH] xenocara/distrib/notes - remove problem_blurb

2018-03-30 Thread Raf Czlonka
Hi all,

problem_blurb hasn't been used in nearly 10 years[0].
Time to let it go?

Remove two trailing empty lines while there.

[0] 
http://cvsweb.openbsd.org/cgi-bin/cvsweb/xenocara/distrib/notes/m4.common.diff?r1=1.3=1.4=h

Regards,

Raf

Index: distrib/notes/README.alpha
===
RCS file: /cvs/xenocara/distrib/notes/README.alpha,v
retrieving revision 1.4
diff -u -p -r1.4 README.alpha
--- distrib/notes/README.alpha  19 Feb 2011 19:51:53 -  1.4
+++ distrib/notes/README.alpha  30 Mar 2018 21:56:16 -
@@ -3,6 +3,4 @@ Post-installation instructions for X.Org
 
 There is no X server for alpha.  Only userland X.
 
-problem_blurb
-
 $OpenBSD: README.alpha,v 1.4 2011/02/19 19:51:53 matthieu Exp $
Index: distrib/notes/README.amd64
===
RCS file: /cvs/xenocara/distrib/notes/README.amd64,v
retrieving revision 1.12
diff -u -p -r1.12 README.amd64
--- distrib/notes/README.amd64  27 Feb 2017 21:16:05 -  1.12
+++ distrib/notes/README.amd64  30 Mar 2018 21:56:16 -
@@ -27,6 +27,4 @@ Conventions used in this document:
 
See Xorg(1) and xorg.conf(5) for details.
 
-problem_blurb
-
 $OpenBSD: README.amd64,v 1.12 2017/02/27 21:16:05 matthieu Exp $
Index: distrib/notes/README.arm64
===
RCS file: /cvs/xenocara/distrib/notes/README.arm64,v
retrieving revision 1.1
diff -u -p -r1.1 README.arm64
--- distrib/notes/README.arm64  3 Feb 2017 04:34:10 -   1.1
+++ distrib/notes/README.arm64  30 Mar 2018 21:56:16 -
@@ -3,7 +3,4 @@ Post-installation instructions for X.Org
 
 There is no X server for arm64.  Only userland X.
 
-problem_blurb
-
 $OpenBSD: README.arm64,v 1.1 2017/02/03 04:34:10 jsg Exp $
-
Index: distrib/notes/README.armv7
===
RCS file: /cvs/xenocara/distrib/notes/README.armv7,v
retrieving revision 1.1
diff -u -p -r1.1 README.armv7
--- distrib/notes/README.armv7  9 Sep 2013 13:38:33 -   1.1
+++ distrib/notes/README.armv7  30 Mar 2018 21:56:16 -
@@ -3,7 +3,4 @@ Post-installation instructions for X.Org
 
 There is no X server for armv7.  Only userland X.
 
-problem_blurb
-
 $OpenBSD: README.armv7,v 1.1 2013/09/09 13:38:33 patrick Exp $
-
Index: distrib/notes/README.hppa
===
RCS file: /cvs/xenocara/distrib/notes/README.hppa,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 README.hppa
--- distrib/notes/README.hppa   27 Nov 2006 11:25:45 -  1.1.1.1
+++ distrib/notes/README.hppa   30 Mar 2018 21:56:16 -
@@ -3,6 +3,4 @@ Post-installation instructions for X.Org
 
 There is no X server for hppa.  Only userland X.
 
-problem_blurb
-
 $OpenBSD: README.hppa,v 1.1.1.1 2006/11/27 11:25:45 matthieu Exp $
Index: distrib/notes/README.i386
===
RCS file: /cvs/xenocara/distrib/notes/README.i386,v
retrieving revision 1.12
diff -u -p -r1.12 README.i386
--- distrib/notes/README.i386   27 Feb 2017 21:16:05 -  1.12
+++ distrib/notes/README.i386   30 Mar 2018 21:56:16 -
@@ -27,6 +27,4 @@ Conventions used in this document:
 
See Xorg(1) and xorg.conf(5) for details.
 
-problem_blurb
-
 $OpenBSD: README.i386,v 1.12 2017/02/27 21:16:05 matthieu Exp $
Index: distrib/notes/README.landisk
===
RCS file: /cvs/xenocara/distrib/notes/README.landisk,v
retrieving revision 1.1
diff -u -p -r1.1 README.landisk
--- distrib/notes/README.landisk12 May 2007 10:24:28 -  1.1
+++ distrib/notes/README.landisk30 Mar 2018 21:56:16 -
@@ -3,6 +3,4 @@ Post-installation instructions for X.Org
 
 There is no X server for landisk.  Only userland X.
 
-problem_blurb
-
 $OpenBSD: README.landisk,v 1.1 2007/05/12 10:24:28 matthieu Exp $
Index: distrib/notes/README.loongson
===
RCS file: /cvs/xenocara/distrib/notes/README.loongson,v
retrieving revision 1.5
diff -u -p -r1.5 README.loongson
--- distrib/notes/README.loongson   26 Feb 2017 16:39:22 -  1.5
+++ distrib/notes/README.loongson   30 Mar 2018 21:56:16 -
@@ -16,6 +16,4 @@ getty in /etc/ttys.
 
 Alternatively, you can log in at the console and run `startx'.
 
-problem_blurb
-
 $OpenBSD: README.loongson,v 1.5 2017/02/26 16:39:22 matthieu Exp $
Index: distrib/notes/README.luna88k
===
RCS file: /cvs/xenocara/distrib/notes/README.luna88k,v
retrieving revision 1.4
diff -u -p -r1.4 README.luna88k
--- distrib/notes/README.luna88k26 Feb 2017 16:39:22 -  1.4
+++ distrib/notes/README.luna88k30 Mar 2018 21:56:16 -
@@ -15,6 +15,4 @@ getty in /etc/ttys.
 
 Alternatively, you can log in on console and use `startx'.
 

Re: [PATCH] src - fix IPsec capitalisation

2018-03-15 Thread Raf Czlonka
Hi all,

As per jmc's commit message[0], would anyone be so kind as to comment
on this, please?

Thanks again to Jason for fixing the non-code bits.

[0] https://marc.info/?m=151993729713231

Cheers,

Raf

On Wed, Feb 28, 2018 at 08:38:35PM GMT, Jason McIntyre wrote:
> On Mon, Feb 26, 2018 at 12:15:28PM +0000, Raf Czlonka wrote:
> > Hi all,
> > 
> > Fix capitalisation of IPsec as per the RFC[0] - obviously, only
> > where this makes sense.
> > 
> > The remaining one in cert.pem[1] will get fixed automatically once
> > the file is regenerated, after the object identifiers' description
> > changes.
> > 
> > If this gets in, I'd like to submit a patch for www - *not* individual
> > presentations or papers, though.
> > 
> > [0] https://tools.ietf.org/html/rfc4301#page-4
> > [1] https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libcrypto/cert.pem
> > 
> > Regards,
> > 
> > Raf
> > 
> 
> i'm ok with this diff. i don;t want to commit it as-is though, because
> of the code bits.
> 
> if no one shows any interest in taking it, i'll look at at least fixing the
> man/calendar parts.
> 
> jmc
> 
> > Index: include/arpa/nameser.h
> > ===
> > RCS file: /cvs/src/include/arpa/nameser.h,v
> > retrieving revision 1.13
> > diff -u -p -r1.13 nameser.h
> > --- include/arpa/nameser.h  16 Jan 2015 00:01:28 -  1.13
> > +++ include/arpa/nameser.h  26 Feb 2018 11:03:07 -
> > @@ -223,7 +223,7 @@
> >  #defineKEYFLAG_USERACCOUNT 0x0400  /* key is assoc. with a user 
> > acct */
> >  #defineKEYFLAG_ENTITY  0x0200  /* key is assoc. with entity eg 
> > host */
> >  #defineKEYFLAG_ZONEKEY 0x0100  /* key is zone key for the zone 
> > named */
> > -#defineKEYFLAG_IPSEC   0x0080  /* key is for IPSEC use (host 
> > or user)*/
> > +#defineKEYFLAG_IPSEC   0x0080  /* key is for IPsec use (host 
> > or user)*/
> >  #defineKEYFLAG_EMAIL   0x0040  /* key is for email (MIME 
> > security) */
> >  #defineKEYFLAG_RESERVED10  0x0020  /* reserved - must be zero */
> >  #defineKEYFLAG_RESERVED11  0x0010  /* reserved - must be zero */
> > Index: lib/libcrypto/ec/ec_curve.c
> > ===
> > RCS file: /cvs/src/lib/libcrypto/ec/ec_curve.c,v
> > retrieving revision 1.15
> > diff -u -p -r1.15 ec_curve.c
> > --- lib/libcrypto/ec/ec_curve.c 29 Jan 2017 17:49:23 -  1.15
> > +++ lib/libcrypto/ec/ec_curve.c 26 Feb 2018 11:03:09 -
> > @@ -2135,7 +2135,7 @@ static const struct {
> > }
> >  };
> >  
> > -/* IPSec curves */
> > +/* IPsec curves */
> >  /* NOTE: The of curves over a extension field of non prime degree
> >   * is not recommended (Weil-descent).
> >   * As the group order is not a prime this curve is not suitable
> > @@ -3116,10 +3116,10 @@ static const ec_list_element curve_list[
> >  #endif
> > {NID_wap_wsg_idm_ecid_wtls12, &_EC_WTLS_12.h, 0, "WTLS curve over a 224 
> > bit prime field"},
> >  #ifndef OPENSSL_NO_EC2M
> > -   /* IPSec curves */
> > -   {NID_ipsec3, &_EC_IPSEC_155_ID3.h, 0, "\n\tIPSec/IKE/Oakley curve #3 
> > over a 155 bit binary field.\n"
> > +   /* IPsec curves */
> > +   {NID_ipsec3, &_EC_IPSEC_155_ID3.h, 0, "\n\tIPsec/IKE/Oakley curve #3 
> > over a 155 bit binary field.\n"
> > "\tNot suitable for ECDSA.\n\tQuestionable extension field!"},
> > -   {NID_ipsec4, &_EC_IPSEC_185_ID4.h, 0, "\n\tIPSec/IKE/Oakley curve #4 
> > over a 185 bit binary field.\n"
> > +   {NID_ipsec4, &_EC_IPSEC_185_ID4.h, 0, "\n\tIPsec/IKE/Oakley curve #4 
> > over a 185 bit binary field.\n"
> > "\tNot suitable for ECDSA.\n\tQuestionable extension field!"},
> >  #endif
> > /* RFC 5639 curves */
> > Index: lib/libcrypto/objects/objects.txt
> > ===
> > RCS file: /cvs/src/lib/libcrypto/objects/objects.txt,v
> > retrieving revision 1.19
> > diff -u -p -r1.19 objects.txt
> > --- lib/libcrypto/objects/objects.txt   25 May 2017 17:00:24 -  
> > 1.19
> > +++ lib/libcrypto/objects/objects.txt   26 Feb 2018 11:03:09 -
> > @@ -486,9 +486,9 @@ id-kp 2 : clientAuth: TLS 
> > Web Client
> >  id-kp 3: codeSigning   : Code Signing
> >  !Cname email-

[OT] VISUAL vs. EDITOR vs. vi [Was: Re: Utility to safely edit doas.conf]

2018-02-28 Thread Raf Czlonka
On Wed, Feb 28, 2018 at 06:08:42PM GMT, Tom Davis wrote:
> Additionally, as Martin Schröder pointed out, all editor calls
> should use $EDITOR, but in case a user doesn't have that
> defined, use
> 
> ${EDITOR:-vi}
> 

${VISUAL:-${EDITOR:-vi}}

... and everyone's happy :^)

Raf



[PATCH] src - fix IPsec capitalisation

2018-02-26 Thread Raf Czlonka
Hi all,

Fix capitalisation of IPsec as per the RFC[0] - obviously, only
where this makes sense.

The remaining one in cert.pem[1] will get fixed automatically once
the file is regenerated, after the object identifiers' description
changes.

If this gets in, I'd like to submit a patch for www - *not* individual
presentations or papers, though.

[0] https://tools.ietf.org/html/rfc4301#page-4
[1] https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libcrypto/cert.pem

Regards,

Raf

Index: include/arpa/nameser.h
===
RCS file: /cvs/src/include/arpa/nameser.h,v
retrieving revision 1.13
diff -u -p -r1.13 nameser.h
--- include/arpa/nameser.h  16 Jan 2015 00:01:28 -  1.13
+++ include/arpa/nameser.h  26 Feb 2018 11:03:07 -
@@ -223,7 +223,7 @@
 #defineKEYFLAG_USERACCOUNT 0x0400  /* key is assoc. with a user 
acct */
 #defineKEYFLAG_ENTITY  0x0200  /* key is assoc. with entity eg 
host */
 #defineKEYFLAG_ZONEKEY 0x0100  /* key is zone key for the zone 
named */
-#defineKEYFLAG_IPSEC   0x0080  /* key is for IPSEC use (host 
or user)*/
+#defineKEYFLAG_IPSEC   0x0080  /* key is for IPsec use (host 
or user)*/
 #defineKEYFLAG_EMAIL   0x0040  /* key is for email (MIME 
security) */
 #defineKEYFLAG_RESERVED10  0x0020  /* reserved - must be zero */
 #defineKEYFLAG_RESERVED11  0x0010  /* reserved - must be zero */
Index: lib/libcrypto/ec/ec_curve.c
===
RCS file: /cvs/src/lib/libcrypto/ec/ec_curve.c,v
retrieving revision 1.15
diff -u -p -r1.15 ec_curve.c
--- lib/libcrypto/ec/ec_curve.c 29 Jan 2017 17:49:23 -  1.15
+++ lib/libcrypto/ec/ec_curve.c 26 Feb 2018 11:03:09 -
@@ -2135,7 +2135,7 @@ static const struct {
}
 };
 
-/* IPSec curves */
+/* IPsec curves */
 /* NOTE: The of curves over a extension field of non prime degree
  * is not recommended (Weil-descent).
  * As the group order is not a prime this curve is not suitable
@@ -3116,10 +3116,10 @@ static const ec_list_element curve_list[
 #endif
{NID_wap_wsg_idm_ecid_wtls12, &_EC_WTLS_12.h, 0, "WTLS curve over a 224 
bit prime field"},
 #ifndef OPENSSL_NO_EC2M
-   /* IPSec curves */
-   {NID_ipsec3, &_EC_IPSEC_155_ID3.h, 0, "\n\tIPSec/IKE/Oakley curve #3 
over a 155 bit binary field.\n"
+   /* IPsec curves */
+   {NID_ipsec3, &_EC_IPSEC_155_ID3.h, 0, "\n\tIPsec/IKE/Oakley curve #3 
over a 155 bit binary field.\n"
"\tNot suitable for ECDSA.\n\tQuestionable extension field!"},
-   {NID_ipsec4, &_EC_IPSEC_185_ID4.h, 0, "\n\tIPSec/IKE/Oakley curve #4 
over a 185 bit binary field.\n"
+   {NID_ipsec4, &_EC_IPSEC_185_ID4.h, 0, "\n\tIPsec/IKE/Oakley curve #4 
over a 185 bit binary field.\n"
"\tNot suitable for ECDSA.\n\tQuestionable extension field!"},
 #endif
/* RFC 5639 curves */
Index: lib/libcrypto/objects/objects.txt
===
RCS file: /cvs/src/lib/libcrypto/objects/objects.txt,v
retrieving revision 1.19
diff -u -p -r1.19 objects.txt
--- lib/libcrypto/objects/objects.txt   25 May 2017 17:00:24 -  1.19
+++ lib/libcrypto/objects/objects.txt   26 Feb 2018 11:03:09 -
@@ -486,9 +486,9 @@ id-kp 2 : clientAuth: TLS 
Web Client
 id-kp 3: codeSigning   : Code Signing
 !Cname email-protect
 id-kp 4: emailProtection   : E-mail Protection
-id-kp 5: ipsecEndSystem: IPSec End System
-id-kp 6: ipsecTunnel   : IPSec Tunnel
-id-kp 7: ipsecUser : IPSec User
+id-kp 5: ipsecEndSystem: IPsec End System
+id-kp 6: ipsecTunnel   : IPsec Tunnel
+id-kp 7: ipsecUser : IPsec User
 !Cname time-stamp
 id-kp 8: timeStamping  : Time Stamping
 # From OCSP spec RFC2560
Index: sbin/iked/iked.h
===
RCS file: /cvs/src/sbin/iked/iked.h,v
retrieving revision 1.117
diff -u -p -r1.117 iked.h
--- sbin/iked/iked.h30 Nov 2017 12:18:44 -  1.117
+++ sbin/iked/iked.h26 Feb 2018 11:03:14 -
@@ -165,7 +165,7 @@ RB_HEAD(iked_flows, iked_flow);
 TAILQ_HEAD(iked_saflows, iked_flow);
 
 struct iked_childsa {
-   uint8_t  csa_saproto;   /* IPSec protocol */
+   uint8_t  csa_saproto;   /* IPsec protocol */
unsigned int csa_dir;   /* in/out */
 
uint64_t csa_peerspi;   /* peer relation */
@@ -432,8 +432,8 @@ struct iked_sa {
struct ibuf *sa_eapmsk; /* EAK session key */
 

[PATCH] www/books.html - SSH Mastery, 2nd Edition has now been released

2018-02-14 Thread Raf Czlonka
Hi all,

An update of the "SSH Mastery" book entry to its 2nd edition.

While there, I moved its subtitle up, where it belongs, and swapped
ISBN 10 and 13 to keep it consistent with other books.

I had also taken the liberty to update:

- release date of Peter N. M. Hansteen's Book of PF
- included ISBN-10 for Michael W. Lucas's Absolute OpenBSD
- updated links to both of these books - saves a redirect

I could send the diff for these separately if need be.

Cheers,

Raf

Index: books.html
===
RCS file: /cvs/www/books.html,v
retrieving revision 1.114
diff -u -p -r1.114 books.html
--- books.html  13 Nov 2017 06:42:06 -  1.114
+++ books.html  15 Feb 2018 05:12:48 -
@@ -56,7 +56,7 @@ A No-Nonsense Guide to the OpenBSD Firew
 by Peter N. M. Hansteen
 ISBN-10: 1-59327-589-7
 ISBN-13: 978-1-59327-589-1
-Copyright 2015.
+October 2014, 248 pp.
 
 The first sentence of this book is "This is a book about building the 
 network you need." Taking it from there, Peter walks you through the whys 
@@ -68,27 +68,28 @@ load balancing with "self-healing" netwo
 problems such as DoS attempts and spamming.  A basic understanding of TCP/IP 
 and some Unix knowledge is assumed.
 The official book website for a sample chapter, table of contents and errata 
-can be found http://www.nostarch.com/pf3;>here.
+can be found https://nostarch.com/pf3;>here.
 
 
-SSH Mastery
+SSH Mastery, 2nd Edition
+OpenSSH, PuTTY, Tunnels and Keys
 by Michael W. Lucas
-ISBN-13: 978-1470069711
-ISBN-10: 1470069717 
-February 2012, 145 pp.
-OpenSSH, PuTTY, Tunnels, and Keys 
+ISBN-10: 1642350028
+ISBN-13: 978-1642350029
+February 2018, 242 pp.
 
 A guide to what you need to know about SSH. This book will help you
 eliminate passwords on your network, tunnel unencrypted protocols
 through secure channels, build VPNs with OpenSSH, and more. Focuses on
 the OpenSSH server, the OpenSSH client, and the PuTTY client.
 Michael W. Lucas is the author of Absolute OpenBSD and other BSD books.
-The official SSH Mastery website is
-https://www.michaelwlucas.com/nonfiction/ssh-mastery;>here.
+The official SSH Mastery 2nd edition website is
+https://www.michaelwlucas.com/tools/ssh;>here.
 
 
 Absolute OpenBSD. 2nd Edition!
 by Michael W. Lucas
+ISBN-10: 1593274769
 ISBN-13: 978-1-59327-476-4
 April 2013, 536 pp.
 
@@ -96,8 +97,7 @@ Michael W. Lucas brings us the long anti
 wildly successful book about using OpenBSD.  This book covers all aspects of 
 the OpenBSD system for new UNIX and BSD users alike.
 The official Absolute OpenBSD 2nd edition website is
-https://www.michaelwlucas.com/nonfiction/absolute-openbsd-2nd-edition;>
-here.
+https://www.michaelwlucas.com/os/ao2e;>here.
 
 
 



Re: [PATCH] libexec/ld.so/dlfcn.c - fix column alignment

2018-02-03 Thread Raf Czlonka
Ping.

On Mon, Jan 01, 2018 at 06:17:53PM GMT, Raf Czlonka wrote:
> On Mon, Jan 01, 2018 at 08:56:18AM GMT, Mark Kettenis wrote:
> > > Date: Mon, 1 Jan 2018 07:49:54 +0100 (CET)
> > > From: Mark Kettenis <mark.kette...@xs4all.nl>
> > > 
> > > > Date: Mon, 1 Jan 2018 04:20:35 +
> > > > From: Raf Czlonka <rczlo...@gmail.com>
> > > > 
> > > > Hi all,
> > > > 
> > > > With the recent rtld -> ld.so name change in the 1.100 revision[0],
> > > > said objtypename has been increased by one character, thus causing
> > > > everything past the 'Type' column to become mis-aligned, i.e.:
> > > > 
> > > > $ ldd /usr/bin/ldd
> > > > 
> > > > /usr/bin/ldd:
> > > > StartEnd  Type Open Ref GrpRef Name
> > > > 105b6710 105b67303000 exe  10   0  
> > > > /usr/bin/ldd
> > > > 105d9e966000 105d9ec46000 rlib 01   0  
> > > > /usr/lib/libc.so.92.2
> > > > 105dca30 105dca30 ld.so 01   0  
> > > > /usr/libexec/ld.so
> > > > 
> > > > How about simply changing the ld.so five-character name to ldso
> > > > four-character one and keep current column alignment?
> > > > 
> > > > Alternatively, expand the 'Type' column and all remaining objtypenames
> > > > by one character (mostly space) in order to fix the alignment.
> > > > 
> > > > I'm only including the diff for the latter as doing the former is
> > > > trivial - I still prefer the former solution, BTW.
> > > > 
> > > > While there, how about dropping the leading tab character so that
> > > > majority of the outputs generated fit within 80 columns?
> > > 
> > > I'd prefer to simply revert the change.  It serves no purpose other
> > > than to eat another column.  And if there is any doubt this is ld.so,
> > > the full name is printed next to it on the same line!
> > 
> > Or we could change it to "ldso" instead.
> 
> Hi Mark,
> 
> Yes, please - as per above, and quoting myself from a private email,
> this would have been my preferred solution as removing a single
> character - the dot (.) - is simply the least amount of effort to
> fix the alignment while still maintaining the ldso objtypename
> unambiguously clear and descriptive.
> 
> Additionally, the 'Type' column header would look better separated
> from the other headers - bar Start and End - by a single space.
> 
> Kind regards,
> 
> Raf



Re: Fix for vi(1) manpage Visual command

2018-02-03 Thread Raf Czlonka
On Sun, Feb 04, 2018 at 12:05:47AM GMT, trondd wrote:
> On Sat, February 3, 2018 4:28 pm, Ingo Schwarze wrote:
> >
> >> a good way to do it without adding verbiage would be to not document it!
> >> if it really is a crappy quirk, let's just leave it out then.
> >
> > I actually like that idea, it makes the long list of EX COMMANDS
> > a bit simpler, making the relevant stuff easier to find.
> >
> > Of course, we still have to say how to get out of split screen
> > mode when you stumble into it unintentionally - which esily
> > happens because the colon requires the shift key on many keyboards,
> > so accidentally hitting ":N" instead of ":n" is not uncommon.
> >
> > If people like the idea, i'll also fix up :exusage (unless people
> > want :exusage deleted, which i would of course prefer).
> >
> > OK?
> >   Ingo
> >
> 
> Well this is kind of a bummer.  I agree the documentation is inconsistent
> and confusing, but once I got past reading the man page, I was so excited
> to discover that I could get split screens in base vi without having to
> install vim with its extra baggage.  I'm sad that a feature I use
> constantly will now become undocumented (if not removed) and hidden from
> other's who might find it valuable.
> 
> Not to discourage your work.  I'm not the one maintaining vi, and I can go
> crawling back to ports for nvi if I need to.
> 
> Tim.

I have to second Tim here - I like base vi/ex the way it is.

Very recently, I found a file where I had saved the output of both
:visuage and :exusage - this was from a time when I had noticed as
small alignment issue in :viusage.  I actually learnt a handful
of commands form both of these and would be sad to see either of
them go.  Personally, I don't treat them as *documentation* sensu
stricto, but more like a quick command guide - an index.

All that being said, I'm obviously in no position to make requests
- merely £0.02 from a base vi user and one who found :{ex,vi}usage
actually useful in the past.

Raf



Re: [PATCH] usr.bin/calendar/calendars/calendar.uk - Burns' Night -> Burns Night

2018-01-13 Thread Raf Czlonka
On Sat, Jan 13, 2018 at 01:17:35AM GMT, Andras Farkas wrote:
> On Fri, Jan 12, 2018 at 3:11 PM, Jason McIntyre  wrote:
> > hilariously, i just realised the apostrophe in the quote above is in the
> > wrong place! maybe it should be "Burns Hog Weighing Method" ;)
> I'd also like to note that while some people would do:
> Burns' Hog Weighing Method
> The following is also considered valid and correct:
> Burns's Hog Weighing Method
> In fact, the second method, using Burns's, is the first thing
> mentioned in the first chapter of The Elements of Style by William
> Strunk Jr. and E.B. White
> Coincidentally, one of the three examples given is verbatim:
> Burns's poems
> 

Hi all,

That is also the way I've been taught - namely, "'s" after personal
names ending in "s"[0], i.e.:

- Charles's
- Dickens's
- Thomas's

unless the name is already plural[1], i.e.:

- Roosevelts'
- Kennedys'

Based on the above rule, I would not have used "Burns'" purely because
it is not plural.

Now, these are obviously the "rules"... but there's a plethora of
exceptions and I don't claim to know all of them.

There's also the common usage, which might not even be grammatically
correct but is so predominant that it has become part of the English
language.

In terms of "Burns Night" I simply provided several high-profile
websites using the phrase without the apostrophe.

When it comes to the "Hog Weighing Method", personally, I would have
used "Burns's" but there's obviously the historical/common usage.

[0] https://en.oxforddictionaries.com/punctuation/apostrophe 
[1] http://qcpages.qc.cuny.edu/writing/history/editing/errors.html#apostrophes

Cheers,

Raf



Re: [PATCH] usr.bin/calendar/calendars/calendar.uk - Burns' Night -> Burns Night

2018-01-12 Thread Raf Czlonka
On Fri, Jan 12, 2018 at 08:11:37PM GMT, Jason McIntyre wrote:
> On Fri, Jan 12, 2018 at 08:05:47PM +, Jason McIntyre wrote:
> > On Fri, Jan 12, 2018 at 07:38:47PM +0000, Raf Czlonka wrote:
> > > Hi all,
> > > 
> > > According to the most[0] prominent[1] websites[2][3][4], there's no
> > > apostrophe (') in Burns Night.
> > > 
> > > [0] 
> > > https://www.gov.uk/government/news/uk-government-leads-burns-night-celebrations-around-the-world
> > > [1] https://www.scotland.org/events/burns-night
> > > [2] http://www.bbc.co.uk/arts/robertburns/burns_night_running_order.shtml
> > > [3] https://en.wikipedia.org/wiki/Burns_supper
> > > [4] http://www.robertburns.org/suppers/
> > > 
> > > Regards,
> > > 
> > > Raf
> > > 
> > 
> > evening.
> > 
> > it seems both are acceptable. i'm reluctant to change it without any
> > pressing reason to prefer one over the other.
> > 
> > but do check fortunes for some class...
> > 
> > Burn's Hog Weighing Method:
> > (1) Get a perfectly symmetrical plank and balance it across a
> > sawhorse.
> > (2) Put the hog on one end of the plank.
> > (3) Pile rocks on the other end until the plank is again
> > perfectly balanced.
> > (4) Carefully guess the weight of the rocks.
> > -- Robert Burns
> > 
> > jmc
> > 
> 
> hilariously, i just realised the apostrophe in the quote above is in the
> wrong place! maybe it should be "Burns Hog Weighing Method" ;)
> 
> jmc
> 

That's the *first* thing I've notied ;^)

Raf



[PATCH] usr.bin/calendar/calendars/calendar.uk - Burns' Night -> Burns Night

2018-01-12 Thread Raf Czlonka
Hi all,

According to the most[0] prominent[1] websites[2][3][4], there's no
apostrophe (') in Burns Night.

[0] 
https://www.gov.uk/government/news/uk-government-leads-burns-night-celebrations-around-the-world
[1] https://www.scotland.org/events/burns-night
[2] http://www.bbc.co.uk/arts/robertburns/burns_night_running_order.shtml
[3] https://en.wikipedia.org/wiki/Burns_supper
[4] http://www.robertburns.org/suppers/

Regards,

Raf

Index: usr.bin/calendar/calendars/calendar.uk
===
RCS file: /cvs/src/usr.bin/calendar/calendars/calendar.uk,v
retrieving revision 1.1
diff -u -p -r1.1 calendar.uk
--- usr.bin/calendar/calendars/calendar.uk  14 Jan 2016 20:08:01 -  
1.1
+++ usr.bin/calendar/calendars/calendar.uk  12 Jan 2018 19:28:40 -
@@ -9,7 +9,7 @@
 
 01/01  New Year's Day
 01/02  Bank holiday in Scotland
-01/25  Burns' Night in Scotland
+01/25  Burns Night in Scotland
 02/14  Saint Valentine's Day
 03/01  Saint David's Day in Wales
 03/17  Saint Patrick's Day (also a bank holiday across Ireland)



Re: [PATCH] libexec/ld.so/dlfcn.c - fix column alignment

2018-01-01 Thread Raf Czlonka
On Mon, Jan 01, 2018 at 08:56:18AM GMT, Mark Kettenis wrote:
> > Date: Mon, 1 Jan 2018 07:49:54 +0100 (CET)
> > From: Mark Kettenis <mark.kette...@xs4all.nl>
> > 
> > > Date: Mon, 1 Jan 2018 04:20:35 +
> > > From: Raf Czlonka <rczlo...@gmail.com>
> > > 
> > > Hi all,
> > > 
> > > With the recent rtld -> ld.so name change in the 1.100 revision[0],
> > > said objtypename has been increased by one character, thus causing
> > > everything past the 'Type' column to become mis-aligned, i.e.:
> > > 
> > > $ ldd /usr/bin/ldd
> > > 
> > > /usr/bin/ldd:
> > >   StartEnd  Type Open Ref GrpRef Name
> > >   105b6710 105b67303000 exe  10   0  /usr/bin/ldd
> > >   105d9e966000 105d9ec46000 rlib 01   0  
> > > /usr/lib/libc.so.92.2
> > >   105dca30 105dca30 ld.so 01   0  
> > > /usr/libexec/ld.so
> > > 
> > > How about simply changing the ld.so five-character name to ldso
> > > four-character one and keep current column alignment?
> > > 
> > > Alternatively, expand the 'Type' column and all remaining objtypenames
> > > by one character (mostly space) in order to fix the alignment.
> > > 
> > > I'm only including the diff for the latter as doing the former is
> > > trivial - I still prefer the former solution, BTW.
> > > 
> > > While there, how about dropping the leading tab character so that
> > > majority of the outputs generated fit within 80 columns?
> > 
> > I'd prefer to simply revert the change.  It serves no purpose other
> > than to eat another column.  And if there is any doubt this is ld.so,
> > the full name is printed next to it on the same line!
> 
> Or we could change it to "ldso" instead.

Hi Mark,

Yes, please - as per above, and quoting myself from a private email,
this would have been my preferred solution as removing a single
character - the dot (.) - is simply the least amount of effort to
fix the alignment while still maintaining the ldso objtypename
unambiguously clear and descriptive.

Additionally, the 'Type' column header would look better separated
from the other headers - bar Start and End - by a single space.

Kind regards,

Raf



[PATCH] libexec/ld.so/dlfcn.c - fix column alignment

2017-12-31 Thread Raf Czlonka
Hi all,

With the recent rtld -> ld.so name change in the 1.100 revision[0],
said objtypename has been increased by one character, thus causing
everything past the 'Type' column to become mis-aligned, i.e.:

$ ldd /usr/bin/ldd

/usr/bin/ldd:
StartEnd  Type Open Ref GrpRef Name
105b6710 105b67303000 exe  10   0  /usr/bin/ldd
105d9e966000 105d9ec46000 rlib 01   0  
/usr/lib/libc.so.92.2
105dca30 105dca30 ld.so 01   0  
/usr/libexec/ld.so

How about simply changing the ld.so five-character name to ldso
four-character one and keep current column alignment?

Alternatively, expand the 'Type' column and all remaining objtypenames
by one character (mostly space) in order to fix the alignment.

I'm only including the diff for the latter as doing the former is
trivial - I still prefer the former solution, BTW.

While there, how about dropping the leading tab character so that
majority of the outputs generated fit within 80 columns?

Regards and Happy New Year,

Raf

[0] 
https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/libexec/ld.so/dlfcn.c.diff?r1=1.99=1.100

Index: libexec/ld.so/dlfcn.c
===
RCS file: /cvs/src/libexec/ld.so/dlfcn.c,v
retrieving revision 1.100
diff -u -p -r1.100 dlfcn.c
--- libexec/ld.so/dlfcn.c   8 Dec 2017 05:25:20 -   1.100
+++ libexec/ld.so/dlfcn.c   1 Jan 2018 04:05:16 -
@@ -495,7 +495,7 @@ _dl_show_objects(void)
"\t%x %e %t %O%r   %g  %p\n";
 
if (_dl_tracefmt1 == NULL && _dl_tracefmt2 == NULL)
-   _dl_dprintf(outputfd, "\tStart   %s End %s Type Open Ref 
GrpRef Name\n",
+   _dl_dprintf(outputfd, "\tStart   %s End %s Type  Open Ref 
GrpRef Name\n",
pad, pad);
 
if (_dl_tracelib) {
@@ -512,16 +512,16 @@ _dl_show_objects(void)
objtypename = "ld.so";
break;
case OBJTYPE_EXE:
-   objtypename = "exe ";
+   objtypename = "exe  ";
break;
case OBJTYPE_LIB:
-   objtypename = "rlib";
+   objtypename = "rlib ";
break;
case OBJTYPE_DLO:
-   objtypename = "dlib";
+   objtypename = "dlib ";
break;
default:
-   objtypename = "";
+   objtypename = "?";
break;
}
_dl_tracefmt(outputfd, object, fmt1, fmt2, objtypename);



Re: Add reset option to boot command of ddb(4)

2017-12-13 Thread Raf Czlonka
On Wed, Dec 13, 2017 at 06:09:14PM GMT, Florian Riehm wrote:
> Hi,
> 
> This patch follows bluhm's attempt for a ddb command 'boot reset'.
> My first attempt was not architecture aware.
> 
> Tested on i386 by bluhm@ and on amd64 by me.
> 
> ok?
> 
> friehm
> 
> Index: share/man/man4/ddb.4
> ===
> RCS file: /openbsd/src/share/man/man4/ddb.4,v
> retrieving revision 1.92
> diff -u -p -r1.92 ddb.4
> --- share/man/man4/ddb.4  29 Nov 2017 07:28:21 -  1.92
> +++ share/man/man4/ddb.4  12 Dec 2017 06:35:44 -
> @@ -381,6 +381,15 @@ Just halt.
>  Just reboot.
>  .It Ic boot poweroff
>  Power down the machine whenever possible; if it fails, just halt.
> +.It Ic boot reset
> +Restart the machine by resetting the CPU on i386 and amd64
> +architectures.
> +Useful in situations were

Shouldn't this read "where"?

Raf

> +.Ic boot reboot
> +does not work anymore, i.e. due to locking issues.
> +On other platforms it is equivalent to the
> +.Ic boot reboot
> +command.
>  .El
>  .\" 
>  .It Xo
> Index: sys/arch/amd64/amd64/machdep.c
> ===
> RCS file: /openbsd/src/sys/arch/amd64/amd64/machdep.c,v
> retrieving revision 1.236
> diff -u -p -r1.236 machdep.c
> --- sys/arch/amd64/amd64/machdep.c11 Dec 2017 05:27:40 -  1.236
> +++ sys/arch/amd64/amd64/machdep.c12 Dec 2017 06:35:44 -
> @@ -713,6 +713,9 @@ struct pcb dumppcb;
>  __dead void
>  boot(int howto)
>  {
> + if ((howto & RB_RESET) != 0)
> + goto reset;
> +
>   if ((howto & RB_POWERDOWN) != 0)
>   lid_action = 0;
>  
> @@ -770,6 +773,7 @@ haltsys:
>   printf("rebooting...\n");
>   if (cpureset_delay > 0)
>   delay(cpureset_delay * 1000);
> +reset:
>   cpu_reset();
>   for (;;)
>   continue;
> Index: sys/arch/i386/i386/machdep.c
> ===
> RCS file: /openbsd/src/sys/arch/i386/i386/machdep.c,v
> retrieving revision 1.607
> diff -u -p -r1.607 machdep.c
> --- sys/arch/i386/i386/machdep.c  11 Dec 2017 05:27:40 -  1.607
> +++ sys/arch/i386/i386/machdep.c  12 Dec 2017 06:35:44 -
> @@ -2629,6 +2629,9 @@ struct pcb dumppcb;
>  __dead void
>  boot(int howto)
>  {
> + if ((howto & RB_RESET) != 0)
> + goto reset;
> +
>   if ((howto & RB_POWERDOWN) != 0)
>   lid_action = 0;
>  
> @@ -2709,6 +2712,7 @@ haltsys:
>   }
>  
>   printf("rebooting...\n");
> +reset:
>   cpu_reset();
>   for (;;)
>   continue;
> Index: sys/ddb/db_command.c
> ===
> RCS file: /openbsd/src/sys/ddb/db_command.c,v
> retrieving revision 1.81
> diff -u -p -r1.81 db_command.c
> --- sys/ddb/db_command.c  11 Dec 2017 05:27:40 -  1.81
> +++ sys/ddb/db_command.c  12 Dec 2017 06:35:44 -
> @@ -105,6 +105,7 @@ void  db_boot_dump_cmd(db_expr_t, int, db
>  void db_boot_halt_cmd(db_expr_t, int, db_expr_t, char *);
>  void db_boot_reboot_cmd(db_expr_t, int, db_expr_t, char *);
>  void db_boot_poweroff_cmd(db_expr_t, int, db_expr_t, char *);
> +void db_boot_reset_cmd(db_expr_t, int, db_expr_t, char *);
>  void db_stack_trace_cmd(db_expr_t, int, db_expr_t, char *);
>  void db_dmesg_cmd(db_expr_t, int, db_expr_t, char *);
>  void db_show_panic_cmd(db_expr_t, int, db_expr_t, char *);
> @@ -597,6 +598,7 @@ struct db_command db_boot_cmds[] = {
>   { "halt",   db_boot_halt_cmd,   0,  0 },
>   { "reboot", db_boot_reboot_cmd, 0,  0 },
>   { "poweroff",   db_boot_poweroff_cmd,   0,  0 },
> + { "reset",  db_boot_reset_cmd,  0,  0 },
>   { NULL, }
>  };
>  
> @@ -812,6 +814,12 @@ void
>  db_boot_poweroff_cmd(db_expr_t addr, int haddr, db_expr_t count, char *modif)
>  {
>   db_reboot(RB_NOSYNC | RB_HALT | RB_POWERDOWN | RB_TIMEBAD | RB_USERREQ);
> +}
> +
> +void
> +db_boot_reset_cmd(db_expr_t addr, int haddr, db_expr_t count, char *modif)
> +{
> + db_reboot(RB_RESET | RB_AUTOBOOT | RB_NOSYNC | RB_TIMEBAD | RB_USERREQ);
>  }
>  
>  void
> Index: sys/sys/reboot.h
> ===
> RCS file: /openbsd/src/sys/sys/reboot.h,v
> retrieving revision 1.17
> diff -u -p -r1.17 reboot.h
> --- sys/sys/reboot.h  11 Jul 2014 14:36:44 -  1.17
> +++ sys/sys/reboot.h  12 Dec 2017 06:35:45 -
> @@ -56,6 +56,7 @@
>  #define  RB_POWERDOWN0x1000  /* attempt to power down machine */
>  #define  RB_SERCONS  0x2000  /* use serial console if available */
>  #define  RB_USERREQ  0x4000  /* boot() called at user request (e.g. 
> ddb) */
> +#define  RB_RESET0x8000  /* do not try to cleanup, only for ddb 
> */
>  
>  /*
>   * Constants for converting boot-style device number to type,
> 



/usr/share/calendar/calendar.christian - two entries for "First Sunday of Advent (4th Sunday before Christmas)"

2017-11-12 Thread Raf Czlonka
Hi all,

I've just noticed something strange in the
/usr/share/calendar/calendar.christian file, namely:

11/SunLast  First Sunday of Advent (4th Sunday before Christmas)
12/SunFirst First Sunday of Advent (4th Sunday before Christmas)

Obviously, in any given year either is true - not both.

I do understand the intent - the beginning of Advent will either
be on the last Sunday of November or the first Sunday of December
depending which day of the week Christmas Day falls on.

Calculating it isn't difficult - last Thursday of November + 3 days -
but I'm not sure whether adding any additional code to calendar(1)
is desirable.

I don't know what the best solution to the above is as currently,
as it stands, these entries are confusing - at first glance the
above looks like a bug and after figuring out it isn't one, I'm
sill none the wise which one it is without consulting another
calendar.

Adding code, modifying the above entries or an additional entry in
the BUGS section in the manual. What are your thought?

Best regards,

Raf



Re: [PATCH] etc/ksh.kshrc - unify command substitution

2017-11-02 Thread Raf Czlonka
Hi all,

So there's one OK - anyone else?

Would anyone be so kind as to commit it, please? :^)

Regards,

Raf

On Mon, Oct 23, 2017 at 06:32:03PM BST, Alexander Hall wrote:
> I'm OK with this.
> 
> /Alexander
> 
> 
> On October 23, 2017 3:29:57 PM GMT+02:00, Raf Czlonka <rczlo...@gmail.com> 
> wrote:
> >What say you?
> >
> >On Tue, Aug 29, 2017 at 08:44:43PM BST, Raf Czlonka wrote:
> >> Ping.
> >> 
> >> Anyone?
> >> 
> >> On Sun, Jul 16, 2017 at 01:43:32PM BST, Raf Czlonka wrote:
> >> > Hi all,
> >> > 
> >> > Further simplification - 'ps | grep' can be replaced by pgrep(1)
> >> > and if-then-fi by &&.
> >> > 
> >> > > While there:
> >> > > 
> >> > > - remove ':' (null utility) from the very first line of the file
> >-
> >> > >   I *do* understand what it does but it doesn't seem like it's
> >needed
> >> > >   at all, unless I'm missing something (as is the case with some
> >idioms)
> >> > > [...]
> >> > > 
> >> > 
> >> > As it transpired, this does indeed seem to be an old idiom denoting
> >> > a Bourne shell script.
> >> > 
> >> > To quote rpe@: "I guess it's fine to remove the : line in 2017."
> >> > 
> >> > I agree.
> >> > 
> >> > Thanks again to Robert for all the feedback and suggestions.
> >> > 
> >> > Regards,
> >> > 
> >> > Raf
> >> > 
> >> > Index: etc/ksh.kshrc
> >> > ===
> >> > RCS file: /cvs/src/etc/ksh.kshrc,v
> >> > retrieving revision 1.28
> >> > diff -u -p -r1.28 ksh.kshrc
> >> > --- etc/ksh.kshrc15 Jul 2017 07:11:42 -  1.28
> >> > +++ etc/ksh.kshrc16 Jul 2017 11:49:55 -
> >> > @@ -1,4 +1,3 @@
> >> > -:
> >> >  #   $OpenBSD: ksh.kshrc,v 1.28 2017/07/15 07:11:42 tb Exp $
> >> >  #
> >> >  # NAME:
> >> > @@ -74,9 +73,7 @@ case "$-" in
> >> >  xterm*)
> >> >  ILS='\033]1;'; ILE='\007'
> >> >  WLS='\033]2;'; WLE='\007'
> >> > -if ps -p $PPID -o command | grep -q telnet; then
> >> > -export TERM=xterms
> >> > -fi
> >> > +pgrep -qxs $PPID telnet && export TERM=xterms
> >> >  ;;
> >> >  *)  ;;
> >> >  esac



Re: [PATCH] etc/ksh.kshrc - unify command substitution

2017-10-23 Thread Raf Czlonka
What say you?

On Tue, Aug 29, 2017 at 08:44:43PM BST, Raf Czlonka wrote:
> Ping.
> 
> Anyone?
> 
> On Sun, Jul 16, 2017 at 01:43:32PM BST, Raf Czlonka wrote:
> > Hi all,
> > 
> > Further simplification - 'ps | grep' can be replaced by pgrep(1)
> > and if-then-fi by &&.
> > 
> > > While there:
> > > 
> > > - remove ':' (null utility) from the very first line of the file -
> > >   I *do* understand what it does but it doesn't seem like it's needed
> > >   at all, unless I'm missing something (as is the case with some idioms)
> > > [...]
> > > 
> > 
> > As it transpired, this does indeed seem to be an old idiom denoting
> > a Bourne shell script.
> > 
> > To quote rpe@: "I guess it's fine to remove the : line in 2017."
> > 
> > I agree.
> > 
> > Thanks again to Robert for all the feedback and suggestions.
> > 
> > Regards,
> > 
> > Raf
> > 
> > Index: etc/ksh.kshrc
> > ===
> > RCS file: /cvs/src/etc/ksh.kshrc,v
> > retrieving revision 1.28
> > diff -u -p -r1.28 ksh.kshrc
> > --- etc/ksh.kshrc   15 Jul 2017 07:11:42 -  1.28
> > +++ etc/ksh.kshrc   16 Jul 2017 11:49:55 -
> > @@ -1,4 +1,3 @@
> > -:
> >  #  $OpenBSD: ksh.kshrc,v 1.28 2017/07/15 07:11:42 tb Exp $
> >  #
> >  # NAME:
> > @@ -74,9 +73,7 @@ case "$-" in
> > xterm*)
> > ILS='\033]1;'; ILE='\007'
> > WLS='\033]2;'; WLE='\007'
> > -   if ps -p $PPID -o command | grep -q telnet; then
> > -   export TERM=xterms
> > -   fi
> > +   pgrep -qxs $PPID telnet && export TERM=xterms
> > ;;
> > *)  ;;
> > esac



man pages for OpenBSD 6.2

2017-10-16 Thread Raf Czlonka
Hi all,

Manual pages for OpenBSD 6.2 are not yet available on
https://man.openbsd.org/

I thought I'd mention it in case this has slipped your attention :^)

Regards,

Raf



[PATCH] innovations.html - use singular nop instead of plural nops

2017-10-10 Thread Raf Czlonka
Hi all,

As per the subject - nops sequences -> nop sequences.

Regards,

Raf

Index: innovations.html
===
RCS file: /cvs/www/innovations.html,v
retrieving revision 1.53
diff -u -p -r1.53 innovations.html
--- innovations.html9 Oct 2017 16:02:38 -   1.53
+++ innovations.html11 Oct 2017 00:18:59 -
@@ -466,7 +466,7 @@ explained in detail in our 

Re: [patch] ftp(1): change mtime for http/https links

2017-09-23 Thread Raf Czlonka
On Sat, Sep 23, 2017 at 10:12:32AM BST, Ted Unangst wrote:
> Raf Czlonka wrote:
> > This is unrelated to your diff but what I do instead is to check
> > the BUILDINFO file - it's tiny and all the information you need,
> > is already there.
> 
> While we're on the subject, I'll point out that sometimes only the base sets
> change, but not the x sets. If you download SHA256 you can download only files
> that differ. (This also may work better if you switch mirrors or the
> timestamps drift for other reasons.) It's just a few lines of shell, though I
> don't have them handy atm.
> 
> (And for bonus points, you can use SHA256.sig and verify it's correct, then
> verify that BUILDINFO hasn't been tampered with, etc...)
> 
> ftp/http should still do the right thing, of course.

Hi Ted et al.

I've mentioned BUILDINFO only as an example of the smallest file
to download which, at the same time contains very useful information.

This is what I use:

BSD="bsd.rd bsd"
test "$(sysctl -n hw.ncpu)" -ge "2" && BSD="$BSD bsd.mp"
ftp -o BUILDINFO.new -V ${SNAP_PATH}/BUILDINFO > /dev/null 2>&1 &&
cmp -s BUILDINFO.new BUILDINFO || mv BUILDINFO.new BUILDINFO &&
ftp -V ${SNAP_PATH}/SHA256.sig > /dev/null 2>&1 &&
for i in INSTALL.${arch} $BSD $SETS BUILDINFO
do
signify -q -C -p $KEY -x SHA256.sig $i > /dev/null 2>&1 ||
ftp -V ${SNAP_PATH}/${i} > /dev/null 2>&1
done

I don't think $KEY, $SNAP_PATH and $SETS require any explanation.

Regards,

Raf



Re: [patch] ftp(1): change mtime for http/https links

2017-09-22 Thread Raf Czlonka
On Fri, Sep 22, 2017 at 11:01:57PM BST, Jesper Wallin wrote:
> Hi all,
> 
> My morning routine consists of downloading the latest snapshot files and
> running the upgrade.  To avoid wasting bandwidth and time, I check the
> local modification time of INSTALL.amd64, fetch the remote one and check
> if the modification time has changed.

Hi Jesper,

This is unrelated to your diff but what I do instead is to check
the BUILDINFO file - it's tiny and all the information you need,
is already there.

Cheers,

Raf
 
> A few days ago, the mirror I use had issues with the ftpd.  I quickly
> switched the ftp:// to http:// and continued with my routine.  By doing
> so, I noticed that when running ftp(1) on ftp links, it does preserve
> the modification time.  But for http or https links, the modification
> time is ignored.
> 
> I noticed the 'preserve' option is enabled by default, even when using
> the auto-fetch feature.  I find this behaviour a bit inconsistent and
> unintuitive, seeing it won't let the user specify whether or not the
> preserve option should be enabled.  Yet, it behaves differently
> depending on what protocol we use to fetch the file.
> 
> The patch below will use the Last-Modified header in order to set the
> modification time for http or https links.  I also added, what to me
> looked like a missing "\n" on the error message in ftp.c.
> 
> An alternative solution might be to have the preserve option disabled
> by default when auto-fetching files.
> 
> 
> Jesper Wallin
> 
> 
> Index: fetch.c
> ===
> RCS file: /cvs/src/usr.bin/ftp/fetch.c,v
> retrieving revision 1.163
> diff -u -p -r1.163 fetch.c
> --- fetch.c   7 Mar 2017 08:00:23 -   1.163
> +++ fetch.c   22 Sep 2017 19:52:49 -
> @@ -210,6 +210,7 @@ url_get(const char *origline, const char
>   int status;
>   int save_errno;
>   const size_t buflen = 128 * 1024;
> + time_t mtime = -1;
>  
>   direction = "received";
>  
> @@ -860,6 +861,12 @@ noslash:
>   if (restart_point)
>   filesize += restart_point;
>  #endif /* !SMALL */
> +#define LASTMOD "Last-Modified: "
> + } else if (strncasecmp(cp, LASTMOD, sizeof(LASTMOD) - 1) == 0) {
> + struct tm tm;
> + cp += sizeof(LASTMOD) - 1;
> + if (strptime(cp, "%a, %d %b %Y %T %z", ) != NULL)
> + mtime = mktime();
>  #define LOCATION "Location: "
>   } else if (isredirect &&
>   strncasecmp(cp, LOCATION, sizeof(LOCATION) - 1) == 0) {
> @@ -1043,8 +1050,22 @@ cleanup_url_get:
>   fclose(fin);
>   else if (s != -1)
>   close(s);
> - if (out >= 0 && out != fileno(stdout))
> + if (out >= 0 && out != fileno(stdout)) {
> +
> + if (mtime != -1) {
> + struct timeval tv[2];
> + tv[0].tv_sec = time(NULL);
> + tv[0].tv_usec = tv[1].tv_usec = 0;
> + tv[1].tv_sec = mtime;
> +
> + if (futimes(out, tv) == -1)
> + fprintf(ttyout,
> + "Can't change modification time on %s to %s\n",
> + savefile, asctime(localtime()));
> + }
> +
>   close(out);
> + }
>   free(buf);
>   free(proxyhost);
>   free(proxyurl);
> Index: ftp.c
> ===
> RCS file: /cvs/src/usr.bin/ftp/ftp.c,v
> retrieving revision 1.100
> diff -u -p -r1.100 ftp.c
> --- ftp.c 22 Aug 2016 16:27:00 -  1.100
> +++ ftp.c 22 Sep 2017 19:52:50 -
> @@ -1217,7 +1217,7 @@ break2:
>   ut.modtime = mtime;
>   if (utime(local, ) == -1)
>   fprintf(ttyout,
> - "Can't change modification time on %s to %s",
> + "Can't change modification time on %s to %s\n",
>   local, asctime(localtime()));
>   }
>   }
> 



[PATCH] pwd_mkdb.8 - fix wording

2017-09-09 Thread Raf Czlonka
Hi all,

Since the version 1.24 of the file[0] has changed the first sentence,
"respectively" doesn't belong in the second sentence any more.

I guess the two could be simplified further and combined into one
but this at least fixes the wording.

[0] 
https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/pwd_mkdb/pwd_mkdb.8.diff?r1=1.23=1.24=h

Regards,

Raf

Index: usr.sbin/pwd_mkdb/pwd_mkdb.8
===
RCS file: /cvs/src/usr.sbin/pwd_mkdb/pwd_mkdb.8,v
retrieving revision 1.27
diff -u -p -r1.27 pwd_mkdb.8
--- usr.sbin/pwd_mkdb/pwd_mkdb.816 Aug 2016 17:51:38 -  1.27
+++ usr.sbin/pwd_mkdb/pwd_mkdb.89 Sep 2017 20:44:19 -
@@ -48,8 +48,7 @@ creates a pair of Berkeley databases for
 These databases are then installed into
 .Pa /etc/spwd.db
 and
-.Pa /etc/pwd.db ,
-respectively.
+.Pa /etc/pwd.db .
 The
 .Ar file
 argument is installed into



[PATCH] faq/faq10.html - add rdist(1) to the list of synchronisation tools

2017-09-09 Thread Raf Czlonka
Hi all,

Reading the "Directory services" part of the FAQ[0] I can't help
the feeling that rdist(1) is missing from the list of file synchronisation
tools - reasons below:

- rsync, albeit very popular, is an external port,
- rdist is available in base (and BSD-derived),
- rdist's sole purpose is remote file distribution.

I'd even go as far as removing all the other ones from the list as
rdist(1) already uses both cron(8) and ssh(1) to do its job - I
don't feel too strongly about it, though :^)

What do others think?

[0] https://www.openbsd.org/faq/faq10.html#Dir.available

Regards,

Raf

Index: faq/faq10.html
===
RCS file: /cvs/www/faq/faq10.html,v
retrieving revision 1.271
diff -u -p -r1.271 faq10.html
--- faq/faq10.html  8 Aug 2017 19:15:57 -   1.271
+++ faq/faq10.html  9 Sep 2017 09:35:09 -
@@ -354,6 +354,7 @@ daemon provides the latter.
 
 For some applications, simply synchronizing a small number of configuration
 files among a group of machines using tools like
+https://man.openbsd.org/rdist;>rdist(1),
 https://man.openbsd.org/cron;>cron(8),
 https://man.openbsd.org/scp;>scp(1) or
 rsync (available from ports) constitutes an easy and robust 
alternative



[PATCH] urng.4 - Altusmetrum -> Altus Metrum

2017-09-08 Thread Raf Czlonka
Hi all,

According to their web pages[0][1] Altus Metrum name comprises two
words - both capitalised.

[0] http://altusmetrum.org/
[1] http://shop.gag.com/about-magento-demo-store

Regards,

Raf

Index: share/man/man4/urng.4
===
RCS file: /cvs/src/share/man/man4/urng.4,v
retrieving revision 1.2
diff -u -p -r1.2 urng.4
--- share/man/man4/urng.4   29 Aug 2017 06:12:36 -  1.2
+++ share/man/man4/urng.4   8 Sep 2017 21:13:14 -
@@ -34,14 +34,14 @@ and stirs it into the system entropy poo
 .Xr add_true_randomness 9 .
 .Sh HARDWARE
 The following devices are supported by this driver:
-.Bl -tag -width "Altusmetrum"
+.Bl -tag -width "Altus Metrum"
 .It Araneus Alea II
 Capable of delivering 100kbit/sec of hardware-generated entropy.
 The product documentation states that the USB interface used by the
 Alea II is the same as that used by its predecessor the Alea I;
 theoretically this means that the Alea I should work but this has not
 been tested.
-.It Altusmetrum ChaosKey 1.0
+.It Altus Metrum ChaosKey 1.0
 This device is capable of providing entropy at 10Mbit/s.
 .El
 .Sh SEE ALSO



Re: [PATCH] VMD: Ensure disk is a regular file prior to vm boot

2017-08-30 Thread Raf Czlonka
Hi Carlos,

Doesn't this mean that, even though it might not be possible to do
this today (is it?), you're effectively disabling the usage of
physical disks for VMs, i.e. equivalent of a raw disk device used
in other hypervisors?

Regards,

Raf

On Thu, Aug 31, 2017 at 12:56:20AM BST, Carlos Cardenas wrote:
> Add check(s) in vmd/vmctl to ensure a VM's disk are regular files.
> 
> Tested with the following:
> vmctl start "test1" -d /dev/sd3c #block device
> vmctl start "test2" -d /dev/rsd3c #char device
> vmctl start "test3" -d fifo #named pipe
> 
> Comments? Ok?
> 
> diff --git usr.sbin/vmctl/vmctl.c usr.sbin/vmctl/vmctl.c
> index f694f61e48c..e3db6a78c5b 100644
> --- usr.sbin/vmctl/vmctl.c
> +++ usr.sbin/vmctl/vmctl.c
> @@ -204,6 +204,11 @@ vm_start_complete(struct imsg *imsg, int *ret, int 
> autoconnect)
>   warnx("could not find specified disk image(s)");
>   *ret = ENOENT;
>   break;
> + case VMD_DISK_INVALID:
> + warnx("specified disk image(s) are "
> +"not regular files");
> + *ret = ENOENT;
> + break;
>   default:
>   errno = res;
>   warn("start vm command failed");
> diff --git usr.sbin/vmd/config.c usr.sbin/vmd/config.c
> index 1e1166f8263..ced7ab666b4 100644
> --- usr.sbin/vmd/config.c
> +++ usr.sbin/vmd/config.c
> @@ -20,6 +20,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  
>  #include 
> @@ -157,6 +158,7 @@ config_setvm(struct privsep *ps, struct vmd_vm *vm, 
> uint32_t peerid, uid_t uid)
>   struct vmd_if   *vif;
>   struct vmop_create_params *vmc = >vm_params;
>   struct vm_create_params *vcp = >vmc_params;
> + struct stat  stat_buf;
>   unsigned int i;
>   int  fd = -1, vmboot = 0;
>   int  kernfd = -1, *diskfds = NULL, *tapfds = NULL;
> @@ -225,6 +227,19 @@ config_setvm(struct privsep *ps, struct vmd_vm *vm, 
> uint32_t peerid, uid_t uid)
>  
>   /* Open disk images for child */
>   for (i = 0 ; i < vcp->vcp_ndisks; i++) {
> +/* Stat disk[i] to ensure it is a regular file */
> +if (stat(vcp->vcp_disks[i], _buf) == -1) {
> + log_warn("%s: can't open disk %s", __func__,
> + vcp->vcp_disks[i]);
> + errno = VMD_DISK_MISSING;
> + goto fail;
> +}
> +if (S_ISREG(stat_buf.st_mode) == 0) {
> + log_warn("%s: disk %s is not a regular file", __func__,
> + vcp->vcp_disks[i]);
> + errno = VMD_DISK_INVALID;
> + goto fail;
> +}
>   if ((diskfds[i] =
>   open(vcp->vcp_disks[i], O_RDWR)) == -1) {
>   log_warn("%s: can't open disk %s", __func__,
> diff --git usr.sbin/vmd/vmd.h usr.sbin/vmd/vmd.h
> index 57bdb71cd5f..daeffa7c80e 100644
> --- usr.sbin/vmd/vmd.h
> +++ usr.sbin/vmd/vmd.h
> @@ -53,6 +53,7 @@
>  /* vmd -> vmctl error codes */
>  #define VMD_BIOS_MISSING 1001
>  #define VMD_DISK_MISSING 1002
> +#define VMD_DISK_INVALID 1003
>  
>  /* 100.64.0.0/10 from rfc6598 (IPv4 Prefix for Shared Address Space) */
>  #define VMD_DHCP_PREFIX  "100.64.0.0/10"
> -- 
> 2.14.1
> 

-- 
Raf Czlonka
Support Systems Analyst
Clinical School Computing Service, School of Clinical Medicine
University of Cambridge, Box 111 Cambridge Biomedical Campus
Cambridge, CB2 0SP, Tel. 01223 (7)46728



Re: [PATCH] usr.sbin/ldapd/ldapd.conf.5 - Macros can be defined...

2017-08-29 Thread Raf Czlonka
Hi Jason,

That's what I wasn't sure about - haven't seen many "that" used in
that way ;^)

Thanks for the explanation.

Raf

On Tue, Aug 29, 2017 at 09:35:25PM BST, Jason McIntyre wrote:
> On Tue, Aug 29, 2017 at 09:22:30PM +0100, Raf Czlonka wrote:
> > Hi all,
> > 
> > Not entirely sure what the author had in mind but the current
> > sentence, as it is, doesn't seem right somehow.
> > 
> > The below is my best guess.
> > 
> > Cheers,
> > 
> > Raf
> > 
> 
> hi.
> 
> what's there is fine. it is a common text blurb in many similar pages.
> i'm not sure how to explain it grammatically, but in this context "that"
> is just a way of pointing back to "macros".
> 
> so it would probably be nicer to say:
> 
>   Macros can be defined, which will later be expanded in context.
> 
> relative pronouns...? "that" is a sloppy catch all, but it is valid.
> 
> jmc
> 
> > Index: usr.sbin/ldapd/ldapd.conf.5
> > ===
> > RCS file: /cvs/src/usr.sbin/ldapd/ldapd.conf.5,v
> > retrieving revision 1.22
> > diff -u -p -r1.22 ldapd.conf.5
> > --- usr.sbin/ldapd/ldapd.conf.5 17 Oct 2016 14:03:17 -  1.22
> > +++ usr.sbin/ldapd/ldapd.conf.5 29 Aug 2017 20:18:33 -
> > @@ -41,7 +41,7 @@ must be quoted.
> >  Arguments containing whitespace should be surrounded by double quotes
> >  .Pq \&" .
> >  .Pp
> > -Macros can be defined that will later be expanded in context.
> > +Macros can be defined and will later be expanded in context.
> >  Macro names must start with a letter, digit, or underscore,
> >  and may contain any of those characters.
> >  Macro names may not be reserved words (for example
> > 
> 



[PATCH] usr.sbin/ldapd/ldapd.conf.5 - Macros can be defined...

2017-08-29 Thread Raf Czlonka
Hi all,

Not entirely sure what the author had in mind but the current
sentence, as it is, doesn't seem right somehow.

The below is my best guess.

Cheers,

Raf

Index: usr.sbin/ldapd/ldapd.conf.5
===
RCS file: /cvs/src/usr.sbin/ldapd/ldapd.conf.5,v
retrieving revision 1.22
diff -u -p -r1.22 ldapd.conf.5
--- usr.sbin/ldapd/ldapd.conf.5 17 Oct 2016 14:03:17 -  1.22
+++ usr.sbin/ldapd/ldapd.conf.5 29 Aug 2017 20:18:33 -
@@ -41,7 +41,7 @@ must be quoted.
 Arguments containing whitespace should be surrounded by double quotes
 .Pq \&" .
 .Pp
-Macros can be defined that will later be expanded in context.
+Macros can be defined and will later be expanded in context.
 Macro names must start with a letter, digit, or underscore,
 and may contain any of those characters.
 Macro names may not be reserved words (for example



[PATCH] usr.sbin/ypldap/ypldap.8 - incomplete sentence(?)

2017-08-29 Thread Raf Czlonka
Hi all,

Not entirely sure whether the current sentence is correct but it
seems a bit incomplete.

Looks like job for jmc! ;^)

Cheers,

Raf

Index: usr.sbin/ypldap/ypldap.8
===
RCS file: /cvs/src/usr.sbin/ypldap/ypldap.8,v
retrieving revision 1.10
diff -u -p -r1.10 ypldap.8
--- usr.sbin/ypldap/ypldap.827 Jul 2015 17:28:40 -  1.10
+++ usr.sbin/ypldap/ypldap.829 Aug 2017 19:53:46 -
@@ -32,7 +32,7 @@ RFC 2307 or similar LDAP schemas can be 
 .Nm
 has the same role as
 .Xr ypserv 8
-and the two daemons are exclusive.
+and the two daemons are mutually exclusive.
 .Pp
 The options are as follows:
 .Bl -tag -width Ds



Re: [PATCH] etc/ksh.kshrc - unify command substitution

2017-08-29 Thread Raf Czlonka
Ping.

Anyone?

On Sun, Jul 16, 2017 at 01:43:32PM BST, Raf Czlonka wrote:
> Hi all,
> 
> Further simplification - 'ps | grep' can be replaced by pgrep(1)
> and if-then-fi by &&.
> 
> > While there:
> > 
> > - remove ':' (null utility) from the very first line of the file -
> >   I *do* understand what it does but it doesn't seem like it's needed
> >   at all, unless I'm missing something (as is the case with some idioms)
> > [...]
> > 
> 
> As it transpired, this does indeed seem to be an old idiom denoting
> a Bourne shell script.
> 
> To quote rpe@: "I guess it's fine to remove the : line in 2017."
> 
> I agree.
> 
> Thanks again to Robert for all the feedback and suggestions.
> 
> Regards,
> 
> Raf
> 
> Index: etc/ksh.kshrc
> ===
> RCS file: /cvs/src/etc/ksh.kshrc,v
> retrieving revision 1.28
> diff -u -p -r1.28 ksh.kshrc
> --- etc/ksh.kshrc 15 Jul 2017 07:11:42 -  1.28
> +++ etc/ksh.kshrc 16 Jul 2017 11:49:55 -
> @@ -1,4 +1,3 @@
> -:
>  #$OpenBSD: ksh.kshrc,v 1.28 2017/07/15 07:11:42 tb Exp $
>  #
>  # NAME:
> @@ -74,9 +73,7 @@ case "$-" in
>   xterm*)
>   ILS='\033]1;'; ILE='\007'
>   WLS='\033]2;'; WLE='\007'
> - if ps -p $PPID -o command | grep -q telnet; then
> - export TERM=xterms
> - fi
> + pgrep -qxs $PPID telnet && export TERM=xterms
>   ;;
>   *)  ;;
>   esac



Re: [PATCH] etc/ksh.kshrc - unify command substitution

2017-07-16 Thread Raf Czlonka
Hi all,

Further simplification - 'ps | grep' can be replaced by pgrep(1)
and if-then-fi by &&.

> While there:
> 
> - remove ':' (null utility) from the very first line of the file -
>   I *do* understand what it does but it doesn't seem like it's needed
>   at all, unless I'm missing something (as is the case with some idioms)
> [...]
> 

As it transpired, this does indeed seem to be an old idiom denoting
a Bourne shell script.

To quote rpe@: "I guess it's fine to remove the : line in 2017."

I agree.

Thanks again to Robert for all the feedback and suggestions.

Regards,

Raf

Index: etc/ksh.kshrc
===
RCS file: /cvs/src/etc/ksh.kshrc,v
retrieving revision 1.28
diff -u -p -r1.28 ksh.kshrc
--- etc/ksh.kshrc   15 Jul 2017 07:11:42 -  1.28
+++ etc/ksh.kshrc   16 Jul 2017 11:49:55 -
@@ -1,4 +1,3 @@
-:
 #  $OpenBSD: ksh.kshrc,v 1.28 2017/07/15 07:11:42 tb Exp $
 #
 # NAME:
@@ -74,9 +73,7 @@ case "$-" in
xterm*)
ILS='\033]1;'; ILE='\007'
WLS='\033]2;'; WLE='\007'
-   if ps -p $PPID -o command | grep -q telnet; then
-   export TERM=xterms
-   fi
+   pgrep -qxs $PPID telnet && export TERM=xterms
;;
*)  ;;
esac



Re: [PATCH] etc/ksh.kshrc - unify command substitution

2017-07-14 Thread Raf Czlonka
On Fri, Jul 07, 2017 at 05:47:46AM BST, Raf Czlonka wrote:
> Hi all,
> 
> I've noticed that etc/ksh.kshrc uses both types of command substitution
> `command` and $(command). The below diff unifies it and uses
> $(command) notation consistently.
> 
> While there, [...] remove basename(1) invocation and use parameter
> expansion instead.
> [...]
> 

Hi all,

Take two - only the above. Already got OKs from rpe@ so, if there
are no objections, would someone be so kind as to committing it,
please? :^)

Cheers,

Raf

Index: etc/ksh.kshrc
===
RCS file: /cvs/src/etc/ksh.kshrc,v
retrieving revision 1.27
diff -u -p -r1.27 ksh.kshrc
--- etc/ksh.kshrc   14 Sep 2016 18:34:51 -  1.27
+++ etc/ksh.kshrc   15 Jul 2017 05:45:01 -
@@ -39,7 +39,7 @@ case "$-" in
0) PS1S='# ';;
esac
PS1S=${PS1S:-'$ '}
-   HOSTNAME=${HOSTNAME:-`uname -n`}
+   HOSTNAME=${HOSTNAME:-$(uname -n)}
HOST=${HOSTNAME%%.*}
 
PROMPT="$USER:!$PS1S"
@@ -49,8 +49,8 @@ case "$-" in
PS1=$PPROMPT
# $TTY is the tty we logged in on,
# $tty is that which we are in now (might by pty)
-   tty=`tty`
-   tty=`basename $tty`
+   tty=$(tty)
+   tty=${tty##*/}
TTY=${TTY:-$tty}
# $console is the system console device
console=$(sysctl kern.consdev)
@@ -117,7 +117,7 @@ case "$-" in
alias o='fg %-'
alias df='df -k'
alias du='du -k'
-   alias rsize='eval `resize`'
+   alias rsize='eval $(resize)'
 ;;
 *) # non-interactive
 ;;
@@ -142,6 +142,6 @@ function pre_path {
 }
 # if $1 is in path, remove it
 function del_path {
-   no_path $* || eval ${2:-PATH}=`eval echo :'$'${2:-PATH}: |
-   sed -e "s;:$1:;:;g" -e "s;^:;;" -e "s;:\$;;"`
+   no_path $* || eval ${2:-PATH}=$(eval echo :'$'${2:-PATH}: |
+   sed -e "s;:$1:;:;g" -e "s;^:;;" -e "s;:\$;;")
 }



Re: [PATCH] etc/ksh.kshrc - unify command substitution

2017-07-10 Thread Raf Czlonka
On Mon, Jul 10, 2017 at 06:48:25PM BST, Robert Peichaer wrote:
> On Fri, Jul 07, 2017 at 05:47:46AM +0100, Raf Czlonka wrote:
> > Hi all,
> > 
> > I've noticed that etc/ksh.kshrc uses both types of command substitution
> > `command` and $(command). The below diff unifies it and uses
> > $(command) notation consistently.
> > 
> > While there:
> > 
> > - remove ':' (null utility) from the very first line of the file -
> >   I *do* understand what it does but it doesn't seem like it's needed
> >   at all, unless I'm missing something (as is the case with some idioms)
> > - remove basename(1) invocation and use parameter expansion instead
> > - simplify one if conditional by replacing it with && and grouping
> >   commands
> 
> Having sent a lot of similar diffs myself, I recommend to only change
> one thing in a diff and not to mix stuff. Better send two diffs with one
> type of change each than one diff with multiple.

Hi Robert,

Thanks for the feedback and OKs.

The other changes seemed like too small a ones to warrant separate diffs.

> > Regards,
> > 
> > Raf
> > 
> > Index: etc/ksh.kshrc
> > ===
> > RCS file: /cvs/src/etc/ksh.kshrc,v
> > retrieving revision 1.27
> > diff -u -p -u -r1.27 ksh.kshrc
> > --- etc/ksh.kshrc   14 Sep 2016 18:34:51 -  1.27
> > +++ etc/ksh.kshrc   7 Jul 2017 04:38:58 -
> > @@ -1,4 +1,3 @@
> > -:
> >  #  $OpenBSD: ksh.kshrc,v 1.27 2016/09/14 18:34:51 rpe Exp $
> >  #
> >  # NAME:
> > @@ -39,7 +38,7 @@ case "$-" in
> > 0) PS1S='# ';;
> > esac
> > PS1S=${PS1S:-'$ '}
> > -   HOSTNAME=${HOSTNAME:-`uname -n`}
> > +   HOSTNAME=${HOSTNAME:-$(uname -n)}
> 
> OK
> 
> > HOST=${HOSTNAME%%.*}
> >  
> > PROMPT="$USER:!$PS1S"
> > @@ -49,8 +48,8 @@ case "$-" in
> > PS1=$PPROMPT
> > # $TTY is the tty we logged in on,
> > # $tty is that which we are in now (might by pty)
> > -   tty=`tty`
> > -   tty=`basename $tty`
> > +   tty=$(tty)
> > +   tty=${tty##*/}
> 
> OK
> 
> > TTY=${TTY:-$tty}
> > # $console is the system console device
> > console=$(sysctl kern.consdev)
> > @@ -74,9 +73,8 @@ case "$-" in
> > xterm*)
> > ILS='\033]1;'; ILE='\007'
> > WLS='\033]2;'; WLE='\007'
> > -   if ps -p $PPID -o command | grep -q telnet; then
> > +   { ps -p $PPID -o command | grep -q telnet; } &&
> > export TERM=xterms
> > -   fi
> 
> If at all this would be
> 
>   ps -p $PPID -o command | grep -q telnet &&
>   export TERM=xterms
> 
> But I doubt this is any improvement compared to if-then-else.
> In contrast to the installer script, there is no need for a
> terse shell scripting style.

I "automatically" grouped them as to ensure the exit code of the
whole sequence rather than the last command - obviously here I've
done it unnecessarily.

While I tried to remove if-then-fi (I only ever try doing this if there
is no *else*) I could not see the wood for the trees - the above
*can* actually be improved using pgrep(1):

pgrep -P $PPID -q telnet && export TERM=xterms

We not only got rid of if-then-fi, but there's also one process less.

That's surely an improvement! :^)

> > ;;
> > *)  ;;
> > esac
> > @@ -117,7 +115,7 @@ case "$-" in
> > alias o='fg %-'
> > alias df='df -k'
> > alias du='du -k'
> > -   alias rsize='eval `resize`'
> > +   alias rsize='eval $(resize)'
> 
> OK
> 
> >  ;;
> >  *) # non-interactive
> >  ;;
> > @@ -142,6 +140,6 @@ function pre_path {
> >  }
> >  # if $1 is in path, remove it
> >  function del_path {
> > -   no_path $* || eval ${2:-PATH}=`eval echo :'$'${2:-PATH}: |
> > -   sed -e "s;:$1:;:;g" -e "s;^:;;" -e "s;:\$;;"`
> > +   no_path $* || eval ${2:-PATH}=$(eval echo :'$'${2:-PATH}: |
> > +   sed -e "s;:$1:;:;g" -e "s;^:;;" -e "s;:\$;;")
> 
> OK
> 
> >  }
> > 
> 
> -- 
> -=[rpe]=-

Best regards,

Raf



Re: [PATCH] etc/daily - handle purging accounting records a bit better

2017-07-10 Thread Raf Czlonka
On Mon, Jul 10, 2017 at 03:00:04PM BST, Alexander Bluhm wrote:
> On Mon, Jul 10, 2017 at 02:19:45PM +0100, Raf Czlonka wrote:
> > AFAIK, the '\' is optional with a final &&, ||, etc. no?
> 
> Yes, but other lines have it, too.  I wanted to be consistent.

Right, I see. Consistency is good - I like consistency :^)

R



Re: [PATCH] etc/daily - handle purging accounting records a bit better

2017-07-10 Thread Raf Czlonka
On Mon, Jul 10, 2017 at 12:20:54PM BST, Alexander Bluhm wrote:
> On Sun, Jul 09, 2017 at 10:53:34AM +0100, Raf Czlonka wrote:
> > I've enabled accounting recently and have noticed these messages
> > in the daily(8) email:
> 
> I have also noticed this, but ignored the problem after three days :-)

So did I... initially ;^)

> > These could be silenced by a simply testing if a particular file
> > exists before trying to rename it.
> 
> I have commited your patch with an additional \ for long line
> continuation.

AFAIK, the '\' is optional with a final &&, ||, etc. no?

> Thanks,
> 
> bluhm

Cheers,

Raf



[PATCH] etc/daily - handle purging accounting records a bit better

2017-07-09 Thread Raf Czlonka
Hi all,

I've enabled accounting recently and have noticed these messages
in the daily(8) email:

Day 1:

Purging accounting records:
mv: /var/account/acct.2: No such file or directory
mv: /var/account/acct.1: No such file or directory
mv: /var/account/acct.0: No such file or directory

Day 2:

Purging accounting records:
mv: /var/account/acct.2: No such file or directory
mv: /var/account/acct.1: No such file or directory

Day 3:

Purging accounting records:
mv: /var/account/acct.2: No such file or directory

These could be silenced by a simply testing if a particular file
exists before trying to rename it.

Regards,

Raf

Index: etc/daily
===
RCS file: /cvs/src/etc/daily,v
retrieving revision 1.89
diff -u -p -r1.89 daily
--- etc/daily   10 Jun 2017 11:28:30 -  1.89
+++ etc/daily   9 Jul 2017 09:46:30 -
@@ -66,9 +66,12 @@ fi
 
 next_part "Purging accounting records:"
 if [ -f /var/account/acct ]; then
-   mv -f /var/account/acct.2 /var/account/acct.3
-   mv -f /var/account/acct.1 /var/account/acct.2
-   mv -f /var/account/acct.0 /var/account/acct.1
+   test -f /var/account/acct.2 &&
+   mv -f /var/account/acct.2 /var/account/acct.3
+   test -f /var/account/acct.1 &&
+   mv -f /var/account/acct.1 /var/account/acct.2
+   test -f /var/account/acct.0 &&
+   mv -f /var/account/acct.0 /var/account/acct.1
cp -f /var/account/acct /var/account/acct.0
sa -sq
lastcomm -f /var/account/acct.0 | grep -e ' -[A-Z]*[PT]'



[PATCH] etc/ksh.kshrc - unify command substitution

2017-07-06 Thread Raf Czlonka
Hi all,

I've noticed that etc/ksh.kshrc uses both types of command substitution
`command` and $(command). The below diff unifies it and uses
$(command) notation consistently.

While there:

- remove ':' (null utility) from the very first line of the file -
  I *do* understand what it does but it doesn't seem like it's needed
  at all, unless I'm missing something (as is the case with some idioms)
- remove basename(1) invocation and use parameter expansion instead
- simplify one if conditional by replacing it with && and grouping
  commands

Regards,

Raf

Index: etc/ksh.kshrc
===
RCS file: /cvs/src/etc/ksh.kshrc,v
retrieving revision 1.27
diff -u -p -u -r1.27 ksh.kshrc
--- etc/ksh.kshrc   14 Sep 2016 18:34:51 -  1.27
+++ etc/ksh.kshrc   7 Jul 2017 04:38:58 -
@@ -1,4 +1,3 @@
-:
 #  $OpenBSD: ksh.kshrc,v 1.27 2016/09/14 18:34:51 rpe Exp $
 #
 # NAME:
@@ -39,7 +38,7 @@ case "$-" in
0) PS1S='# ';;
esac
PS1S=${PS1S:-'$ '}
-   HOSTNAME=${HOSTNAME:-`uname -n`}
+   HOSTNAME=${HOSTNAME:-$(uname -n)}
HOST=${HOSTNAME%%.*}
 
PROMPT="$USER:!$PS1S"
@@ -49,8 +48,8 @@ case "$-" in
PS1=$PPROMPT
# $TTY is the tty we logged in on,
# $tty is that which we are in now (might by pty)
-   tty=`tty`
-   tty=`basename $tty`
+   tty=$(tty)
+   tty=${tty##*/}
TTY=${TTY:-$tty}
# $console is the system console device
console=$(sysctl kern.consdev)
@@ -74,9 +73,8 @@ case "$-" in
xterm*)
ILS='\033]1;'; ILE='\007'
WLS='\033]2;'; WLE='\007'
-   if ps -p $PPID -o command | grep -q telnet; then
+   { ps -p $PPID -o command | grep -q telnet; } &&
export TERM=xterms
-   fi
;;
*)  ;;
esac
@@ -117,7 +115,7 @@ case "$-" in
alias o='fg %-'
alias df='df -k'
alias du='du -k'
-   alias rsize='eval `resize`'
+   alias rsize='eval $(resize)'
 ;;
 *) # non-interactive
 ;;
@@ -142,6 +140,6 @@ function pre_path {
 }
 # if $1 is in path, remove it
 function del_path {
-   no_path $* || eval ${2:-PATH}=`eval echo :'$'${2:-PATH}: |
-   sed -e "s;:$1:;:;g" -e "s;^:;;" -e "s;:\$;;"`
+   no_path $* || eval ${2:-PATH}=$(eval echo :'$'${2:-PATH}: |
+   sed -e "s;:$1:;:;g" -e "s;^:;;" -e "s;:\$;;")
 }



[PATCH] clarify history of htpasswd(1) in its manpage

2017-07-06 Thread Raf Czlonka
Hi all,

Just gone through htpasswd(1)'s man page and noticed this in the AUTHORS 
section:

Florian Obser  implemented htpasswd from scratch
after httpd was removed from OpenBSD base. 

To those not familiar with OpenBSD's release history, this may seem
wrong (after all, httpd *is* in base) or misleading at the very least.

What do you think about clarifying it ever so slightly?

Regards,

Raf

Index: usr.bin/htpasswd/htpasswd.1
===
RCS file: /cvs/src/usr.bin/htpasswd/htpasswd.1,v
retrieving revision 1.7
diff -u -p -r1.7 htpasswd.1
--- usr.bin/htpasswd/htpasswd.1 26 Aug 2014 21:50:38 -  1.7
+++ usr.bin/htpasswd/htpasswd.1 7 Jul 2017 02:24:05 -
@@ -69,6 +69,6 @@ has been available since
 .An Florian Obser Aq Mt flor...@openbsd.org
 implemented
 .Nm
-from scratch after httpd was removed from
+from scratch after Apache httpd was removed from
 .Ox
 base.



Re: [bgpd] RFC 7607 Codification of AS 0 Processing

2017-05-26 Thread Raf Czlonka
On Fri, May 26, 2017 at 07:24:06PM BST, Claudio Jeker wrote:
> On Fri, May 26, 2017 at 08:01:00PM +0200, Peter Hessler wrote:
> > Apropos of "I found it", I implemented support for RFC 7607.  It's a
> > super short RFC, but basically it forbids use of AS 0 anywhere.
> > 
> > OK?
> > 
> > 
> > Index: parse.y
> > ===
> > RCS file: /cvs/openbsd/src/usr.sbin/bgpd/parse.y,v
> > retrieving revision 1.300
> > diff -u -p -u -p -r1.300 parse.y
> > --- parse.y 26 May 2017 14:08:51 -  1.300
> > +++ parse.y 26 May 2017 17:55:11 -
> > @@ -3661,6 +3661,11 @@ neighbor_consistent(struct peer *p)
> > return (-1);
> > }
> >  
> > +   if (p->conf.remote_as == 0) {
> > +   yyerror("peer AS needs to be not zero");
> 
> Needs better wording.

My exact thought... not that I have any say in it :^)

To be more specific: "needs to be not" simply sounds odd.

Regards,

Raf

> 
> > +   return (-1);
> > +   }
> > +
> > /* set default values if they where undefined */
> > p->conf.ebgp = (p->conf.remote_as != conf->as);
> > if (p->conf.announce_type == ANNOUNCE_UNDEF)
> > Index: rde.c
> > ===
> > RCS file: /cvs/openbsd/src/usr.sbin/bgpd/rde.c,v
> > retrieving revision 1.361
> > diff -u -p -u -p -r1.361 rde.c
> > --- rde.c   25 Jan 2017 03:21:55 -  1.361
> > +++ rde.c   26 May 2017 17:43:30 -
> > @@ -1102,6 +1102,14 @@ rde_update_dispatch(struct imsg *imsg)
> > /* shift to NLRI information */
> > p += 2 + attrpath_len;
> >  
> > +   /* aspath must not contain AS 0 */
> > +   if (!aspath_loopfree(asp->aspath, 0)) {
> > +   log_peer_warnx(>conf, "bad AS 0 in UPDATE");
> > +   rde_update_err(peer, ERR_UPDATE, ERR_UPD_ASPATH,
> > +   NULL, 0);
> 
> This can't be right. We should not cause a NOTIFICATION and session reset
> because of this. Doing that is bad bad bad.
> 
> > +   goto done;
> > +   }
> > +
> > /* aspath needs to be loop free nota bene this is not a hard error */
> > if (peer->conf.ebgp && !aspath_loopfree(asp->aspath, conf->as))
> > asp->flags |= F_ATTR_LOOP;
> > Index: session.c
> > ===
> > RCS file: /cvs/openbsd/src/usr.sbin/bgpd/session.c,v
> > retrieving revision 1.359
> > diff -u -p -u -p -r1.359 session.c
> > --- session.c   13 Feb 2017 14:48:44 -  1.359
> > +++ session.c   5 May 2017 17:26:16 -
> > @@ -2017,6 +2017,14 @@ parse_open(struct peer *peer)
> > memcpy(_as, p, sizeof(short_as));
> > p += sizeof(short_as);
> > as = peer->short_as = ntohs(short_as);
> > +   if (as == 0) {
> > +   log_peer_warnx(>conf,
> > +   "peer requests unacceptable AS %u", as);
> 
> Why not use 0 here instaed of %u?
> 
> > +   session_notification(peer, ERR_OPEN, ERR_OPEN_AS,
> > +   NULL, 0);
> > +   change_state(peer, STATE_IDLE, EVNT_RCVD_OPEN);
> > +   return (-1);
> > +   }
> >  
> > memcpy(, p, sizeof(oholdtime));
> > p += sizeof(oholdtime);
> > @@ -2477,6 +2485,14 @@ parse_capabilities(struct peer *peer, u_
> > }
> > memcpy(_as, capa_val, sizeof(remote_as));
> > *as = ntohl(remote_as);
> > +   if (*as == 0) {
> > +   log_peer_warnx(>conf,
> > +   "peer requests unacceptable AS %u", *as);
> 
> Same here.
> 
> > +   session_notification(peer, ERR_OPEN, 
> > ERR_OPEN_AS,
> > +   NULL, 0);
> > +   change_state(peer, STATE_IDLE, EVNT_RCVD_OPEN);
> > +   return (-1);
> > +   }
> > peer->capa.peer.as4byte = 1;
> > break;
> > default:
> > 
> > 
> > -- 
> > Taxes, n.:
> > Of life's two certainties, the only one for which you can get
> > an extension.
> > 
> 
> -- 
> :wq Claudio
> 



acme-client(1) -vD output - double slash ('//') in PEM file paths

2017-05-19 Thread Raf Czlonka
Hi all,

A minor thing - I'm not sure it warrants an email to bugs@

Something I had noticed only today:

# acme-client -vD domain.org
[...]
acme-client: /etc/ssl//domain.org.chain.pem: created
acme-client: /etc/ssl/domain.org.crt: created
acme-client: /etc/ssl//domain.org.fullchain.pem: created

Please notice the double slash ('//') in chain and fullchain.

Before you ask, yes my config file does *not* contain those :^)

Regards,

Raf



[PATCH] typo in src/bin/ksh/README

2017-05-11 Thread Raf Czlonka
Hi all,

I've got a small diff which fixes a typo in the README file.

While there, I have removed a hyphen from "PD-ksh" as it does not
appear in any of the other files.

Also, the first line has been changed on purpose to highlight the
fact that BOM[0] had been introduced here, most likely by accident,
in version 1.12 of the file[1].

[0] https://en.wikipedia.org/wiki/Byte_order_mark
[1] 
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/bin/ksh/README.diff?r1=1.11=1.12=h

Regards,

Raf

Index: bin/ksh/README
===
RCS file: /cvs/src/bin/ksh/README,v
retrieving revision 1.15
diff -u -p -r1.15 README
--- bin/ksh/README  5 Dec 2015 19:40:45 -   1.15
+++ bin/ksh/README  11 May 2017 16:00:03 -
@@ -1,13 +1,13 @@
-$OpenBSD: README,v 1.15 2015/12/05 19:40:45 mmcc Exp $
+$OpenBSD: README,v 1.15 2015/12/05 19:40:45 mmcc Exp $
 
 Last updated Jul '99 for pdksh-5.2.14.
 
-PD-ksh is a mostly complete AT ksh look-alike (see NOTES file for a list
+PDksh is a mostly complete AT ksh look-alike (see NOTES file for a list
 of things not supported).  Work is mostly finished to make it fully
 compatible with both POSIX and AT ksh (when the two don't conflict).
 
 PDksh was being maintained by Michael Rendell (mich...@cs.mun.ca),
-who took over from Simon J. Gerraty (s...@zen.void.oz.au) at the later's
+who took over from Simon J. Gerraty (s...@zen.void.oz.au) at the latter's
 suggestion.
 
 Files of interest:



roff(7) man page not rendering properly in its entirety on man.openbsd.org

2017-03-16 Thread Raf Czlonka
Hi all,

While looking at several manual pages on man.openbsd.org, I've
noticed that roff(7) man page does not render properly in its
entirety, i.e.:

- http://man.openbsd.org/roff

ends with:

"equal to, same effect as == (this differs from C)<"

- http://man.openbsd.org/roff.7

ends with:

"equal to, same effect as == (t"

while,

- http://man.openbsd.org/OpenBSD-current/man7/roff.7

with:

"equal to, same effect as == (this d"

The rendering is consistent across multiple devices.

Similar issues are seen with 6.0 version of the man page.

No idea what might be causing the issue, I'm afraid.

Regards,

Raf



special sequences %a, %c, %m, %v in PKG_PATH [Was: Re: Fix broken example link in packages.7]

2017-03-11 Thread Raf Czlonka
Hi all,

Ping.

How about something like this?

Recreated verbatim from pkg.conf.5:

Index: usr.sbin/pkg_add/pkg_add.1
===
RCS file: /cvs/src/usr.sbin/pkg_add/pkg_add.1,v
retrieving revision 1.142
diff -u -p -r1.142 pkg_add.1
--- usr.sbin/pkg_add/pkg_add.1  27 Feb 2017 21:53:11 -  1.142
+++ usr.sbin/pkg_add/pkg_add.1  11 Mar 2017 08:37:35 -
@@ -225,7 +225,14 @@ All paths recognize special sequences
 .Sq %a ,
 .Sq %c ,
 .Sq %m ,
-.Sq %v .
+.Sq %v ,
+which will be expanded to
+.Sq package architecture ,
+.Sq OS version or snapshots ,
+.Sq full mirror path
+and
+.Sq OS version
+respectively.
 .Pp
 The following examples are valid:
 .Bd -literal -offset indent


On Thu, Mar 02, 2017 at 09:20:20AM GMT, Raf Czlonka wrote:
> On Wed, Mar 01, 2017 at 10:39:08PM GMT, Frederic Cambus wrote:
> > On Tue, Feb 28, 2017 at 09:14:49PM +, Stuart Henderson wrote:
> > > On 2017/02/28 20:28, Frederic Cambus wrote:
> > > > Hi tech@,
> > > > 
> > > > In packages.7, PKG_PATH points to a broken link. This diff fixes it.
> > > 
> > > https is going to be horrible for pkg_add -u...
> > 
> > Following tj@ and sthen@ suggestions, use %c and %a instead of
> > hardcoding strings, and switch to http instead of https.
> 
> Hi all,
> 
> There's a small issue with the special sequences %a, %c, %m and %v.
> With the removal of pkg.conf(5), these are only mentioned in
> pkg_add(1) but it is not explained what they actually mean.
> 
> They're still going to be supported in the next release I take it?
> 
> Regards,
> 
> Raf
> 
> > Index: share/man/man7/packages.7
> > ===
> > RCS file: /cvs/src/share/man/man7/packages.7,v
> > retrieving revision 1.40
> > diff -u -p -r1.40 packages.7
> > --- share/man/man7/packages.7   24 Oct 2015 08:44:49 -  1.40
> > +++ share/man/man7/packages.7   1 Mar 2017 14:28:07 -
> > @@ -240,7 +240,7 @@ are supported: pointing
> >  .Ev PKG_PATH
> >  to a distant package repository, e.g.,
> >  .Bd -literal -offset 1n
> > -# export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/5.2/packages/i386/
> > +# export PKG_PATH=http://ftp.openbsd.org/pub/OpenBSD/%c/packages/%a/
> >  .Ed
> >  .Pp
> >  will let
> > 



Re: Fix broken example link in packages.7

2017-03-02 Thread Raf Czlonka
On Wed, Mar 01, 2017 at 10:39:08PM GMT, Frederic Cambus wrote:
> On Tue, Feb 28, 2017 at 09:14:49PM +, Stuart Henderson wrote:
> > On 2017/02/28 20:28, Frederic Cambus wrote:
> > > Hi tech@,
> > > 
> > > In packages.7, PKG_PATH points to a broken link. This diff fixes it.
> > 
> > https is going to be horrible for pkg_add -u...
> 
> Following tj@ and sthen@ suggestions, use %c and %a instead of
> hardcoding strings, and switch to http instead of https.

Hi all,

There's a small issue with the special sequences %a, %c, %m and %v.
With the removal of pkg.conf(5), these are only mentioned in
pkg_add(1) but it is not explained what they actually mean.

They're still going to be supported in the next release I take it?

Regards,

Raf

> Index: share/man/man7/packages.7
> ===
> RCS file: /cvs/src/share/man/man7/packages.7,v
> retrieving revision 1.40
> diff -u -p -r1.40 packages.7
> --- share/man/man7/packages.7 24 Oct 2015 08:44:49 -  1.40
> +++ share/man/man7/packages.7 1 Mar 2017 14:28:07 -
> @@ -240,7 +240,7 @@ are supported: pointing
>  .Ev PKG_PATH
>  to a distant package repository, e.g.,
>  .Bd -literal -offset 1n
> -# export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/5.2/packages/i386/
> +# export PKG_PATH=http://ftp.openbsd.org/pub/OpenBSD/%c/packages/%a/
>  .Ed
>  .Pp
>  will let
> 



Re: Password corruption in adduser

2017-02-06 Thread Raf Czlonka
Hi all,

How about doing it throughout the tree[0]?

[0] http://marc.info/?m=142689311221135

Cheers,

Raf

On Mon, Feb 06, 2017 at 05:53:22AM GMT, Theo Buehler wrote:
> On Sun, Feb 05, 2017 at 09:47:35PM -0800, Philip Guenther wrote:
> > On Sun, 5 Feb 2017, John McGuigan wrote:
> > > I've noticed something strange in adduser -- when attempting to add a 
> > > user completely though command line argument it seems to corrupt the 
> > > entry in /etc/master.passwd.
> > > 
> > > Example:
> > > 
> > > $ echo "HorseBatteryStaple" | encrypt
> > > $2b$09$ssZSLC6laHsTS7O2FwJ4Mufw6mSS/FGXw.9oNjr3BLTS7DJp5n4M2
> > > 
> > > # adduser -silent -noconfig -uid_start 5000 -group USER -shell ksh \
> > > -message no -batch some.user "" "Some User" \
> > > $2b$09$ssZSLC6laHsTS7O2FwJ4Mufw6mSS/FGXw.9oNjr3BLTS7DJp5n4M2
> > > Added user ``some.user''
> > ...
> > > some.user:b/bin/ksh9/9uoOrbTRaf//3ZprAb9k.hOpfe9vYVqjf1a:5000:5000:: \
> > > 0:0:Some User:/home/some.user:/bin/ksh
> > > 
> > > As you can see the password entry gets corrupted with a 'b/bin/ksh...'
> > 
> > Let's see what the adduser command is seeing by passing that all to 'echo' 
> > instead:
> > 
> > # echo \
> > > adduser -silent -noconfig -uid_start 5000 -group USER -shell ksh \
> > > -message no -batch some.user "" "Some User" \
> > > $2b$09$ssZSLC6laHsTS7O2FwJ4Mufw6mSS/FGXw.9oNjr3BLTS7DJp5n4M2
> > adduser -silent -noconfig -uid_start 5000 -group USER -shell ksh -message 
> > no -batch some.user  Some User b/bin/ksh9/FGXw.9oNjr3BLTS7DJp5n4M2
> > #
> > 
> > Ah, so the expansion is happening *outside* of adduser...in the shell.  
> > Yes, the shell does variable expansion even if the dollar-sign is in the 
> > middle of a word, so it's expanding the variables
> > $2  --> ""
> > $0  --> "/bin/ksh"
> > $ssZSLC6laHsTS7O2FwJ4Mufw6mSS   --> ""
> > 
> > 
> > > Behavior *is* present when hash is wrapped in "
> > 
> > Sure, because double-quotes only stop file-globbing and field splitting 
> > and not variable expansion.  You need single quotes for that:
> > 
> > # echo \
> > > adduser -silent -noconfig -uid_start 5000 -group USER -shell ksh \
> > > -message no -batch some.user "" "Some User" \
> > > '$2b$09$ssZSLC6laHsTS7O2FwJ4Mufw6mSS/FGXw.9oNjr3BLTS7DJp5n4M2'
> > adduser -silent -noconfig -uid_start 5000 -group USER -shell ksh -message 
> > no -batch some.user  Some User 
> > $2b$09$ssZSLC6laHsTS7O2FwJ4Mufw6mSS/FGXw.9oNjr3BLTS7DJp5n4M2
> > #
> 
> The adduser.8 manual page has an example with no quotes in it, so we
> should fix that.  Also, let's use a new hash using $2b$ instead of $2a$.
> 
> Index: adduser.8
> ===
> RCS file: /var/cvs/src/usr.sbin/adduser/adduser.8,v
> retrieving revision 1.44
> diff -u -p -r1.44 adduser.8
> --- adduser.8 24 Dec 2015 16:54:37 -  1.44
> +++ adduser.8 6 Feb 2017 05:49:00 -
> @@ -373,7 +373,7 @@ The password has been created using
>  .Xr encrypt 1 :
>  .Bd -literal -offset indent
>  # adduser -batch falken guest,staff,beer 'Prof. Falken' \e
> -$2a$06$1Sdjxjoxg4cNmT6zAxriGOLgdLXQ3HdJ2dKBbzEk68jSrO1EtLJ3C
> +'$2b$10$aOadQNznQ1YJFnqNaRRneOvYvZAEO7atYiTND3EsLf6afHT5t1UIK'
>  .Ed
>  .Pp
>  Create user
> 



Re: [WWW] Reverse chronological order for faq/current.html

2017-01-27 Thread Raf Czlonka
On Tue, Jan 24, 2017 at 10:29:30AM GMT, Theo de Raadt wrote:
> > On 2017/01/24 09:06, Raf Czlonka wrote:
> > > Another way to look at it is, "Let me have a look if there's anything
> > > new on faq/current.html - I open the page and, *without* moving
> > > forward, can see straight away if something new has been added.
> > 
> > Since we've been doing it the other way for 12 years, I think it would
> > likely cause confusion for existing users..
> 
> For Raf,
> 
> http://tinyurl.com/jakb5bb
> 

I was expecting that one. Still, made me chuckle :^)



Re: [WWW] Reverse chronological order for faq/current.html

2017-01-27 Thread Raf Czlonka
On Tue, Jan 24, 2017 at 01:13:03PM GMT, Nick Holland wrote:
> On 01/24/17 04:06, Raf Czlonka wrote:
> ...
> > Another way to look at it is, "Let me have a look if there's anything
> > new on faq/current.html - I open the page and, *without* moving
> > forward, can see straight away if something new has been added. No?
> > Then I move on with my life without scrolling down or doing anything
> > else apart from opening the page". Given OpenBSD's rapid development,
> > new entries on faq/current.html appear quite frequently - I'm only
> > thinking of the tiny amount of time saved each time.
> 
> What I think you are not thinking of is that in addition to being a list
> of things that have changed, it is also a list of changes that have to
> be done ... often IN PARTICULAR ORDER.
> 
> As it is, you read down until you hit where you are, then follow the
> instructions in order.  "more difficult" in your argument, but logical.
> 
> As you propose, you read down until you find where you are not, then
> change directions and read backwards.  That's not intuitive, normal, or
> reasonable to expect.  Most likely, your plan will have people making
> changes in reverse order...which may often work, but sometimes
> won't...and won't be the order the developers will be testing.

Hi Nick,

This is the most reasonable reply I have received thus far :^)

Thanks,

Raf



Re: [WWW] Reverse chronological order for faq/current.html

2017-01-27 Thread Raf Czlonka
On Tue, Jan 24, 2017 at 10:26:21AM GMT, Stuart Henderson wrote:
> On 2017/01/24 09:06, Raf Czlonka wrote:
> > Another way to look at it is, "Let me have a look if there's anything
> > new on faq/current.html - I open the page and, *without* moving
> > forward, can see straight away if something new has been added.
> 
> Since we've been doing it the other way for 12 years, I think it would
> likely cause confusion for existing users..

I've read somewhere that "We've always done it this way." is the
most dangerous phrase in the language :^)

I completely agree with the latter - every major change requires
re-education.

> > Then I move on with my life without scrolling down or doing anything
> > else apart from opening the page". Given OpenBSD's rapid development,
> > new entries on faq/current.html appear quite frequently - I'm only
> > thinking of the tiny amount of time saved each time.
> 
> If you're running current, I'd recommend keeping an eye on the
> source-changes list, then you'll already know if there's something new
> which affects you :-)
> 

I've been doing that for a long time but cannot always keep up with
the volume :^)

Cheers,

Raf



Re: [WWW] Reverse chronological order for faq/current.html

2017-01-27 Thread Raf Czlonka
On Tue, Jan 24, 2017 at 09:13:51AM GMT, STeve Andre' wrote:
> On 01/24/17 04:08, Theo de Raadt wrote:
> > > Another way to look at it is, "Let me have a look if there's anything
> > > new on faq/current.html - I open the page and, *without* moving
> > > forward, can see straight away if something new has been added. No?
> > > Then I move on with my life without scrolling down or doing anything
> > > else apart from opening the page". Given OpenBSD's rapid development,
> > > new entries on faq/current.html appear quite frequently - I'm only
> > > thinking of the tiny amount of time saved each time.
> > 
> > Yes clearly I'm not considering your valuable time.
> > 
> > 
> 
> Raf, think about the physical world.  When people add things to a list
> like a posting on a bulletin board, it goes at the end.  People just
> know to look at the end for anything new.  So it is online.  The effort
> to scroll down is pretty small.

STeve, I've already given an example where reverse chronology is
being used, another being CVS revision history, i.e. [0], so the
above isn't always true.

Regards,

Raf

[0] http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/Makefile



  1   2   >