Re: wg(4) manpage tweaks

2020-11-27 Thread Jason McIntyre
On Fri, Nov 27, 2020 at 02:28:42PM +, Stuart Henderson wrote:
> On 2020/11/27 14:17, Jason McIntyre wrote:
> > On Fri, Nov 27, 2020 at 02:09:57PM +, Stuart Henderson wrote:
> > > On 2020/11/27 13:41, Jason McIntyre wrote:
> > > > > +++ wg.4  27 Nov 2020 12:28:32 -
> > > > > @@ -64,6 +64,9 @@ interface may be configured to recognise
> > > > >  .It Key
> > > > >  Each peer uses its private key and corresponding public key to
> > > > >  identify itself to others.
> > > > > +The public key may be displayed by running
> > > > > +.Xr ifconfig 8
> > > > > +as root after configuring the private key.
> > > > >  A peer configures a
> > > > >  .Nm wg
> > > > >  interface with its own private key and with the public keys of its 
> > > > > peers.
> > > > 
> > > > i'm not sure about this text. wouldn;t the "Keys" section make more
> > > > sense? the "Keys" section itself says:
> > > > 
> > > >  When an interface has a private key set with wgkey, the
> > > >  corresponding public key is shown in the status output of
> > > >  the interface, like so:
> > > > 
> > > >wgpubkey NW5l2q2MArV5ZXpVXSZwBOyqhohOf8ImDgUB+jPtJps=
> > > > 
> > > > maybe we should just elaborate here?
> > > 
> > > Ah yes, that does seem a better place, maybe this helps, though
> > > perhaps the addition to the example script is enough to give the
> > > hint anyway.
> > > 
> > > Index: man4/wg.4
> > > ===
> > > RCS file: /cvs/src/share/man/man4/wg.4,v
> > > retrieving revision 1.7
> > > diff -u -p -r1.7 wg.4
> > > --- man4/wg.4 27 Nov 2020 14:04:49 -  1.7
> > > +++ man4/wg.4 27 Nov 2020 14:08:56 -
> > > @@ -124,7 +124,10 @@ will accept any random 32-byte base64 st
> > >  When an interface has a private key set with
> > >  .Nm wgkey ,
> > >  the corresponding
> > > -public key is shown in the status output of the interface, like so:
> > > +public key is shown in the status output of the interface
> > > +displayed by
> > > +.Xr ifconfig 8
> > > +when run as root, like so:
> > >  .Bd -literal -offset indent
> > >  wgpubkey NW5l2q2MArV5ZXpVXSZwBOyqhohOf8ImDgUB+jPtJps=
> > >  .Ed
> > > 
> > > 
> > 
> > fine by me. i tried to think if we had any precedent in the man pages
> > for this, where output is exposed by root, but couldn't. i thought our
> > wireless interfaces did sth like that.
> > 
> > i also tried to shorten your text but couldn;t come up with anything
> > better.
> > so ok.
> > jmc
> > 
> 
> Alternatively:
> 
> Index: wg.4
> ===
> RCS file: /cvs/src/share/man/man4/wg.4,v
> retrieving revision 1.7
> diff -u -p -r1.7 wg.4
> --- wg.4  27 Nov 2020 14:04:49 -  1.7
> +++ wg.4  27 Nov 2020 14:28:03 -
> @@ -125,8 +125,9 @@ When an interface has a private key set 
>  .Nm wgkey ,
>  the corresponding
>  public key is shown in the status output of the interface, like so:
> -.Bd -literal -offset indent
> -wgpubkey NW5l2q2MArV5ZXpVXSZwBOyqhohOf8ImDgUB+jPtJps=
> +.Bd -literal
> +# ifconfig wg1 | grep wgpubkey
> + wgpubkey NW5l2q2MArV5ZXpVXSZwBOyqhohOf8ImDgUB+jPtJps=
>  .Ed
>  .Sh EXAMPLES
>  Create two
> 

this is shorter (good), but less explicit about the need for root (less good).
i guess it's a trade off.

i think on balance i like the way you've done it here, but i'm fine
either way. i'd remove ", like so" though. also i don;t think you should
remove the indent - it would make the openssl example above it look
wonky.

jmc



Re: wg(4) manpage tweaks

2020-11-27 Thread Jason McIntyre
On Fri, Nov 27, 2020 at 02:09:57PM +, Stuart Henderson wrote:
> On 2020/11/27 13:41, Jason McIntyre wrote:
> > > +++ wg.4  27 Nov 2020 12:28:32 -
> > > @@ -64,6 +64,9 @@ interface may be configured to recognise
> > >  .It Key
> > >  Each peer uses its private key and corresponding public key to
> > >  identify itself to others.
> > > +The public key may be displayed by running
> > > +.Xr ifconfig 8
> > > +as root after configuring the private key.
> > >  A peer configures a
> > >  .Nm wg
> > >  interface with its own private key and with the public keys of its peers.
> > 
> > i'm not sure about this text. wouldn;t the "Keys" section make more
> > sense? the "Keys" section itself says:
> > 
> >  When an interface has a private key set with wgkey, the
> >  corresponding public key is shown in the status output of
> >  the interface, like so:
> > 
> >wgpubkey NW5l2q2MArV5ZXpVXSZwBOyqhohOf8ImDgUB+jPtJps=
> > 
> > maybe we should just elaborate here?
> 
> Ah yes, that does seem a better place, maybe this helps, though
> perhaps the addition to the example script is enough to give the
> hint anyway.
> 
> Index: man4/wg.4
> ===
> RCS file: /cvs/src/share/man/man4/wg.4,v
> retrieving revision 1.7
> diff -u -p -r1.7 wg.4
> --- man4/wg.4 27 Nov 2020 14:04:49 -  1.7
> +++ man4/wg.4 27 Nov 2020 14:08:56 -
> @@ -124,7 +124,10 @@ will accept any random 32-byte base64 st
>  When an interface has a private key set with
>  .Nm wgkey ,
>  the corresponding
> -public key is shown in the status output of the interface, like so:
> +public key is shown in the status output of the interface
> +displayed by
> +.Xr ifconfig 8
> +when run as root, like so:
>  .Bd -literal -offset indent
>  wgpubkey NW5l2q2MArV5ZXpVXSZwBOyqhohOf8ImDgUB+jPtJps=
>  .Ed
> 
> 

fine by me. i tried to think if we had any precedent in the man pages
for this, where output is exposed by root, but couldn't. i thought our
wireless interfaces did sth like that.

i also tried to shorten your text but couldn;t come up with anything
better.

so ok.
jmc



Re: wg(4) manpage tweaks

2020-11-27 Thread Jason McIntyre
On Fri, Nov 27, 2020 at 12:29:01PM +, Stuart Henderson wrote:
> It's not very clear how to fetch the pubkey. OK to add this to wg(4)?
> 

hi.

> Index: wg.4
> ===
> RCS file: /cvs/src/share/man/man4/wg.4,v
> retrieving revision 1.6
> diff -u -p -r1.6 wg.4
> --- wg.4  24 Nov 2020 16:33:05 -  1.6
> +++ wg.4  27 Nov 2020 12:28:32 -
> @@ -64,6 +64,9 @@ interface may be configured to recognise
>  .It Key
>  Each peer uses its private key and corresponding public key to
>  identify itself to others.
> +The public key may be displayed by running
> +.Xr ifconfig 8
> +as root after configuring the private key.
>  A peer configures a
>  .Nm wg
>  interface with its own private key and with the public keys of its peers.

i'm not sure about this text. wouldn;t the "Keys" section make more
sense? the "Keys" section itself says:

 When an interface has a private key set with wgkey, the
 corresponding public key is shown in the status output of
 the interface, like so:

   wgpubkey NW5l2q2MArV5ZXpVXSZwBOyqhohOf8ImDgUB+jPtJps=

maybe we should just elaborate here?

> @@ -138,9 +141,11 @@ but demonstrates two interfaces on the s
>  .Bd -literal
>  #!/bin/sh
>  
> +# create interfaces, set random private keys

i agree a bit of explanation makes sense here. saying that, you should
really join "create interfaces" and "set random private keys" with a
semicolon or "and" or somesuch, not a comma.

jmc

>  ifconfig wg1 create wgport 7111 wgkey `openssl rand -base64 32` rdomain 1
>  ifconfig wg2 create wgport 7222 wgkey `openssl rand -base64 32` rdomain 2
>  
> +# retrieve the public keys associated with the private keys
>  PUB1="`ifconfig wg1 | grep 'wgpubkey' | cut -d ' ' -f 2`"
>  PUB2="`ifconfig wg2 | grep 'wgpubkey' | cut -d ' ' -f 2`"
>  




Re: [PATCH]: Fix unclear man page of acpidump(8)

2020-11-22 Thread Jason McIntyre
On Sun, Nov 22, 2020 at 05:24:56PM +0100, Emil Engler wrote:
> The man page of acpidump(8) says that "kern.allowkmem" must be set to 
> some value in order for the program to work properly. However it does 
> not define to what value it must be set. I am not certainly sure if 
> there are other options between 0 and 1 but if so the man page should be 
> fixed anyway with these options IMO.
> 
> Cheers,
> Emil
> 
> Index: usr.sbin/acpidump/acpidump.8
> ===
> RCS file: /cvs/src/usr.sbin/acpidump/acpidump.8,v
> retrieving revision 1.18
> diff -u -p -u -p -r1.18 acpidump.8
> --- usr.sbin/acpidump/acpidump.81 Jun 2017 12:26:14 -   1.18
> +++ usr.sbin/acpidump/acpidump.822 Nov 2020 16:21:01 -
> @@ -68,8 +68,9 @@ $ iasl -d ..
>   .Nm
>   requires the ability to open
>   .Pa /dev/kmem
> -which may be restricted based upon the value of the
> +which requires
>   .Ar kern.allowkmem
> +to be set to 1 by
>   .Xr sysctl 8 .
>   .Pp
>   .Nm
> 

hi.

there should definitely be a comma before "which". i'll fix that.

except for that, i think i prefer the text as it is now. if you play
about with sysctl, it should be fairly obvious how to set values.

nowhere does it say that
> "kern.allowkmem" must be set to 
> some value in order for the program to work properly.

it says that it requires access to /dev/mem. and then refers to the
place where you can check what the current settings are.

i think it is clear enough.

jmc



Re: [PATCH]: Clearer documentation when using EVFILT_EXCEPT

2020-11-14 Thread Jason McIntyre
On Fri, Nov 13, 2020 at 11:50:09AM +0100, Emil Engler wrote:
> Currently it isn't mentioned that a socket is required when using 
> EVFILT_EXCEPT with NOTE_OOB. To some experienced users it might be clear 
> that it must be a socket but I don't think an additional word would hurt 
> anyone.
> 

committed, thanks, with a tweak - visa points out that pseudo terminals
are also relevant.

jmc

> Index: lib/libc/sys/kqueue.2
> ===
> RCS file: /cvs/src/lib/libc/sys/kqueue.2,v
> retrieving revision 1.42
> diff -u -p -u -p -r1.42 kqueue.2
> --- lib/libc/sys/kqueue.2   22 Jun 2020 13:42:06 -  1.42
> +++ lib/libc/sys/kqueue.2   13 Nov 2020 10:46:44 -
> @@ -315,7 +315,8 @@ Takes a descriptor as the identifier, an
>   specified exceptional conditions has occurred on the descriptor.
>   Conditions are specified in
>   .Fa fflags .
> -Currently, a filter can monitor the reception of out-of-band data with
> +Currently, a filter can monitor the reception of out-of-band data on a
> +socket with
>   .Dv NOTE_OOB .
>   .It Dv EVFILT_WRITE
>   Takes a descriptor as the identifier, and returns whenever
> 



Re: unbound.conf.5.in: remove reference to default pidfile

2020-11-11 Thread Jason McIntyre
On Sat, Nov 07, 2020 at 12:48:11PM +0100, Martin Vahlensieck wrote:
> Hi
> 
> Unbound on OpenBSD does not have a pidfile, so remove the reference in
> the manual. As the variable is empty, it also incorrectly formats the
> description as italic.
> 
> Best,
> 
> Martin
> 

fixed, thanks.
jmc

> Index: unbound.conf.5.in
> ===
> RCS file: /cvs/src/usr.sbin/unbound/doc/unbound.conf.5.in,v
> retrieving revision 1.34
> diff -u -p -r1.34 unbound.conf.5.in
> --- unbound.conf.5.in 28 Oct 2020 11:31:07 -  1.34
> +++ unbound.conf.5.in 7 Nov 2020 11:45:38 -
> @@ -2360,9 +2360,6 @@ location.
>  .I @ub_conf_file@
>  unbound configuration file.
>  .TP
> -.I @UNBOUND_PIDFILE@
> -default unbound pidfile with process ID of the running daemon.
> -.TP
>  .I unbound.log
>  unbound log file. default is to log to
>  \fIsyslog\fR(3).
> 



Re: accton(8) requires a reboot after being enabled

2020-11-02 Thread Jason McIntyre
On Mon, Nov 02, 2020 at 03:27:58PM +0100, Ingo Schwarze wrote:
> Hi Theo,
> 
> Theo de Raadt wrote on Fri, Oct 30, 2020 at 12:10:41PM -0600:
> 
> > Yes, that diff is a whole bunch of TOCTUO.
> > 
> > If this was going to be changed, it should be in the kernel.
> > 
> > But I don't know if it should be changed yet, which is why I asked
> > a bunch of questions.
> > 
> > Stepping back to the man page change, we could decide that accton
> > should continue to behave how it does, and this conversation started
> > because the man page fell into the trap of documenting the rc scripts
> > RATHER than documenting accton.
> 
> Given that nobody seems in a rush to patch the kernel, i suggest to
> improve the accton(8) manual page for now.  In particular, that

agreed

> manual page lacks the required EXIT STATUS section, which happens
> to be a natural place for mentioning what happens if the file does
> not exist.
> 
> As usual, an EXAMPLES section is not strictly required, but in this
> case, it seems useful to me, to save people from having to inspect
> /etc/mtree/special for the recommended file permissions.
> 
> OK?
>   Ingo
> 

i'm less sure here.

first off the issue was about whether accton was documenting things it
shouldn;t (rcctl etc.). as far as that issue is concerned, our man pages
pretty much all got converted to the format accton is currently in.
ntpd(8) is an exception. the fact that i prefer the wording in ntpd(8)
is not really relevant - unless we agree that the approach is wrong and
aim to change all relevant pages, i think the text in accton(8) should
stay.

as to your diff:

- adding EXIT STATUS makes sense. i agree.
but i don;t think it should discuss "file". firstly it'd be in
isolation, so confuse people (what file?). secondly the logical place
would surely be when we discuss the file argument.

- adding EXAMPLES seems flawed. it's not an example of how to use it. if
  anything it belongs in the main body. but i don;t think it makes sense
  at all.

so the only part i'm happy with is adding EXIT STATUS

i don;t plan to take any action on the page as-is, for reasons explained
above.

jmc

> 
> Index: accton.8
> ===
> RCS file: /cvs/src/usr.sbin/accton/accton.8,v
> retrieving revision 1.12
> diff -u -r1.12 accton.8
> --- accton.8  2 Nov 2020 13:58:44 -   1.12
> +++ accton.8  2 Nov 2020 14:19:43 -
> @@ -64,6 +64,17 @@
>  .It Pa /var/account/acct
>  default accounting file
>  .El
> +.Sh EXIT STATUS
> +.Ex -std
> +For example, it is an error if the
> +.Ar file
> +does not exist.
> +.Sh EXAMPLES
> +The following commands enable accounting if it was never used before:
> +.Bd -literal -offset 4n
> +# install -o root -g wheel -m 0644 /dev/null /var/account/acct
> +# accton /var/account/acct
> +.Ed
>  .Sh SEE ALSO
>  .Xr lastcomm 1 ,
>  .Xr acct 2 ,
> 



Re: Diff: Introductory Clause Comma Crap

2020-11-01 Thread Jason McIntyre
gt; -If the following environment variable exists it will be utilized by
> +If the following environment variable exists, it will be utilized by
>  .Nm vipw :
>  .Bl -tag -width EDITOR
>  .It Ev EDITOR
> 
> 
> 
> diff --git a/usr.sbin/ypserv/mkalias/mkalias.8 
> b/usr.sbin/ypserv/mkalias/mkalias.8
> index cd3d8d4c751..5abbd4112d9 100644
> --- a/usr.sbin/ypserv/mkalias/mkalias.8
> +++ b/usr.sbin/ypserv/mkalias/mkalias.8
> @@ -72,7 +72,8 @@ Verbose mode.
>  Use this map as input.
>  .It Ar output
>  Use this map as output.
> -If the output map isn't given don't create database.
> +If the output map isn't given, don't create a database.
> +\"An article was also needed in this sentence.
>  Can be useful together with
>  .Fl E
>  or
> 
> 
> 
> diff --git a/usr.sbin/ypserv/ypserv/ypserv.8 b/usr.sbin/ypserv/ypserv/ypserv.8
> index 11dc16876ab..3f8fe3fe036 100644
> --- a/usr.sbin/ypserv/ypserv/ypserv.8
> +++ b/usr.sbin/ypserv/ypserv/ypserv.8
> @@ -68,12 +68,12 @@ This file can have any name since it's given by the 
> argument to
>  .Fl a
>  (use full path).
>  .Pp
> -If a host isn't secure all queries to the server will result in a YP_NODOM
> +If a host isn't secure, all queries to the server will result in a YP_NODOM
>  result.
>  .Pp
>  If the file
> 
> 
> 
> diff --git a/usr.sbin/ypserv/ypserv/ypserv.acl.5 
> b/usr.sbin/ypserv/ypserv/ypserv.acl.5
> index 2a3e50a4713..42af8ac8a55 100644
> --- a/usr.sbin/ypserv/ypserv/ypserv.acl.5
> +++ b/usr.sbin/ypserv/ypserv/ypserv.acl.5
> @@ -61,7 +61,7 @@ or failure depending on which of
>  or
>  .Ic deny
>  was specified.
> -If no match was found in the list success is returned.
> +If no match was found in the list, success is returned.
>  .Pp
>  If access is denied every call will cause a
>  .Dq no such domain
> = END SLIGHTLY-LESS-LONG-ASS DIFFS =
> 
> 
> 
> On Sat, 31 Oct 2020 20:21:54 +
> Jason McIntyre  wrote:
> 
> > hi.
> > 
> > Mr. MACINTYRE... you must mean my dad!
> > 
> > thank you for your mail. please read guenther's followup - he makes some
> > very good points.
> > 
> > commas are really subjective, so a massive comma diff is always likely
> > to be problematic. sentence clauses do not always need commas. sometimes
> > commas just make the text harder to read.
> > 
> > look at your very first change:
> > 
> > > KUTGW,
> > > Varik "NOT A COMPUTER PROGRAMMER!!!" Valefor
> > > 
> > > *https://owl.purdue.edu/owl/general_writing/punctuation/commas/commas_after_introductions.html
> > > 
> > > = BEGIN DIFFS =
> > > diff --git a/bin/csh/csh.1 b/bin/csh/csh.1
> > > index f984356e846..2e89bcc0c3a 100644
> > > --- a/bin/csh/csh.1
> > > +++ b/bin/csh/csh.1
> > > @@ -1039,7 +1039,7 @@ and
> > >  If braces
> > >  .Ql {
> > >  .Ql }
> > > -appear in the command form then the modifiers
> > > +appear in the command form, then the modifiers
> > 
> > in a if/then sentence structure, "then" indicates the second
> > clause. the comma is redundant. "then" performs the role of a comma.
> > 
> > but depending on the wording, and the number of clauses, a comma might
> > help to make it more readable.
> > 
> > but you can;t just add them everywhere.
> > 
> > i think you should follow philip's advice to supply a small diff, check
> > whether such changes made wholesale would be welcome, then proceed.
> > 
> > i;d be happy to look over a diff where the clauses are not marked with
> > "then", such as here:
> > 
> > > diff --git a/lib/libagentx/subagentx.3 b/lib/libagentx/subagentx.3
> > > index d283ff198e8..23055f4a94c 100644
> > > --- a/lib/libagentx/subagentx.3
> > > +++ b/lib/libagentx/subagentx.3
> > > @@ -524,8 +524,8 @@ Set the return value to an opaque value.
> > >  .It Fn subagentx_varbind_counter64
> > >  Set the return value to an uint64_t of type counter64.
> > >  .It Fn subagentx_varbind_notfound
> > > -When the request is of type GET return an nosuchinstance error.
> > > -When the request is of type GETNEXT or GETBULK return an endofmibview 
> > > error.
> > > +When the request is of type GET, return an nosuchinstance error.
> > > +When the request is of type GETNEXT or GETBULK, return an endofmibview 
> > > error.
> > >  On endofmibview the next object is queried.
> > >  This function can only be called on objects that contain one or more 
> > > *_dynamic
> > >  indices.
> > 
> > in this case it is really hard to tell where one clause ends and another
> > starts - the comma improves readability. in addition, "an nosuchinstance" 
> > should
> > be "a nosuchinstance".
> > 
> > good luck!
> > jmc



Re: Diff: Introductory Clause Comma Crap

2020-10-31 Thread Jason McIntyre
On Sat, Oct 31, 2020 at 03:14:30PM -0400, VARIK VALEFOR wrote:
> Sir or Madam:
> 
> This message contains even more grammatical fixes for the OpenBSD
> manual pages.  To ensure that the changes which are proposed in this
> message can be justified, this message primarily fixes only a single
> type of error: the absence of commas after introductory clauses.
> 
> Unless otherwise specified, for all changes which are proposed in this
> message, a change adds a comma after an introductory clause; for all
> introductory clauses, a comma _must_ follow an introductory clause.*
> However, these changes should not only be made because the changes fix
> incorrect things; rather, these changes should be made because many
> changes greatly increase the clarity of the manual pages; incorrect
> comma usage can lead to the misinterpretation of things, which is
> bad... especially in the case of a user manual.
> 
> Mr. MACINTYRE mentioned that VARIK's previous message was fairly
> unreadable; as such, some spacing has been added to these diffs,
> thereby hopefully improving the readability of this message.  Any
> advice regarding the formatting of this sort of message would be
> welcomed; poorly-formatted, i.e., unreadable, messages waste time, and
> wasting time sucks.
> 

hi.

Mr. MACINTYRE... you must mean my dad!

thank you for your mail. please read guenther's followup - he makes some
very good points.

commas are really subjective, so a massive comma diff is always likely
to be problematic. sentence clauses do not always need commas. sometimes
commas just make the text harder to read.

look at your very first change:

> KUTGW,
> Varik "NOT A COMPUTER PROGRAMMER!!!" Valefor
> 
> *https://owl.purdue.edu/owl/general_writing/punctuation/commas/commas_after_introductions.html
> 
> = BEGIN DIFFS =
> diff --git a/bin/csh/csh.1 b/bin/csh/csh.1
> index f984356e846..2e89bcc0c3a 100644
> --- a/bin/csh/csh.1
> +++ b/bin/csh/csh.1
> @@ -1039,7 +1039,7 @@ and
>  If braces
>  .Ql {
>  .Ql }
> -appear in the command form then the modifiers
> +appear in the command form, then the modifiers

in a if/then sentence structure, "then" indicates the second
clause. the comma is redundant. "then" performs the role of a comma.

but depending on the wording, and the number of clauses, a comma might
help to make it more readable.

but you can;t just add them everywhere.

i think you should follow philip's advice to supply a small diff, check
whether such changes made wholesale would be welcome, then proceed.

i;d be happy to look over a diff where the clauses are not marked with
"then", such as here:

> diff --git a/lib/libagentx/subagentx.3 b/lib/libagentx/subagentx.3
> index d283ff198e8..23055f4a94c 100644
> --- a/lib/libagentx/subagentx.3
> +++ b/lib/libagentx/subagentx.3
> @@ -524,8 +524,8 @@ Set the return value to an opaque value.
>  .It Fn subagentx_varbind_counter64
>  Set the return value to an uint64_t of type counter64.
>  .It Fn subagentx_varbind_notfound
> -When the request is of type GET return an nosuchinstance error.
> -When the request is of type GETNEXT or GETBULK return an endofmibview error.
> +When the request is of type GET, return an nosuchinstance error.
> +When the request is of type GETNEXT or GETBULK, return an endofmibview error.
>  On endofmibview the next object is queried.
>  This function can only be called on objects that contain one or more 
> *_dynamic
>  indices.

in this case it is really hard to tell where one clause ends and another
starts - the comma improves readability. in addition, "an nosuchinstance" should
be "a nosuchinstance".

good luck!
jmc

>  must appear within the braces.
>  The current implementation allows only one
>  .Ql \&:
> @@ -1282,7 +1282,7 @@ is given to the command as its standard input.
>  The file
>  .Ar name
>  is used as the standard output.
> -If the file does not exist then it is created;
> +If the file does not exist, then it is created;
>  if the file exists, it is truncated; its previous contents are lost.
>  .Pp
>  If the variable
> @@ -1469,7 +1469,7 @@ l symbolic link
>  .Pp
>  The specified name is command and filename expanded and then tested
>  to see if it has the specified relationship to the real user.
> -If the file does not exist or is inaccessible then all enquiries return
> +If the file does not exist or is inaccessible, then all enquiries return
>  false, i.e.,
>  .Ql 0 .
>  Command executions succeed, returning true, i.e.,
> @@ -1477,7 +1477,7 @@ Command executions succeed, returning true, i.e.,
>  if the command exits with status 0, otherwise they fail, returning
>  false, i.e.,
>  .Ql 0 .
> -If more detailed status information is required then the command
> +If more detailed status information is required, then the command
>  should be executed outside an expression and the variable
>  .Ar status
>  examined.
> @@ -1510,7 +1510,7 @@ non-seekable inputs.)
>  .Ss Built-in commands
>  Built-in commands are executed within the shell.
>  If a built-in 

Re: accton(8) requires a reboot after being enabled

2020-10-30 Thread Jason McIntyre
On Fri, Oct 30, 2020 at 09:59:09AM -0600, Theo de Raadt wrote:
> Jason McIntyre  wrote:
> 
> > On Fri, Oct 30, 2020 at 04:24:43PM +0100, Solene Rapenne wrote:
> > > reading accton(8) it's not clear that if you
> > > enable it you need to restart the system for
> > > accounting to be effective.
> > > 
> > > Here is a change to add the explanation, but
> > > I'm not sure if the wording is correct.
> > > 
> > 
> > hi. i think the text that follows is really trying to say the same thing
> > (you enable it at boot, so until you boot it isn;t enabled). we could
> > just try to make that one bit of text a bit clearer:
> > 
> > .Nm
> > should be enabled at boot time, either by running
> > .Dq rcctl enable accounting
> > or by setting
> > .Dq accounting=YES
> > in
> > .Xr rc.conf.local 8 .
> 
> With a careful reading of the current manual page, everything is there
> and it is accurate.
> 
> With an argument naming an existing file
>
> 

correct.  i missed that accton could be started this way, and
concentrated on how to start it at boot (which i guess is nromally the
way it'll be run).

> Ok so let's create it with touch.  Probably has wrong permissions.
> But now accton to that file works.  Or enable it and reboot, and now
> disable it and reboot, and the file still exists, so now accton works
> because it is an existing file (with the right permissions I guess).
> 
> So it *IS* working as documented.  It is just a bit weird, because the
> accton command (and system call) do not create the file.
> 

yes, it works as advertised. and all the bits are there - i just thought
solene's notes were a repetition on the current boot notes.

> 
> My problem with these changes is this is the man page for the accton(8)
> command, it documents *the binary*.  The manpage has already been subverted
> talk about rcctl, and about how /etc/rc runs the command.  But the man
> page should first and foremost be about the command, not about /etc/rc
> and rcctl, am i not right?  For instance, the ntpd manual page has a tiny
> section about rc.conf.
> 

the main text body is so slim that the boot notes look bigger in
relation. ntpd has more to say.

but rerading ntpd(8), i think it discusses the startup process in a
better way. maybe we should move to a text more similar to that one/

i think it's still fair game to say how to start a process in its man
page. if we don;t want such information, we have a lot of undoing to er,
do.

> So in conclusion, I think both of you are writing text about the startup
> subsystem, into the wrong manual page.  I think both proposals are skewed.
> 
> So questions.
> 
> 1 - historically it requires a file to be pre-created.  In the rc scripts,
> this is a touch.  That grabs the umask and ownership of root's run of
> /etc/rc.
> 2 - could we do better, in some way?
> 3 - accton system call does not have a umask, is that where this design came
> from?
> 4 - could we improve upon this?
> 5 - could accton always (attempt to) create the file, without harming existing
> use cases, with proper owner and chmod flags?
> 6 - or should that be tied to a flag, making it easier to document?
> 

i can;t answer these points. except with more questions:

- is it fair game for a process to document how it fits into the startup
  process? right now, we broadly do that. i think it's fine.

- somewhere we switched to telling people how to use rcctl. i never like
  this system, but it was broadly agreed. so now there are two ways to
  do things. should the pages describe both? it's hard to see we'd do
  one without the other. i note that ntpd(8) does not discuss
  rcctl(8)...

jmc

> > sth like that?
> > jmc
> > 
> > > Index: accton.8
> > > ===
> > > RCS file: /home/reposync/src/usr.sbin/accton/accton.8,v
> > > retrieving revision 1.11
> > > diff -u -p -r1.11 accton.8
> > > --- accton.8  10 Nov 2019 20:51:53 -  1.11
> > > +++ accton.8  30 Oct 2020 15:22:14 -
> > > @@ -43,6 +43,10 @@ causes system accounting information for
> > >  to be placed at the end of the file.
> > >  If no argument is given, accounting is turned off.
> > >  .Pp
> > > +Accounting is done if it was enabled when system booted.
> > > +If you activate accounting, a reboot is required for it to become
> > > +effective.
> > > +.Pp
> > >  To have
> > >  .Nm
> > >  enabled at boot time, use
> > > 
> > 
> 



Re: accton(8) requires a reboot after being enabled

2020-10-30 Thread Jason McIntyre
On Fri, Oct 30, 2020 at 04:24:43PM +0100, Solene Rapenne wrote:
> reading accton(8) it's not clear that if you
> enable it you need to restart the system for
> accounting to be effective.
> 
> Here is a change to add the explanation, but
> I'm not sure if the wording is correct.
> 

hi. i think the text that follows is really trying to say the same thing
(you enable it at boot, so until you boot it isn;t enabled). we could
just try to make that one bit of text a bit clearer:

.Nm
should be enabled at boot time, either by running
.Dq rcctl enable accounting
or by setting
.Dq accounting=YES
in
.Xr rc.conf.local 8 .

sth like that?
jmc

> Index: accton.8
> ===
> RCS file: /home/reposync/src/usr.sbin/accton/accton.8,v
> retrieving revision 1.11
> diff -u -p -r1.11 accton.8
> --- accton.8  10 Nov 2019 20:51:53 -  1.11
> +++ accton.8  30 Oct 2020 15:22:14 -
> @@ -43,6 +43,10 @@ causes system accounting information for
>  to be placed at the end of the file.
>  If no argument is given, accounting is turned off.
>  .Pp
> +Accounting is done if it was enabled when system booted.
> +If you activate accounting, a reboot is required for it to become
> +effective.
> +.Pp
>  To have
>  .Nm
>  enabled at boot time, use
> 



Re: snmpd.conf.5: remove duplicate word

2020-10-24 Thread Jason McIntyre
On Sat, Oct 24, 2020 at 09:29:13PM +0800, Sean Davies wrote:
> Index: snmpd.conf.5
> ===
> RCS file: /cvs/src/usr.sbin/snmpd/snmpd.conf.5,v
> retrieving revision 1.44
> diff -u -p -r1.44 snmpd.conf.5
> --- snmpd.conf.510 Sep 2020 17:54:47 -  1.44
> +++ snmpd.conf.524 Oct 2020 13:14:19 -
> @@ -193,7 +193,7 @@ the resolved hostname of the host sendin
>  the IP address of the host sending the trap,
>  and any variable bindings contained in the trap
>  (the OID followed by the value, separated by a single space).
> -Traps will will be accepted on all
> +Traps will be accepted on all
>  .Ic listen on
>  UDP addresses.
>  .It Xo
> 
> -- 
> Sean
> 

fixed, thanks.
jmc



Re: Additional Grammar Fixes

2020-10-24 Thread Jason McIntyre
On Sat, Oct 24, 2020 at 09:46:35AM +, Varik Valefor wrote:
> Sir or Madam:
> 
> Some additional grammatical fixes should be attached to this message.
> 

hi.

i'm afraid most of these are just not fixes. my advice is to send small,
similarly grouped diffs, until you get a feel for what kind of fixes
might get accepted. that would also make it easier to give you feedback
on individual questions.

from your diff i committed the diff below, and have rejected everything
else. i may have missed something, but the diff was so large it was
difficult to read.

thanks,
jmc

Index: lib/libskey/skey.5
===
RCS file: /cvs/src/lib/libskey/skey.5,v
retrieving revision 1.8
diff -u -p -r1.8 skey.5
--- lib/libskey/skey.5  25 Jan 2019 00:19:26 -  1.8
+++ lib/libskey/skey.5  24 Oct 2020 10:30:26 -
@@ -31,7 +31,7 @@ directory contains user records for the 
 system.
 .Pp
 Records take the form of files within
-.Pa /etc/skey
+.Pa /etc/skey ,
 where each file is named for the user whose record it contains.
 For example,
 .Pa /etc/skey/root
@@ -51,7 +51,7 @@ Each record consists of five lines:
 The name of the user the record describes.
 This should be the same as the name of the file.
 .It
-The hash type used for this entry;
+The hash type used for this entry:
 one of md5, sha1, or rmd160.
 The default is md5.
 .It
@@ -62,7 +62,7 @@ Each time the user authenticates via S/K
 A seed used along with the sequence number and the six S/Key words to
 compute the value.
 .It
-The value expected from the crunching of the user's seed, sequence number
+The value expected from the crunching of the user's seed, sequence number,
 and the six S/Key words.
 When the result matches this value, authentication is considered to have
 been successful.
Index: lib/libusbhid/usbhid.3
===
RCS file: /cvs/src/lib/libusbhid/usbhid.3,v
retrieving revision 1.20
diff -u -p -r1.20 usbhid.3
--- lib/libusbhid/usbhid.3  12 May 2020 13:03:52 -  1.20
+++ lib/libusbhid/usbhid.3  24 Oct 2020 10:30:26 -
@@ -86,7 +86,7 @@ The
 .Nm
 library provides routines to extract data from USB Human Interface Devices.
 .Ss INTRODUCTION
-USB HID devices send and receive data laid out in a device dependent way.
+USB HIDs send and receive data laid out in a device dependent way.
 The
 .Nm
 library contains routines to extract the
@@ -117,10 +117,10 @@ return
 .Fa NULL
 on failure.
 .Ss DESCRIPTOR PARSING FUNCTIONS
-To parse the report descriptor the
+To parse the report descriptor, the
 .Fn hid_start_parse
 function should be called with a report descriptor and a set that
-describes which items that are interesting.
+describes which items are interesting.
 The set is obtained by or-ing together values
 .Fa (1 << k)
 where
@@ -198,8 +198,8 @@ A return value of \-1 indicates that an 
 .Va errno
 is set.
 .Ss DATA EXTRACTION FUNCTIONS
-Given the data obtained from a HID device and an item in the
-report descriptor the
+Given the data obtained from a HID and an item in the
+report descriptor, the
 .Fn hid_get_data
 function extracts the value of the item.
 Conversely



Re: Typo Diffs

2020-10-16 Thread Jason McIntyre
On Fri, Oct 16, 2020 at 02:36:39AM +, Varik Valefor wrote:
> Sir or Madam:
> 
> Included within this message should be some diffs which can be applied to
> fix some typographical errors and general wording problems which exist
> within the OpenBSD manual pages, as well as some other files.
> 
> These changes are proposed because typographical errors look bad and can
> lead to assumptions of incompetence.
> 
> KUTGW,
> Varik "NOT A COMPUTER PROGRAMMER!!!" Valefor
> 

hi.

thanks for your mail - typo fixes are always welcome! i have committed
fixes for the two instances of "the the". i'm afraid the other parts
of the diff are really just questions of preference, and don;t
represent enough of a clear improvement to be committed. none of
them are errors (at least, not in 2020).

thanks,
jmc

> - BEGIN DIFFS -
> diff --git a/lib/libutil/ober_add_string.3 b/lib/libutil/ober_add_string.3
> index 5eb6bd32ea0..77a13e629a0 100644
> --- a/lib/libutil/ober_add_string.3
> +++ b/lib/libutil/ober_add_string.3
> @@ -134,7 +134,7 @@ creates zero or more
>  structures.
>  For each byte in
>  .Fa fmt ,
> -arguments of the the types given in the following table are consumed
> +arguments of the types given in the following table are consumed
>  and passed to the listed function, creating one
>  .Vt ber_element
>  per byte.
> 
> diff --git a/share/man/man9/physio.9 b/share/man/man9/physio.9
> index 528581eedaa..2977813bbe8 100644
> --- a/share/man/man9/physio.9
> +++ b/share/man/man9/physio.9
> @@ -56,7 +56,7 @@ The maximum amount of data to transfer with each call to
>  is determined by the
>  .Fa minphys
>  routine.
> -Since
> +Because
>  .Fa uio
>  normally describes user space addresses,
>  .Fn physio
> @@ -85,7 +85,9 @@ A break-down of the arguments follows:
>  The device strategy routine to call for each chunk of data to initiate
>  device I/O.
>  .It Fa dev
> -The device number identifying the device to interact with.
> +The device number of the device with which
> +.Nm
> +should interact.
>  .It Fa flags
>  Direction of transfer; the only valid settings are
>  .Dv B_READ
> 
> diff --git a/usr.bin/ftp/ftp.1 b/usr.bin/ftp/ftp.1
> index 4f4bfd8d5d5..b5683b0d546 100644
> --- a/usr.bin/ftp/ftp.1
> +++ b/usr.bin/ftp/ftp.1
> @@ -316,7 +316,7 @@ slow connection after
>  The host with which
>  .Nm
>  is to communicate may be specified on the command line.
> -If this is done,
> +If this host is specified,
>  .Nm
>  will immediately attempt to establish a connection to an
>  FTP server on that host; otherwise,
> @@ -1675,7 +1675,7 @@ entry cannot be utilized by multiple
>  .Ic machine
>  definitions; rather, it must be defined following each
>  .Ic machine
> -it is intended to be used with.
> +with which it is to be used.
>  If a macro named
>  .Ic init
>  is defined, it is automatically executed as the last step in the
> 
> diff --git a/usr.bin/sed/sed.1 b/usr.bin/sed/sed.1
> index 87a5d04aa4a..4d4b0d3660c 100644
> --- a/usr.bin/sed/sed.1
> +++ b/usr.bin/sed/sed.1
> @@ -427,7 +427,7 @@ string for the first instance of the regular expression
>  in the pattern space.
>  Any character other than backslash or newline can be used instead of
>  a slash to delimit the regular expression and the replacement.
> -Also see the the section about
> +Also see the section about
>  .Sx SED REGULAR EXPRESSIONS .
>  .Pp
>  An ampersand
> 
> diff --git a/usr.bin/openssl/openssl.1 b/usr.bin/openssl/openssl.1
> index e364586f5ad..f1f4361c472 100644
> --- a/usr.bin/openssl/openssl.1
> +++ b/usr.bin/openssl/openssl.1
> @@ -408,10 +408,10 @@ are assumed to be the names of files containing 
> certificate requests.
>  The
>  .Fa password
>  used to encrypt the private key.
> -Since on some systems the command line arguments are visible,
> +On some systems, the command line arguments are visible; therefore,
>  this option should be used with caution.
>  .It Fl keyfile Ar file
> -The private key to sign requests with.
> +The private key with which requests should be signed.
>  .It Fl keyform Cm pem | der
>  Private key file format.
>  The default is
> 
> diff --git a/usr.bin/x99token/x99token.1 b/usr.bin/x99token/x99token.1
> index 1d004dea440..8a29f22ce99 100644
> --- a/usr.bin/x99token/x99token.1
> +++ b/usr.bin/x99token/x99token.1
> @@ -49,7 +49,7 @@ is not specified,
>  is in calculator mode.
>  In this mode you must enter the same PIN as used in the initialization step.
>  The PIN is used to decode the key read from the keyfile.
> -Next you enter the challenge you have been presented with.
> +Next, you enter the challenge which has been presented to you.
>  The
>  .Nm
>  program will provide you with a response to the challenge.
> 
> diff --git a/usr.bin/openssl/openssl.1 b/usr.bin/openssl/openssl.1
> index e364586f5ad..da4b73aee3c 100644
> --- a/usr.bin/openssl/openssl.1
> +++ b/usr.bin/openssl/openssl.1
> @@ -371,7 +371,7 @@ If reading the serial from the text file as specified in 
> the
>  configuration fails, create a new random serial 

Re: rdomain.4: add netstat -R example

2020-09-22 Thread Jason McIntyre
On Tue, Sep 22, 2020 at 08:54:31PM +0200, Klemens Nanni wrote:
> It's handy and otherwise easily missed when reading up on routing
> domains and tables;  wording taken from netstat(1) as is.
> 
> Not listing pgrep(1)'s `-T' because examples don't have to be exhaustive
> and ps(1) is already demonstrated;  same for top(1) users which more
> likely come across its `t' and `T' in the help page anyway (I guess).
> 
> Feedback? OK?
> 

makes sense. ok by me.
jmc

> 
> Index: rdomain.4
> ===
> RCS file: /cvs/src/share/man/man4/rdomain.4,v
> retrieving revision 1.14
> diff -u -p -r1.14 rdomain.4
> --- rdomain.4 30 Jul 2020 21:44:34 -  1.14
> +++ rdomain.4 22 Sep 2020 18:51:29 -
> @@ -98,6 +98,10 @@ Put em0 and lo4 in rdomain 4:
>  # ifconfig em0 192.0.2.100/24
>  .Ed
>  .Pp
> +List all rdomains with associated interfaces and routing tables:
> +.Pp
> +.Dl # netstat -R
> +.Pp
>  Set a default route and localhost reject route within rtable 4:
>  .Bd -literal -offset indent
>  # route -T4 -qn add -net 127 127.0.0.1 -reject
> @@ -129,6 +133,7 @@ Delete rdomain 4 again:
>  # ifconfig lo4 destroy
>  .Ed
>  .Sh SEE ALSO
> +.Xr netstat 1 ,
>  .Xr ps 1 ,
>  .Xr lo 4 ,
>  .Xr route 4 ,
> 



Re: ksh "clear-screen" for vi mode

2020-09-20 Thread Jason McIntyre
On Sun, Sep 20, 2020 at 08:19:24AM -0600, Todd C. Miller wrote:
> Does this look better?  I don't think we need to refer to the emacs
> clear-screen command in both cases; once should be sufficient.
> 
>  - todd
> 

i think it reads fine.
jmc

> Index: bin/ksh/ksh.1
> ===
> RCS file: /cvs/src/bin/ksh/ksh.1,v
> retrieving revision 1.209
> diff -u -p -u -r1.209 ksh.1
> --- bin/ksh/ksh.1 7 Jul 2020 10:33:58 -   1.209
> +++ bin/ksh/ksh.1 20 Sep 2020 14:16:50 -
> @@ -5053,6 +5053,13 @@ Erases previous character.
>  .It ^J | ^M
>  End of line.
>  The current line is read, parsed, and executed by the shell.
> +.It ^L
> +Clear the screen (if possible) and redraw the current line.
> +See the
> +.Em clear-screen
> +command in
> +.Sx Emacs editing mode
> +for more information.
>  .It ^V
>  Literal next.
>  The next character typed is not treated specially (can be used
> @@ -5510,7 +5517,9 @@ Miscellaneous vi commands
>  .Bl -tag -width Ds
>  .It ^J and ^M
>  The current line is read, parsed, and executed by the shell.
> -.It ^L and ^R
> +.It ^L
> +Clear the screen (if possible) and redraw the current line.
> +.It ^R
>  Redraw the current line.
>  .It Xo
>  .Oo Ar n Oc Ns \&.
> Index: bin/ksh/vi.c
> ===
> RCS file: /cvs/src/bin/ksh/vi.c,v
> retrieving revision 1.56
> diff -u -p -u -r1.56 vi.c
> --- bin/ksh/vi.c  15 Mar 2018 16:51:29 -  1.56
> +++ bin/ksh/vi.c  20 Sep 2020 12:02:38 -
> @@ -14,12 +14,14 @@
>  #include 
>  #include 
>  #include 
> +#ifndef SMALL
> +# include 
> +# include 
> +#endif
>  
>  #include "sh.h"
>  #include "edit.h"
>  
> -#define CTRL(c)  (c & 0x1f)
> -
>  struct edstate {
>   char*cbuf;  /* main buffer to build the command line */
>   int cbufsize;   /* number of bytes allocated for cbuf */
> @@ -52,8 +54,9 @@ static int  Backword(int);
>  static int   Endword(int);
>  static int   grabhist(int, int);
>  static int   grabsearch(int, int, int, char *);
> +static void  do_clear_screen(void);
>  static void  redraw_line(int);
> -static void  refresh(int);
> +static void  refresh_line(int);
>  static int   outofwin(void);
>  static void  rewindow(void);
>  static int   newcol(int, int);
> @@ -271,9 +274,9 @@ vi_hook(int ch)
>   case 0:
>   if (state == VLIT) {
>   es->cursor--;
> - refresh(0);
> + refresh_line(0);
>   } else
> - refresh(insert != 0);
> + refresh_line(insert != 0);
>   break;
>   case 1:
>   return 1;
> @@ -298,7 +301,7 @@ vi_hook(int ch)
>   return -1;
>   } else if (putbuf("?", 1, 0) != 0)
>   return -1;
> - refresh(0);
> + refresh_line(0);
>   }
>   }
>   }
> @@ -310,7 +313,7 @@ vi_hook(int ch)
>   vi_error();
>   } else
>   es->cbuf[es->cursor++] = ch;
> - refresh(1);
> + refresh_line(1);
>   state = VNORMAL;
>   break;
>  
> @@ -375,7 +378,7 @@ vi_hook(int ch)
>   if (!srchpat[0]) {
>   vi_error();
>   state = VNORMAL;
> - refresh(0);
> + refresh_line(0);
>   return 0;
>   }
>   } else {
> @@ -392,17 +395,17 @@ vi_hook(int ch)
>   } while (srchlen > 0 &&
>   isu8cont(locpat[srchlen]));
>   es->cursor = es->linelen;
> - refresh(0);
> + refresh_line(0);
>   return 0;
>   }
>   restore_cbuf();
>   state = VNORMAL;
> - refresh(0);
> + refresh_line(0);
>   } else if (ch == edchars.kill) {
>   srchlen = 0;
>   es->linelen = 1;
>   es->cursor = 1;
> - refresh(0);
> + refresh_line(0);
>   return 0;
>   } else if (ch == edchars.werase) {
>   struct edstate new_es, *save_es;
> @@ -421,7 +424,7 @@ vi_hook(int ch)
>   

Re: Document errno for ober_read_elements

2020-09-03 Thread Jason McIntyre
On Thu, Sep 03, 2020 at 09:25:11PM +0200, Theo Buehler wrote:
> On Thu, Sep 03, 2020 at 08:50:39PM +0200, Martijn van Duren wrote:
> > So here's my attempt at documenting errno for ober_read_elements.
> > 
> 
> Two small things below, otherwise this looks correct to me.
> 
> > martijn@
> > 
> > Index: ober_read_elements.3
> > ===
> > RCS file: /cvs/src/lib/libutil/ober_read_elements.3,v
> > retrieving revision 1.1
> > diff -u -p -r1.1 ober_read_elements.3
> > --- ober_read_elements.324 Oct 2019 12:39:26 -  1.1
> > +++ ober_read_elements.33 Sep 2020 18:48:56 -
> > @@ -142,9 +142,10 @@ frees any dynamically allocated storage 
> >  .Fn ober_read_elements
> >  returns a pointer to a fully populated list of one or more
> >  .Vt ber_element
> > -structures or
> > -.Dv NULL
> > -on a type mismatch or read error.
> > +structures.
> > +Otherwise \-1 is returned and the global variable
> > +.Va errno
> > +is set to indicate the error.
> >  .Pp
> >  .Fn ober_get_writebuf
> >  returns the number of bytes contained within the buffer
> > @@ -155,7 +156,30 @@ or \-1 on failure.
> >  returns the number of bytes written.
> >  Otherwise \-1 is returned and the global variable
> >  .Va errno
> > -is set to indicate the error.
> > +is set to
> > +.Er ENOMEM
> 
> .Er ENOMEM .
> 
> 
> > +to indicate the error.
> 
> drop this (cf malloc(3)).
> 
> > +.Sh ERRORS
> > +.Fn ober_read_elements
> > +will fail if:
> > +.Bl -tag -width Er
> > +.It Bq Er ENOMEM
> > +No memory was available to create the full
> > +.Vt ber_element
> > +structure list.
> > +.It Bq Er ENOBUFS
> > +.Fn ober_read_elements
> > +was called before calling
> > +.Fn ober_set_readbuf .
> > +.It Bq Er ECANCELED
> > +.Fa buf
> > +does not contain enough data to complete the unpacking.
> > +.It Bq Er EINVAL
> > +.Fa buf
> > +does not contain a valid BER data structure.
> > +.It Bq Er ERANGE
> > +One of the values in the structure is larger then the library can unpack.
> 
> then -> than
> 
> I am unsure wether this is correct/idiomatic English. I don't have a
> better suggestion. I would wait for jmc :)
> 

well, i just sent an ok and failed even to spot this typo, so maybe
don;t wait for me ;)

the typo fix is correct of course, and it reads ok to me.
jmc

> > +.El
> >  .Sh SEE ALSO
> >  .Xr read 2 ,
> >  .Xr recv 2 ,
> > 
> 



Re: Improve semantics and punctuation in ifconfig.8

2020-08-24 Thread Jason McIntyre
On Sun, Aug 23, 2020 at 10:03:54PM +0100, Jason McIntyre wrote:
> On Sat, Aug 22, 2020 at 02:18:48PM -0700, Evan Silberman wrote:
> > Not to provoke a deep philosophical debate about the difference between
> > Ql, Cm, and Sy, but surely Em isn't the best choice here. A couple other
> > nits that bothered me in the same general region, I guess your taste
> > might vary.
> > 
> > Evan Silberman
> > 
> 
> hi
> 
> > ---
> > commit 233b62ce4e6cd3388e68f407e50758111b3eeffc (ifconfig.8)
> > from: Evan Silberman 
> > date: Sat Aug 22 21:14:25 2020 UTC
> >  
> >  Improve markup and punctuation concerning groups
> >  
> >  - They're groups, not scare-quotes-"groups"
> 
> oddly enough, this usage is probably close to what Em is meant for ;)
> quoting here is just another way to add that emphasis. but i agree it
> doesn;t make the text more readable.
> 
> >  - The markup for the default groups is debatable, but Cm seems closest.
> >You might also like: Ql, Sy
> 
> i would prefer to use one macro rather than two. i agree Em is not
> great. i would just use Dq.
> 
> >  - Parenthesized plural(s) is (are) distracting
> >  
> 
> i heartily agree.
> 
> so, if no one chips in soon, i will commit your diff, but with a
> straight Em->Dq replacement.
> 
> jmc
> 

...which i have just done. thanks for the diff,
jmc



Re: aggr.4 and trunk.4: omit common ifconfig options

2020-08-23 Thread Jason McIntyre
On Mon, Aug 24, 2020 at 01:26:06AM +0200, Klemens Nanni wrote:
> ifconfig(8)'s TRUNK (LINK AGGREGATION) nicely combines the two drivers
> and I'd like to further omit common stuff from the drive specific
> manuals.
> 
> This aids in the overall design of having options documented in
> ifconfig(8) alone unless they're inherently driver specific, e.g.
> `trunkproto' which stays in trunk(4).
> 
> sys/net/if_trunk.c and sys/net/trunklacp.h confirm that trunk(4) has
> indeed the same defaults as aggr(4) when it comes to LACP mode and
> timeout:
> 
>   #define>LACP_DEFAULT_MODE>  >   1 /* Active Mode */
>   #define>LACP_DEFAULT_TIMEOUT>   >   0 /* Slow Timeout */
> 
> Feedback? OK?
> 

ok.
jmc

> 
> Index: share/man/man4/aggr.4
> ===
> RCS file: /cvs/src/share/man/man4/aggr.4,v
> retrieving revision 1.2
> diff -u -p -r1.2 aggr.4
> --- share/man/man4/aggr.4 5 Jul 2019 05:22:57 -   1.2
> +++ share/man/man4/aggr.4 23 Aug 2020 23:10:46 -
> @@ -63,30 +63,11 @@ and
>  .Xr netstart 8
>  using the following options:
>  .Bl -tag -width Ds
> -.It Cm lacpmode Cm active Ns | Ns Cm passive
> -Set the LACP mode to either
> -.Cm active
> -or
> -.Cm passive .
> -The default is active mode.
> -.It Cm lacptimeout Cm fast Ns | Ns Cm slow
> -Set the LACP timeout speed to either
> -.Cm fast
> -or
> -.Cm slow .
> -The default is slow timeouts.
>  .It Cm lladdr Ar etheraddr Ns | Ns Cm random
>  Change the link layer address (MAC address) of the interface.
>  This should be specified as six colon-separated hex values, or can
>  be chosen randomly.
>  By default a random MAC address is generated when an interface is created.
> -.It Cm trunkport Ar child-iface
> -Add
> -.Ar child-iface
> -as a port.
> -.It Cm -trunkport Ar child-iface
> -Remove the port
> -.Ar child-iface .
>  .El
>  .\" document the ioctls?
>  .Pp
> Index: share/man/man4/trunk.4
> ===
> RCS file: /cvs/src/share/man/man4/trunk.4,v
> retrieving revision 1.30
> diff -u -p -r1.30 trunk.4
> --- share/man/man4/trunk.412 Aug 2018 23:50:31 -  1.30
> +++ share/man/man4/trunk.423 Aug 2020 23:12:53 -
> @@ -34,15 +34,6 @@ A
>  interface can be created using the
>  .Ic ifconfig trunk Ns Ar N Ic create
>  command.
> -It can use different link aggregation protocols specified
> -using the
> -.Ic trunkproto Ar proto
> -option.
> -Child interfaces can be added using the
> -.Ic trunkport Ar child-iface
> -option and removed using the
> -.Ic -trunkport Ar child-iface
> -option.
>  .Pp
>  The driver currently supports the trunk protocols
>  .Ic broadcast ,
> Index: sbin/ifconfig/ifconfig.8
> ===
> RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
> retrieving revision 1.356
> diff -u -p -r1.356 ifconfig.8
> --- sbin/ifconfig/ifconfig.8  8 Aug 2020 06:06:24 -   1.356
> +++ sbin/ifconfig/ifconfig.8  23 Aug 2020 23:21:28 -
> @@ -1824,13 +1824,14 @@ interfaces:
>  .It Cm lacpmode Cm active Ns | Ns Cm passive
>  Set the LACP trunk mode to either
>  .Cm active
> -or
> +(default) or
>  .Cm passive .
>  .It Cm lacptimeout Cm fast Ns | Ns Cm slow
>  Set the LACP timeout speed to either
>  .Cm fast
>  or
> -.Cm slow .
> +.Cm slow
> +(default).
>  .It Cm trunkport Ar child-iface
>  Add
>  .Ar child-iface
> 



Re: Improve semantics and punctuation in ifconfig.8

2020-08-23 Thread Jason McIntyre
On Sat, Aug 22, 2020 at 02:18:48PM -0700, Evan Silberman wrote:
> Not to provoke a deep philosophical debate about the difference between
> Ql, Cm, and Sy, but surely Em isn't the best choice here. A couple other
> nits that bothered me in the same general region, I guess your taste
> might vary.
> 
> Evan Silberman
> 

hi

> ---
> commit 233b62ce4e6cd3388e68f407e50758111b3eeffc (ifconfig.8)
> from: Evan Silberman 
> date: Sat Aug 22 21:14:25 2020 UTC
>  
>  Improve markup and punctuation concerning groups
>  
>  - They're groups, not scare-quotes-"groups"

oddly enough, this usage is probably close to what Em is meant for ;)
quoting here is just another way to add that emphasis. but i agree it
doesn;t make the text more readable.

>  - The markup for the default groups is debatable, but Cm seems closest.
>You might also like: Ql, Sy

i would prefer to use one macro rather than two. i agree Em is not
great. i would just use Dq.

>  - Parenthesized plural(s) is (are) distracting
>  

i heartily agree.

so, if no one chips in soon, i will commit your diff, but with a
straight Em->Dq replacement.

jmc

> diff cb34809c69289319bd78d14b4f5ed7d4e93b080f 
> c3c1549c9f1e94ec03820de542eaf10eaf0dc3f0
> blob - 9e6ad912b385de338033598de04f0184d015224e
> blob + 968886c1a6d4849c4362ab2d759cc72c71d125ed
> --- sbin/ifconfig/ifconfig.8
> +++ sbin/ifconfig/ifconfig.8
> @@ -238,8 +238,8 @@ transmit messages through that interface.
>  If possible, the interface will be reset to disable reception as well.
>  This action automatically disables routes using the interface.
>  .It Cm group Ar group-name
> -Assign the interface to a
> -.Dq group .
> +Assign the interface to a group.
> +The
>  .Ar group-name
>  may not be longer than 15 characters and must not end with a digit.
>  Any interface can be in multiple groups.
> @@ -254,36 +254,35 @@ Some interfaces belong to specific groups by default:
>  .Bl -dash -width Ds -compact
>  .It
>  All interfaces are members of the
> -.Em all
> +.Cm all
>  interface group.
>  .It
>  Cloned interfaces are members of their interface family group.
>  For example, a PPP interface such as
> -.Em ppp0
> +.Ql ppp0
>  is a member of the
> -.Em ppp
> +.Cm ppp
>  interface family group.
>  .It
>  .Xr pppx 4
>  interfaces are members of the
> -.Em pppx
> +.Cm pppx
>  interface group.
>  .It
> -The interface(s) the default route(s) point to are members of the
> -.Em egress
> +The interfaces the default routes point to are members of the
> +.Cm egress
>  interface group.
>  .It
>  IEEE 802.11 wireless interfaces are members of the
> -.Em wlan
> +.Cm wlan
>  interface group.
>  .It
>  Any interfaces used for network booting are members of the
> -.Em netboot
> +.Cm netboot
>  interface group.
>  .El
>  .It Cm -group Ar group-name
> -Remove the interface from the given
> -.Dq group .
> +Remove the interface from the given group.
>  .It Cm hwfeatures
>  Display the interface hardware features:
>  .Pp
> 



Re: awk: implement mktime() function

2020-08-23 Thread Jason McIntyre
On Sun, Aug 23, 2020 at 10:25:37AM -0600, Todd C. Miller wrote:
> Both gawk and mawk include mktime() in their time functions.
> We have strftime() and systime() but no mktime().  The following
> diff makes our awk more compatible with other implementations.
> 
>  - todd
> 

hi/

i think the text is fine. could you add mktime to the list of
extensions in STANDARDS too?

jmc

> Index: usr.bin/awk/awk.1
> ===
> RCS file: /cvs/src/usr.bin/awk/awk.1,v
> retrieving revision 1.56
> diff -u -p -u -r1.56 awk.1
> --- usr.bin/awk/awk.1 24 Jul 2020 01:57:06 -  1.56
> +++ usr.bin/awk/awk.1 23 Aug 2020 16:22:46 -
> @@ -684,6 +684,41 @@ This version of
>  provides the following functions for obtaining and formatting time
>  stamps.
>  .Bl -tag -width indent
> +.It Fn mktime datespec
> +Converts
> +.Fa datespec
> +into a timestamp in the same form as a value returned by
> +.Fn systime .
> +The
> +.Fa datespec
> +is a string composed of six or seven numbers separated by whitespace:
> +.Bd -literal -offset indent
> + MM DD HH MM SS [DST]
> +.Ed
> +.Pp
> +The fields in
> +.Fa datespec
> +are as follows:
> +.Bl -tag -width ""
> +.It YYY
> +Year: a four-digit year, including the century.
> +.It MM
> +Month: a number from 1 to 12.
> +.It DD
> +Day: a number from 1 to 31.
> +.It HH
> +Hour: a number from 0 to 23.
> +.It MM
> +Minute: a number from 0 to 59.
> +.It SS
> +Second: a number from 0 to 60 (permitting a leap second).
> +.It DST
> +Daylight Saving Time: a positive or zero value indicates that
> +DST is or is not in effect.
> +If DST is not specified, or is negative,
> +.Fn mktime
> +will attempt to determine the correct value.
> +.El
>  .It Fn strftime "[format [, timestamp]]"
>  Formats
>  .Ar timestamp
> @@ -696,6 +731,8 @@ manual page, as well as any arbitrary te
>  The
>  .Ar timestamp
>  must be in the same form as a value returned by
> +.Fn mktime
> +and
>  .Fn systime .
>  If
>  .Ar timestamp



Re: mdoc(7) closing macros in See also

2020-08-17 Thread Jason McIntyre
On Mon, Aug 17, 2020 at 12:33:43PM -0400, Scott Bennett wrote:
> Hi,
> 
> While learning the mdoc(7) markup language, I sometimes have trouble figuring
> out which macros are used to close certain multi-line macros. It is certainly
> not impossible to find the necessary closing macro to any arbitrary opening
> macro, but for the macros that I use less often it can be a bit of a
> scavenger hunt.
> 
> This could be much easier if the required closing macro were listed in the
> "See also" section of the opening macro. In fact, there is already a precedent
> in the Bf and Bl macros, which do list their closers (Ef and El, respectively)
> in their "See also" sections.
> 
> I think the following patch could be useful to those starting to learn the
> mdoc(7) language, or for anyone who prefers to jump right into the MACRO
> REFERENCE section.
> 
> Thanks,
> Scott Bennett
> 

hi.

the stuff you want is documented nicely in the "Physical enclosures"
part of MACRO OVERVIEW, page top.

your diff is odd in that it adds, for example, a note to Aq to see Ac,
but not Ao. anyway, i don;t think such an addition is warranted. for the
most part they're pretty logical: Aq can be expanded as Ao/Ac (so the
same initial letter, plus 'o' (open) or 'c' (closed).

jmc

> diff f7f933db8e4e532d6a39c747672ac5861ccd4883 
> ced68e3867e5e6c3d2dc26f337effe036c033d47
> blob - 7cbe1db136ad1619f26a599517c7c9b1d7e36ce8
> blob + 45935846ab15de1500fd65ccb773c8371d614bbf
> --- share/man/man7/mdoc.7
> +++ share/man/man7/mdoc.7
> @@ -677,10 +677,13 @@ Begin a block enclosed by angle brackets.
>  Does not have any head arguments.
>  This macro is almost never useful.
>  See
>  .Ic \
>  for more details.
> +.Pp
> +See also
> +.Ic \ .
>  .It Ic \
>  Inserts an apostrophe without any surrounding whitespace.
>  This is generally used as a grammatical device when referring to the verb
>  form of a function.
>  .Pp
> @@ -870,13 +873,14 @@ Examples:
> Hello   world.
>  \&.Ed
>  .Ed
>  .Pp
>  See also
> -.Ic \
> +.Ic \ ,
> +.Ic \ ,
>  and
> -.Ic \ .
> +.Ic \ .
>  .It Ic \ Fl emphasis | literal | symbolic | Cm \ | \ | \
>  Change the font mode for a scoped block of text.
>  The
>  .Fl emphasis
>  and
> @@ -921,10 +925,13 @@ macro line:
>  \&.Ek
>  .Ed
>  .Pp
>  Be careful in using over-long lines within a keep block!
>  Doing so will clobber the right margin.
> +.Pp
> +See also
> +.Ic \ .
>  .It Xo
>  .Ic \
>  .Fl Ns Ar type
>  .Op Fl width Ar val
>  .Op Fl offset Ar val
> @@ -1062,10 +1069,12 @@ Examples:
>  \&.Bo 1 ,
>  \&.Dv BUFSIZ \
>  .Ed
>  .Pp
>  See also
> +.Ic \
> +and
>  .Ic \ .
>  .It Ic \ Ar line
>  Encloses its arguments in square brackets.
>  .Pp
>  Examples:
> @@ -1095,10 +1104,12 @@ Examples:
>  \&.Bro 1 , ... ,
>  \&.Va n \
>  .Ed
>  .Pp
>  See also
> +.Ic \
> +and
>  .Ic \ .
>  .It Ic \ Ar line
>  Encloses its arguments in curly braces.
>  .Pp
>  Examples:
> @@ -1275,10 +1286,12 @@ April is the cruellest month
>  \&.Dc
>  \e(em T.S. Eliot
>  .Ed
>  .Pp
>  See also
> +.Ic \
> +and
>  .Ic \ .
>  .It Ic \ Ar line
>  Encloses its arguments in
>  .Dq typographic
>  double-quotes.
> @@ -1470,10 +1483,13 @@ An arbitrary enclosure.
>  The
>  .Ar opening_delimiter
>  argument is used as the enclosure head, for example, specifying \e(lq
>  will emulate
>  .Ic \ .
> +.Pp
> +See also
> +.Ic \ .
>  .It Ic \ Ar identifier ...
>  Error constants for definitions of the
>  .Va errno
>  libc global variable.
>  This is most often used in section 2 and 3 manual pages.
> @@ -2016,10 +2032,13 @@ Examples:
>  .Bd -literal -offset indent -compact
>  \&.Oo
>  \&.Op Fl flag Ns Ar value
>  \&.Oc
>  .Ed
> +.Pp
> +See also
> +.Ic \ .
>  .It Ic \ Ar line
>  Optional part of a command line.
>  Prints the argument(s) in brackets.
>  This is most often used in the
>  .Em SYNOPSIS
> @@ -2127,10 +2146,13 @@ See also
>  and
>  .Ic \ .
>  .It Ic \ Ar block
>  Multi-line version of
>  .Ic \ .
> +.Pp
> +See also
> +.Ic \ .
>  .It Ic \
>  Break a paragraph.
>  This will assert vertical space between prior and subsequent macros
>  and/or text.
>  .Pp
> @@ -2164,10 +2186,13 @@ and
>  .Ic \
>  .Fl literal .
>  .It Ic \ Ar block
>  Multi-line version of
>  .Ic \ .
> +.Pp
> +See also
> +.Ic \ .
>  .It Ic \ Ar line
>  Encloses its arguments in
>  .Qq typewriter
>  double-quotes.
>  Consider using
> @@ -2221,10 +2246,13 @@ Examples:
>  If an
>  .Ic \
>  block is used within a SEE ALSO section, a vertical space is asserted
>  before the rendered output, else the block continues on the current
>  line.
> +.Pp
> +See also
> +.Ic \ .
>  .It Ic \ Fl std Op Ar function ...
>  Insert a standard sentence regarding a function call's return value of 0
>  on success and \-1 on error, with the
>  .Va errno
>  libc global variable set on error.
> @@ -2277,10 +2305,13 @@ When called without an argument, the
>  macro toggles the spacing mode.
>  Using this is not recommended because it makes the code harder to read.
>  .It Ic \ Ar block
>  Multi-line version of
>  .Ic \ .
> +.Pp
> +See 

Re: man find -exec -- a little bit more hand-holding

2020-08-14 Thread Jason McIntyre
On Fri, Aug 14, 2020 at 09:24:35AM -0600, Theo de Raadt wrote:
> Christian Weisgerber  wrote:
> 
> > On 2020-08-14, Jason McIntyre  wrote:
> > 
> > > - i cannot work out what is with the \! examples. i know we try to make
> > >   entries work for both csh and sh style shells, but stuff like this
> > >   works without escaping:
> > >
> > >   $ find . ! -type f
> > 
> > Going through the CVS and SCCS history, I see that the examples
> > came with a rewrite of find(1) at Berkeley 30 years ago.
> > 
> > csh's behavior that "for convenience, a `!' is passed unchanged
> > when it is followed by a blank, tab, newline, `=' or `('" has been
> > documented as such at least since the start of the CSRG repository
> > in 1985.
> > 
> > bash, whose history substitution was modeled on csh, also shares
> > this behavior.
> > 
> > I think it was never necessary to escape the '!' and the man page
> > examples were written with an abundance of caution and a lack of
> > understanding of csh's exact replacement mechanism.
> 
> Yep, so I think that particular escape should be deleted.
> 

done.
jmc



Re: man find -exec -- a little bit more hand-holding

2020-08-14 Thread Jason McIntyre
On Fri, Aug 14, 2020 at 04:30:13AM +0100, ropers wrote:
> The find man page might benefit from adding a little bit more
> user-friendly hand-holding here:
> 
> Index: find.1
> ===
> RCS file: /cvs/src/usr.bin/find/find.1,v
> retrieving revision 1.98
> diff -u -r1.98 find.1
> --- find.12 Sep 2019 21:18:41 -   1.98
> +++ find.114 Aug 2020 02:59:48 -
> @@ -231,6 +231,10 @@
>  .Qq {}
>  appears anywhere in the utility name or the
>  arguments it is replaced by the pathname of the current file.
> +The semicolon will likely have to be escaped, depending on the shell.
> +See
> +.Sx CAVEATS
> +below.
>  .Pp
>  If terminated by a plus sign,
>  the pathnames for which the
> 
> 
> EXAMPLE:
> 
> $ find ~ -iname ".*" -exec echo {} \;
> works, but
> $ find ~ -iname ".*" -exec echo {} ;
> does not.
> 
> (Yes, this is a contrived example.  I wouldn't want to make people
> copy things all over the place.)
> 

hi.

first off, i do sympathise ;) shell escaping always hurts my head too.

regarding your diff: i don;t think this is the way to go. really, we
would have to add such a text every time we encounter a character that
may need escaping. so the whole point of the text in CAVEATS in to avoid
such a large text addition, and just remind people to watch out
(caveat!) the text in CAVEATS pretty much makes your diff redundant.

the EXAMPLES section additionally shows escaping.

i think there's enough there for people.

havng said that:

- i had hoped we'd have a specific \; example. that format is so
  commonly seen that it might make sense. so i'd not be against either
  adding such an example (currently EXAMPLES is fairly small) or
  altering another.

- i cannot work out what is with the \! examples. i know we try to make
  entries work for both csh and sh style shells, but stuff like this
  works without escaping:

$ find . ! -type f

jmc



Re: describe 'idle-timeout' exception in npppd.conf man page

2020-08-07 Thread Jason McIntyre
On Fri, Aug 07, 2020 at 11:56:09PM +0300, Vitaliy Makkoveev wrote:
> On Fri, Aug 07, 2020 at 09:29:13PM +0100, Jason McIntyre wrote:
> > On Fri, Aug 07, 2020 at 10:19:05PM +0300, Vitaliy Makkoveev wrote:
> > > Some times ago we disabled in-kernel timeout for pppx(4) related
> > > pipex(4) sessions. We did this for prevent use after free issue caused
> > > by pipex_timer [1]. By default "idle-timeout" is not set in
> > > npppd.conf(5) and I guess this is reason for we forgot to describe this
> > > exception in npppd.conf(5).
> > > 
> > > But looks like one user caught this [2]. So I propose to describe this
> > > in BUGS section of npppd.conf(5).
> > > 
> > > Also current "idle-timeout" description looks incorrect. If this option
> > > is missing, there is not in-kernel timeout for this session, but
> > > npppd(8) uses it's own timeout for. And we can't configure this value.
> > > 
> > > YASUOKA, what do you think? May be we can kill in-kernel timeout feature
> > > for pipex(4)?, and make npppd(8)'s idle timeout configurable by this
> > > option?
> > > 
> > > 1. 
> > > https://cvsweb.openbsd.org/src/sys/net/if_pppx.c?rev=1.78=text/x-cvsweb-markup
> > > 2. https://marc.info/?l=openbsd-misc=159655468504864=2 
> > > 
> > > 
> > > Index: usr.sbin/npppd/npppd/npppd.conf.5
> > > ===
> > > RCS file: /cvs/src/usr.sbin/npppd/npppd/npppd.conf.5,v
> > > retrieving revision 1.27
> > > diff -u -p -r1.27 npppd.conf.5
> > > --- usr.sbin/npppd/npppd/npppd.conf.5 23 Apr 2020 21:10:54 -  
> > > 1.27
> > > +++ usr.sbin/npppd/npppd/npppd.conf.5 7 Aug 2020 19:17:00 -
> > > @@ -699,3 +699,9 @@ The current version of
> > >  .Xr npppd 8
> > >  does not support adding or removing tunnel settings or changing listener
> > >  settings (listen address, port and l2tp-ipsec-require).
> > > +.Pp
> > > +This time
> > > +.Xr pppx 4
> > > +does not allow to create sessions with non null
> > > +.Ic idle-timeout
> > > +option. 
> > > 
> > 
> 
> Thanks for your feedback. My English is bad, so thanks for fixing.
> 
> > is this an actual bug? i'm just asking - it might be that the
> > idle-timeout text is the best place to warn users, and not BUGS.
> 
> It is pppx(4) related bug. Unfortunately it wasn't solved and we just
> disabled this feature to avoid panics. May be pipex(4) man page is the
> best place to describe this issue in BUGS section.
> 
> > 
> > regarding your text:
> > 
> > - "this time" is better written as "At this time" or "currently".
> > - "allow to create" is not good sentence structure
> > 
> > i think the text would read better something like:
> > 
> > .Xr pppx 4
> > does not allow sessions with
> > .Ic idle-timeout
> > set to any value other than 0.
> > 
> 
> I added this to pipex(4) BUGS section.
> 
> > if the text was better placed in the idle-timeout section:
> > 
> > This value must be 0 for
> > .Xr pppx 4
> > sessions.
> 
> And this to npppd.conf(5) idle-timeout section.
> 

i think that's fine.
jmc

> 
> Index: share/man/man4/pipex.4
> ===
> RCS file: /cvs/src/share/man/man4/pipex.4,v
> retrieving revision 1.12
> diff -u -p -r1.12 pipex.4
> --- share/man/man4/pipex.43 Apr 2020 07:46:04 -   1.12
> +++ share/man/man4/pipex.47 Aug 2020 20:54:32 -
> @@ -288,3 +288,8 @@ The
>  .Nm
>  was written by
>  .An Internet Initiative Japan Inc .
> +.Sh BUGS
> +.Xr pppx 4
> +does not allow sessions with
> +.Ic pr_timeout_sec
> +set to any value other than 0.
> Index: usr.sbin/npppd/npppd/npppd.conf.5
> ===
> RCS file: /cvs/src/usr.sbin/npppd/npppd/npppd.conf.5,v
> retrieving revision 1.27
> diff -u -p -r1.27 npppd.conf.5
> --- usr.sbin/npppd/npppd/npppd.conf.5 23 Apr 2020 21:10:54 -  1.27
> +++ usr.sbin/npppd/npppd/npppd.conf.5 7 Aug 2020 20:54:32 -
> @@ -325,6 +325,9 @@ The link is disconnected if there are no
>  for more than the amount of the
>  .Ar idle-timeout .
>  The default is 0, which disables the idle timer.
> +This value must be 0 for
> +.Xr pppx 4
> +sessions.
>  .It Ic tcp-mss-adjust Ar yes | no
>  If
>  .Dq yes
> 



Re: describe 'idle-timeout' exception in npppd.conf man page

2020-08-07 Thread Jason McIntyre
On Fri, Aug 07, 2020 at 10:19:05PM +0300, Vitaliy Makkoveev wrote:
> Some times ago we disabled in-kernel timeout for pppx(4) related
> pipex(4) sessions. We did this for prevent use after free issue caused
> by pipex_timer [1]. By default "idle-timeout" is not set in
> npppd.conf(5) and I guess this is reason for we forgot to describe this
> exception in npppd.conf(5).
> 
> But looks like one user caught this [2]. So I propose to describe this
> in BUGS section of npppd.conf(5).
> 
> Also current "idle-timeout" description looks incorrect. If this option
> is missing, there is not in-kernel timeout for this session, but
> npppd(8) uses it's own timeout for. And we can't configure this value.
> 
> YASUOKA, what do you think? May be we can kill in-kernel timeout feature
> for pipex(4)?, and make npppd(8)'s idle timeout configurable by this
> option?
> 
> 1. 
> https://cvsweb.openbsd.org/src/sys/net/if_pppx.c?rev=1.78=text/x-cvsweb-markup
> 2. https://marc.info/?l=openbsd-misc=159655468504864=2 
> 
> 
> Index: usr.sbin/npppd/npppd/npppd.conf.5
> ===
> RCS file: /cvs/src/usr.sbin/npppd/npppd/npppd.conf.5,v
> retrieving revision 1.27
> diff -u -p -r1.27 npppd.conf.5
> --- usr.sbin/npppd/npppd/npppd.conf.5 23 Apr 2020 21:10:54 -  1.27
> +++ usr.sbin/npppd/npppd/npppd.conf.5 7 Aug 2020 19:17:00 -
> @@ -699,3 +699,9 @@ The current version of
>  .Xr npppd 8
>  does not support adding or removing tunnel settings or changing listener
>  settings (listen address, port and l2tp-ipsec-require).
> +.Pp
> +This time
> +.Xr pppx 4
> +does not allow to create sessions with non null
> +.Ic idle-timeout
> +option. 
> 

is this an actual bug? i'm just asking - it might be that the
idle-timeout text is the best place to warn users, and not BUGS.

regarding your text:

- "this time" is better written as "At this time" or "currently".
- "allow to create" is not good sentence structure

i think the text would read better something like:

.Xr pppx 4
does not allow sessions with
.Ic idle-timeout
set to any value other than 0.

if the text was better placed in the idle-timeout section:

This value must be 0 for
.Xr pppx 4
sessions.

jmc



Re: tpmr.4, ifconfig.8: document tpmr ioctls and synopsis

2020-08-05 Thread Jason McIntyre
On Wed, Aug 05, 2020 at 09:03:20AM +0200, Klemens Nanni wrote:
> Add missing TPMR section to ifconfig(8) by moving the commands from
> the driver's manual to it (copy/paste) and document the ioctl(2)
> interface in tpmr(4).
> 
> Feedback? OK?
> 
> 

this is in line with all our other pages, so ok. while you're poking
around in there, the first example in tpmr.4 EXAMPLES would be a whole
lot nicer with -indent on the display. care to fix that too?

thanks,
jmc

> Index: sbin/ifconfig/ifconfig.8
> ===
> RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
> retrieving revision 1.353
> diff -u -p -r1.353 ifconfig.8
> --- sbin/ifconfig/ifconfig.8  26 Jul 2020 18:34:10 -  1.353
> +++ sbin/ifconfig/ifconfig.8  5 Aug 2020 06:48:38 -
> @@ -204,6 +204,7 @@ At least the following devices can be cr
>  .Xr svlan 4 ,
>  .Xr switch 4 ,
>  .Xr tap 4 ,
> +.Xr tpmr 4 ,
>  .Xr trunk 4 ,
>  .Xr tun 4 ,
>  .Xr vether 4 ,
> @@ -830,6 +831,51 @@ If
>  is set to zero, then entries will not be expired.
>  .It Cm up
>  Start the bridge forwarding packets.
> +.El
> +.Sh TPMR
> +.nr nS 1
> +.Bk -words
> +.Nm ifconfig
> +.Ar tpmr-interface
> +.Op Cm add Ar child-iface
> +.Op Cm del Ar child-iface
> +.Op Oo Fl Oc Ns Cm link0
> +.Op Oo Fl Oc Ns Cm link1
> +.Op Oo Fl Oc Ns Cm link2
> +.Ek
> +The following options are available for a
> +.Xr tpmr 4
> +interface:
> +.Bl -tag -width Ds
> +.It Cm add Ar child-iface
> +Add
> +.Ar child-iface
> +as a member.
> +.It Cm del Ar child-iface
> +Remove the member
> +.Ar child-iface .
> +.It Cm link0
> +Disable the filtering of Ethernet frames destined for the TPMR
> +component reserved addresses, as specified by IEEE 802.1Q.
> +.It Cm -link0
> +Enable the filtering of Ethernet frames destined for the TPMR
> +component reserved addresses, as specified by IEEE 802.1Q.
> +This is the default.
> +.It Cm link1
> +Disable the filtering of IPv4 and IPv6 packets with
> +.Xr pf 4 .
> +.It Cm -link1
> +Enable the filtering of IPv4 and IPv6 packets with
> +.Xr pf 4 .
> +Packets will appear to enter or leave the member port interfaces.
> +This is the default.
> +.It Cm link2
> +Disable the filtering of 802.1Q VLAN and QinQ SVLAN packets.
> +.It Cm -link2
> +Enable the filtering of 802.1Q VLAN and QinQ SVLAN packets.
> +.Xr pf 4 .
> +Packets will appear to enter or leave the member port interfaces.
> +This is the default.
>  .El
>  .Sh CARP
>  .nr nS 1
> Index: share/man/man4/tpmr.4
> ===
> RCS file: /cvs/src/share/man/man4/tpmr.4,v
> retrieving revision 1.6
> diff -u -p -r1.6 tpmr.4
> --- share/man/man4/tpmr.4 22 Jul 2020 04:08:46 -  1.6
> +++ share/man/man4/tpmr.4 5 Aug 2020 06:58:58 -
> @@ -40,48 +40,6 @@ command or by setting up a
>  .Xr hostname.if 5
>  configuration file for
>  .Xr netstart 8 .
> -The interface itself can be configured with
> -.Xr ifconfig 8 ;
> -see its manual page for more information.
> -.Pp
> -.Nm
> -interfaces may be configured with
> -.Xr ifconfig 8
> -and
> -.Xr netstart 8
> -using the following options:
> -.Bl -tag -width Ds
> -.It Cm add Ar child-iface
> -Add
> -.Ar child-iface
> -as a member.
> -.It Cm del Ar child-iface
> -Remove the member
> -.Ar child-iface .
> -.It Cm link0
> -Disable the filtering of Ethernet frames destined for the TPMR
> -component reserved addresses, as specified by IEEE 802.1Q.
> -.It Cm -link0
> -Enable the filtering of Ethernet frames destined for the TPMR
> -component reserved addresses, as specified by IEEE 802.1Q.
> -This is the default.
> -.It Cm link1
> -Disable the filtering of IPv4 and IPv6 packets with
> -.Xr pf 4 .
> -.It Cm -link1
> -Enable the filtering of IPv4 and IPv6 packets with
> -.Xr pf 4 .
> -Packets will appear to enter or leave the member port interfaces.
> -This is the default.
> -.It Cm link2
> -Disable the filtering of 802.1Q VLAN and QinQ SVLAN packets.
> -.It Cm -link2
> -Enable the filtering of 802.1Q VLAN and QinQ SVLAN packets.
> -.Xr pf 4 .
> -Packets will appear to enter or leave the member port interfaces.
> -This is the default.
> -.El
> -.\" document the ioctls?
>  .Pp
>  Other forms of Ethernet bridging are available using the
>  .Xr bridge 4
> @@ -92,6 +50,20 @@ using the
>  and
>  .Xr trunk 4
>  drivers.
> +.Sh IOCTLS
> +The following
> +.Xr ioctl 2
> +calls and their structures are commonly use by
> +.Nm
> +and
> +.Xr bridge 4 :
> +.Pp
> +.Bl -bullet -offset indent -compact
> +.It
> +.Dv SIOCBRDGADD
> +.It
> +.Dv SIOCBRDGDEL
> +.El
>  .Sh EXAMPLES
>  .Nm
>  can be used to cross-connect Ethernet devices that support different
> 



Re: ksh.1: Mention Co-processes in $!

2020-08-01 Thread Jason McIntyre
On Sat, Aug 01, 2020 at 07:30:55PM +0200, Klemens Nanni wrote:
> On Sat, Aug 01, 2020 at 06:06:32PM +0100, Jason McIntyre wrote:
> > hmm. so then the current text ("the last background process") already
> > covers all these cases. why single out co-processes?
> Yes, "background process" technically covers co-processes, but at least
> for me "background processes" aka. jobs refer to those spawned with `&'
> where co-processes are the definitive term for those spawned with `|&',
> hence my brain wants to grep for "co-proc" and see `$!' mentioning it
> to confirm that `$!' is indeed not just about jobs.
> 
> > for the reader, i think the idea of background is easier to understand
> > as an umberella term, rather than asynchronous, even if it's maybe not
> > so correct.
> Fair enough;  I think the last diff is a slight improvement due to the
> above mentioned, but I also don't have a strong opinion about it.
> 
> If the impression is that I'm complicating stuff then I'll gladly drop
> the diff.
> 

well, maybe someone else will chip in. but i don;t see it as an
improvement myself.

jmc



Re: ksh.1: Mention Co-processes in $!

2020-08-01 Thread Jason McIntyre
On Sat, Aug 01, 2020 at 06:59:43PM +0200, Klemens Nanni wrote:
> On Sat, Aug 01, 2020 at 05:40:07PM +0100, Jason McIntyre wrote:
> > i'm worried that you're blurring the distinction between asynchronous
> > and co-process for the reader. i think that's relevant because, as you
> > say, a page like sh(1) does not document co-processes, whereas ksh(1)
> > does.
> You raise a valid point.
> 
> > as i understand it, ksh explains co-processes as a type of asynchronous
> > process. and the setting of "!" is applicable to both. is that right?
> Correct.  Both background jobs (`&') and co-processes (`|&') are
> asynchronous and co-processes are background jobs by definition.
> 
> What makes co-processes different is a two-way pipe between them and
> the shell, i.e. you can read and write in both directions.
> 
> > so could your text be better written as:
> > 
> > Process ID of the last background or asynchronous process started.
> > If no processes have been started, the parameter is not set.
> > 
> > this would catch the setting of "!" for both async and co-process,
> > without making the text read like the two are identical.
> > 
> > if your concern is that you need to be able to /co-process, then i'd
> > rewrite the text to not blur the two:
> > 
> > Process ID of the last background, co-process, or asynchronous
> > process started.
> > 
> > but i dislike that, because it means the text suffers because of an
> > arbitrary request to make a specific search work.
> Indeed, I'd like to have `/co-process' show it.
> 
> > i guess we could add a note to the "Some notes concerning co-processes"
> > section if it needs more clarity.
> I don't think this is needed.
> 
> Background jobs as well as co-processes are async and background jobs or
> rather `&' is documented as "asynchronous command" in other places of
> the manual, so how about this?
> 

hmm. so then the current text ("the last background process") already
covers all these cases. why single out co-processes?

for the reader, i think the idea of background is easier to understand
as an umberella term, rather than asynchronous, even if it's maybe not
so correct.

either you or i have trimmed your original mail, explaining why
this was important ;)

jmc

> 
> Index: ksh.1
> ===
> RCS file: /cvs/src/bin/ksh/ksh.1,v
> retrieving revision 1.209
> diff -u -p -r1.209 ksh.1
> --- ksh.1 7 Jul 2020 10:33:58 -   1.209
> +++ ksh.1 1 Aug 2020 16:59:10 -
> @@ -1247,8 +1247,8 @@ The following special parameters are imp
>  set directly using assignments:
>  .Bl -tag -width "1 ... 9"
>  .It Ev \&!
> -Process ID of the last background process started.
> -If no background processes have been started, the parameter is not set.
> +Process ID of the last background process or co-process started.
> +If no asynchronous processes have been started, the parameter is not set.
>  .It Ev \

Re: ksh.1: Mention Co-processes in $!

2020-08-01 Thread Jason McIntyre
On Sat, Aug 01, 2020 at 05:57:01PM +0200, Klemens Nanni wrote:
> Otherwise it is not clear whether $! will be set or not.  This way,
> `/Co-proc' brings me to *all* relevant spots in the manual.
> 
> Snippet to demonstrate how $! is set for an asynchronous process:
> 
>   $ ksh -c ': |& echo $!' 
>   67163
> 
> FWIW, sh(1) doesn't document Co-processes (whis is fine/correct) and
> bash(1) says this about $!:
> 
>   !  Expands to the process ID of the job most recently placed into
>  the background, whether executed as an asynchronous command or
>  using the bg builtin (see JOB CONTROL below).
> 
> Feedback? OK?
> 
> 
> Index: ksh.1
> ===
> RCS file: /cvs/src/bin/ksh/ksh.1,v
> retrieving revision 1.209
> diff -u -p -r1.209 ksh.1
> --- ksh.1 7 Jul 2020 10:33:58 -   1.209
> +++ ksh.1 1 Aug 2020 15:50:04 -
> @@ -1247,8 +1247,9 @@ The following special parameters are imp
>  set directly using assignments:
>  .Bl -tag -width "1 ... 9"
>  .It Ev \&!
> -Process ID of the last background process started.
> -If no background processes have been started, the parameter is not set.
> +Process ID of the last background process or asynchronous process 
> (Co-process)
> +started.
> +If no processes have been started, the parameter is not set.
>  .It Ev 

Re: VFS vgone(l) manpage vs. code

2020-07-29 Thread Jason McIntyre
On Wed, Jul 29, 2020 at 11:37:03AM +, Schreilechner, Dominik wrote:
> Hi,
> 
> I noticed, that the description of vgone/vgonel in the manpage does not match 
> the code.
> The manpage (https://man.openbsd.org/vgone) states:
> The difference between vgone() and vgonel() is that vgone() locks the vnode 
> interlock and then calls vgonel() while vgonel() expects the interlock to 
> already be locked.
> 
> However, vgone simply calls vgonel with curproc (see vfs_subr.c).
> void
> vgone(struct vnode *vp)
> {
> struct proc *p = curproc;
> vgonel(vp, p);
> }
> 
> Best regards,
> Dominik
> 

hi.

it would be easier to get things improved if you attached a diff
describing what you think is correct. even failing a diff, a piece of
text saying what you think it should be would increase your chances.

jmc



Re: acpicpu(4) and ACPI0007

2020-07-28 Thread Jason McIntyre
On Tue, Jul 28, 2020 at 11:12:21AM +0200, Mark Kettenis wrote:
> > Date: Tue, 28 Jul 2020 13:46:34 +1000
> > From: Jonathan Matthew 
> > 
> > On Mon, Jul 27, 2020 at 05:16:47PM +0200, Mark Kettenis wrote:
> > > > Date: Mon, 27 Jul 2020 17:02:41 +0200 (CEST)
> > > > From: Mark Kettenis 
> > > > 
> > > > Recent ACPI versions have deprecated "Processor()" nodes in favout of
> > > > "Device()" nodes with a _HID() method that returns "ACPI0007".  This
> > > > diff tries to support machines with firmware that implements this.  If
> > > > you see something like:
> > > > 
> > > >   "ACPI0007" at acpi0 not configured
> > > > 
> > > > please try the following diff and report back with an updated dmesg.
> > > > 
> > > > Cheers,
> > > > 
> > > > Mark
> > > 
> > > And now with the right diff...
> > 
> > On a dell r6415, it looks like this:
> > 
> > acpicpu0 at acpi0copyvalue: 6: C1(@1 halt!)
> > all the way up to
> > acpicpu127 at acpi0copyvalue: 6: no cpu matching ACPI ID 127
> > 
> > which I guess means aml_copyvalue() needs to learn how to copy 
> > AML_OBJTYPE_DEVICE.
> 
> Yes.  It is not immediately obvious how this should work.  Do we need
> to copy the aml_node pointer or not?  We don't do that for
> AML_OBJTYPE_PROCESSOR and AML_OBJTYPE_POWERRSRC types which are
> similar to AML_OBJTYPE_DEVICE.  But AML_OBJTYPE_DEVICE object don't
> carry any additional information.  So we end up with just an empty
> case to avoid the warning.
> 
> Does this work on the Dell machines?
> 
> 
> Index: dev/acpi/dsdt.c
> ===
> RCS file: /cvs/src/sys/dev/acpi/dsdt.c,v
> retrieving revision 1.252
> diff -u -p -r1.252 dsdt.c
> --- dev/acpi/dsdt.c   21 Jul 2020 03:48:06 -  1.252
> +++ dev/acpi/dsdt.c   28 Jul 2020 09:04:15 -
> @@ -996,6 +996,8 @@ aml_copyvalue(struct aml_value *lhs, str
>   lhs->v_objref = rhs->v_objref;
>   aml_addref(lhs->v_objref.ref, "");
>   break;
> + case AML_OBJTYPE_DEVICE:
> + break;
>   default:
>   printf("copyvalue: %x", rhs->type);
>   break;
> 

morning. it displays this here:

acpicpu0 at acpi0: C3(0@350 io@0x415), C2(0@400 io@0x414), C1(0@1 
mwait), PSS
acpicpu1 at acpi0: C3(0@350 io@0x415), C2(0@400 io@0x414), C1(0@1 
mwait), PSS
acpicpu2 at acpi0: C3(0@350 io@0x415), C2(0@400 io@0x414), C1(0@1 
mwait), PSS
acpicpu3 at acpi0: C3(0@350 io@0x415), C2(0@400 io@0x414), C1(0@1 
mwait), PSS
acpicpu4 at acpi0: C3(0@350 io@0x415), C2(0@400 io@0x414), C1(0@1 
mwait), PSS
acpicpu5 at acpi0: C3(0@350 io@0x415), C2(0@400 io@0x414), C1(0@1 
mwait), PSS
acpicpu6 at acpi0: C3(0@350 io@0x415), C2(0@400 io@0x414), C1(0@1 
mwait), PSS
acpicpu7 at acpi0: C3(0@350 io@0x415), C2(0@400 io@0x414), C1(0@1 
mwait), PSS
acpicpu8 at acpi0: no cpu matching ACPI ID 8
acpicpu9 at acpi0: no cpu matching ACPI ID 9
acpicpu10 at acpi0: no cpu matching ACPI ID 10
acpicpu11 at acpi0: no cpu matching ACPI ID 11
acpicpu12 at acpi0: no cpu matching ACPI ID 12
acpicpu13 at acpi0: no cpu matching ACPI ID 13
acpicpu14 at acpi0: no cpu matching ACPI ID 14
acpicpu15 at acpi0: no cpu matching ACPI ID 15

jmc

OpenBSD 6.7-current (GENERIC.MP) #3: Tue Jul 28 10:59:50 BST 2020
jmc@kansas:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 7895654400 (7529MB)
avail mem = 7641284608 (7287MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.2 @ 0xca707000 (77 entries)
bios0: vendor Dell Inc. version "1.1.0" date 05/27/2020
bios0: Dell Inc. Inspiron 5505
acpi0 at bios0: ACPI 5.0Undefined scope: \\_SB_.PCI0.LPC0.EC0_

acpi0: sleep states S0 S4 S5
acpi0: tables DSDT FACP UEFI SSDT IVRS SSDT TPM2 MSDM ASF! BOOT HPET APIC MCFG 
SLIC SSDT WSMT VFCT SSDT SSDT CRAT CDIT SSDT SSDT SSDT SSDT FPDT SSDT SSDT SSDT 
SSDT SSDT SSDT SSDT BGRT
acpi0: wakeup devices GP17(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpihpet0 at acpi0: 14318180 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Ryzen 7 4700U with Radeon Graphics, 1996.48 MHz, 17-60-01
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,PQM,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,SHA,UMIP,IBPB,IBRS,STIBP,SSBD,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu0: 32KB 64b/line 8-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 
8-way L2 cache, 8MB 64b/line disabled L3 cache
cpu0: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative
cpu0: DTLB 64 4KB entries fully associative, 

Re: acpicpu(4) and ACPI0007

2020-07-27 Thread Jason McIntyre
On Mon, Jul 27, 2020 at 05:16:47PM +0200, Mark Kettenis wrote:
> > Date: Mon, 27 Jul 2020 17:02:41 +0200 (CEST)
> > From: Mark Kettenis 
> > 
> > Recent ACPI versions have deprecated "Processor()" nodes in favout of
> > "Device()" nodes with a _HID() method that returns "ACPI0007".  This
> > diff tries to support machines with firmware that implements this.  If
> > you see something like:
> > 
> >   "ACPI0007" at acpi0 not configured
> > 
> > please try the following diff and report back with an updated dmesg.
> > 
> > Cheers,
> > 
> > Mark
> 
> And now with the right diff...
> 
> 

hi. i'm not sure if the output is correct, but it does look like the cpu
is adjustable with this:

cpu0: 1996 MHz: speeds: 2000 1700 1400 MHz

this part looks weird:

acpicpu0 at acpi0copyvalue: 6: C3(0@350 io@0x415), C2(0@400 io@0x414), C1(0@1 
mwait), PSS
acpicpu1 at acpi0copyvalue: 6: C3(0@350 io@0x415), C2(0@400 io@0x414), C1(0@1 
mwait), PSS
acpicpu2 at acpi0copyvalue: 6: C3(0@350 io@0x415), C2(0@400 io@0x414), C1(0@1 
mwait), PSS
acpicpu3 at acpi0copyvalue: 6: C3(0@350 io@0x415), C2(0@400 io@0x414), C1(0@1 
mwait), PSS
acpicpu4 at acpi0copyvalue: 6: C3(0@350 io@0x415), C2(0@400 io@0x414), C1(0@1 
mwait), PSS
acpicpu5 at acpi0copyvalue: 6: C3(0@350 io@0x415), C2(0@400 io@0x414), C1(0@1 
mwait), PSS
acpicpu6 at acpi0copyvalue: 6: C3(0@350 io@0x415), C2(0@400 io@0x414), C1(0@1 
mwait), PSS
acpicpu7 at acpi0copyvalue: 6: C3(0@350 io@0x415), C2(0@400 io@0x414), C1(0@1 
mwait), PSS
acpicpu8 at acpi0copyvalue: 6: no cpu matching ACPI ID 8
acpicpu9 at acpi0copyvalue: 6: no cpu matching ACPI ID 9
acpicpu10 at acpi0copyvalue: 6: no cpu matching ACPI ID 10
acpicpu11 at acpi0copyvalue: 6: no cpu matching ACPI ID 11
acpicpu12 at acpi0copyvalue: 6: no cpu matching ACPI ID 12
acpicpu13 at acpi0copyvalue: 6: no cpu matching ACPI ID 13
acpicpu14 at acpi0copyvalue: 6: no cpu matching ACPI ID 14
acpicpu15 at acpi0copyvalue: 6: no cpu matching ACPI ID 15

full dmesg below.
jmc

OpenBSD 6.7-current (GENERIC.MP) #2: Mon Jul 27 16:18:30 BST 2020
jmc@kansas:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 7895654400 (7529MB)
avail mem = 7641284608 (7287MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.2 @ 0xca707000 (77 entries)
bios0: vendor Dell Inc. version "1.1.0" date 05/27/2020
bios0: Dell Inc. Inspiron 5505
acpi0 at bios0: ACPI 5.0Undefined scope: \\_SB_.PCI0.LPC0.EC0_

acpi0: sleep states S0 S4 S5
acpi0: tables DSDT FACP UEFI SSDT IVRS SSDT TPM2 MSDM ASF! BOOT HPET APIC MCFG 
SLIC SSDT WSMT VFCT SSDT SSDT CRAT CDIT SSDT SSDT SSDT SSDT FPDT SSDT SSDT SSDT 
SSDT SSDT SSDT SSDT BGRT
acpi0: wakeup devices GP17(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpihpet0 at acpi0: 14318180 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Ryzen 7 4700U with Radeon Graphics, 1996.53 MHz, 17-60-01
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,PQM,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,SHA,UMIP,IBPB,IBRS,STIBP,SSBD,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu0: 32KB 64b/line 8-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 
8-way L2 cache, 8MB 64b/line disabled L3 cache
cpu0: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative
cpu0: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Ryzen 7 4700U with Radeon Graphics, 1996.25 MHz, 17-60-01
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,PQM,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,SHA,UMIP,IBPB,IBRS,STIBP,SSBD,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu1: 32KB 64b/line 8-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 
8-way L2 cache, 8MB 64b/line disabled L3 cache
cpu1: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative
cpu1: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: AMD Ryzen 7 4700U with Radeon Graphics, 1996.25 MHz, 17-60-01
cpu2: 

Re: ifconfig.8: document aggr(4) under TRUNK

2020-07-26 Thread Jason McIntyre
On Sun, Jul 26, 2020 at 07:33:55PM +0200, Klemens Nanni wrote:
> Except for `trunkproto' wich his trunk(4) specific, aggr(4) has the same
> options so I'd like to merge it into the same section just like TUNNEL
> documents mostly identical interfaces with differences mentioned in at
> specific options.
> 
> The wording "trunk" seems clear under OpenBSD, but other vendors give it
> a different meaning (e.g. Cisco), so I slightly enhanced the section
> name as well.
> 
> Feedback? Objections? OK?
> 

certainly ok by me. i think this commit could add aggr to the list of
devices in "create".

> Another thing: Note that `lacpmode' and `lacptimeout' are missing from
> the existing TRUNK synopsis - I hesitate to add them because it feels
> like too much duplication.  Would it perhaps be worthwile to drop each
> interface type section's synopsis all together?  Most options are under
> DESCRIPTION and the second biggest section is BRIDGE which does not have
> a synopsis, either.  Less seems more here.
> 
> If at all, this seems best handled in a different commit.
> 

bridge is a bit different i think. i wouldn;t like to have those
synopses dropped because i think they're useful. but bridge was
basically an entire, large, manpage that got shoehorned into ifconfig.8.

jmc

> NB: At least tpmr(4) is missing as well, which I'll handle soon as well.
> 
> 
> Index: ifconfig.8
> ===
> RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
> retrieving revision 1.352
> diff -u -p -r1.352 ifconfig.8
> --- ifconfig.827 Jun 2020 17:46:29 -  1.352
> +++ ifconfig.826 Jul 2020 17:22:24 -
> @@ -1759,15 +1759,17 @@ from all protected domains.
>  .It Cm up
>  Start the switch processing packets.
>  .El
> -.Sh TRUNK
> +.Sh TRUNK (LINK AGGREGATION)
>  .Nm ifconfig
>  .Ar trunk-interface
>  .Op Oo Fl Oc Ns Cm trunkport Ar child-iface
>  .Op Cm trunkproto Ar proto
>  .Pp
> -The following options are available for a
> +The following options are available for
> +.Xr aggr 4
> +and
>  .Xr trunk 4
> -interface:
> +interfaces:
>  .Bl -tag -width Ds
>  .It Cm lacpmode Cm active Ns | Ns Cm passive
>  Set the LACP trunk mode to either
> @@ -1787,7 +1789,9 @@ as a trunk port.
>  Remove the trunk port
>  .Ar child-iface .
>  .It Cm trunkproto Ar proto
> -Set the trunk protocol.
> +Set the link aggregation protocol on
> +.Xr trunk 4
> +interfaces.
>  Refer to
>  .Xr trunk 4
>  for a complete list of the available protocols.
> 



Re: top: add / as alias for g (grep)

2020-07-23 Thread Jason McIntyre
On Thu, Jul 23, 2020 at 10:04:24PM +0200, Klemens Nanni wrote:
> I've somehow hit the slash way to often for searching a particular
> command, would anyone object if I added it as a command character?
> 
> While here, what's up with the weird markup in top.1 for `n|# count'?
> I've simplified that before adopting it, `mandoc -Tlint ./top.1' is
> happy with it.
> 

we used to use \*(Ba instead of "|". i think it made mark up simpler in
some cases. and i think ingo wants us to reduce it (and he'll probably
chip in) so i guess that particular change is fine.

jmc



Re: mailwrapper: hostsat and purgestat symlinks

2020-07-23 Thread Jason McIntyre
On Thu, Jul 23, 2020 at 09:41:53PM +0200, Klemens Nanni wrote:
> On Mon, Jun 22, 2020 at 04:09:49AM +0200, Klemens Nanni wrote:
> > Doing "*stat " in my shell I came across those two entries
> > under /usr/bin/ which are undocumented:
> > 
> > $ man -k any~'^(host|purge)stat$'
> > man: nothing appropriate
> > 
> > /etc/mailer.conf has no entries for them but mailer.conf(5)' EXAMPLES
> > section demonstrates using them with the mail/sendmail port.
> > 
> > CVS log has it that we've been installing those two symlinks two
> > mailwrapper since its import from NetBSD in 1999 and mentioning the
> > examples since 2001, but I couldn't find a specific commit that
> > eventually removed their supporting code.
> > 
> > All other symlinks to mailwrapper(8) (sendmail, newaliases, mailq and
> > mailmap) have their own manual pages and respective argv specific code
> > under /usr/src/usr.sbin/.
> > 
> > Assuming that purgestat and hoststat usage/code went away with removing
> > sendmail from base at latest, can their symlinks be considered leftovers
> > and removed?
> Ping.
> 
> Feedback? Objections? OK?
> 

yes, i supplied feedback to this diff on the day you mailed it. my reply
was:

sendmail. they add compatibility for sendmail-compatible mailers. some
folks are used to having them around.

i guess gilles or guenther or millert would be good folks to ask about
whether its worth removing them.

some aspects of the mailer system are a bit weird because of the
dominance of sendmail.

and you never replied.

did you ask any of our mailer guys?
jmc



Re: switch default MANPAGER from more(1) to less(1)

2020-07-19 Thread Jason McIntyre
On Sun, Jul 19, 2020 at 05:36:34PM +0200, Ingo Schwarze wrote:
> Hi,
> 
> currently, if neither the MANPAGER nor the PAGER environment variable
> is set, man(1) uses "more -s" as the manual page pager.  I am quite
> sure that the only reason i did this is that i thought this behaviour
> was required by POSIX.
> 
> But it is not:
> 
>   https://pubs.opengroup.org/onlinepubs/9699919799/utilities/man.html
> 
>   "If the PAGER variable is null or not set,
>the command shall be either "more" or another
>paginator utility documented in the system documentation."
> 
> Right now, i even failed to find any indication that POSIX ever
> required more(1) as the default for this purpose.  I no longer
> understand where i got that idea from in the first place.
> 
> That said, on OpenBSD, the pager we provide is less(1).  In effect,
> it is less(1) even when called as more(1), albeit with minor
> differences in the default behaviour.  On top of that, our man(1)
> utility heavily relies on less(1) features that tradional more(1)
> wouldn't even have, in particular tagging support (:t).
> 
> So, i would find it logical to use less(1) as the default pager
> instead of more(1).
> 
> Same thing for the "-s" option: i thought it was required by POSIX,
> but it isn't.  I also provides little benefit, if any, and it may
> occasionally break output, in the rare case where two consecutive
> blank lines are syntacically significant (for example in an EXAMPLES
> section presenting a code sample).  Besides, if the author deliberately
> chose to put two consecutive blank lines, i don't see why man(1)
> should squeeze them and override the author's intent.
> 
> Is anybody concerned about the following patch, or would you agree
> with it?
> 
> Yours,
>   Ingo
> 

hi.

i guess the argument in favour of more(1) would be that it is part of
posix, even if optional, where less(1) is not. so it makes sense to
choose a command most likely to work on most machines.

having said that, i've nothing against the switch. i imagine it'd be
hard to find a system without less(1).

about -s: it's inclusion probably comes from a time when there was an
annoying bug in nroff that made our man pages randomly display a number
of blank lines in the middle of a page. -s mitigated that somewhat.

jmc

> 
> Index: apropos.1
> ===
> RCS file: /cvs/src/usr.bin/mandoc/apropos.1,v
> retrieving revision 1.41
> diff -u -p -r1.41 apropos.1
> --- apropos.1 22 Nov 2018 12:32:10 -  1.41
> +++ apropos.1 19 Jul 2020 15:18:30 -
> @@ -340,7 +340,7 @@ types appearing in function arguments in
>  Any non-empty value of the environment variable
>  .Ev MANPAGER
>  is used instead of the standard pagination program,
> -.Xr more 1 ;
> +.Xr less 1 ;
>  see
>  .Xr man 1
>  for details.
> @@ -363,7 +363,7 @@ Specifies the pagination program to use 
>  .Ev MANPAGER
>  is not defined.
>  If neither PAGER nor MANPAGER is defined,
> -.Xr more 1
> +.Xr less 1
>  .Fl s
>  is used.
>  Only used if
> Index: main.c
> ===
> RCS file: /cvs/src/usr.bin/mandoc/main.c,v
> retrieving revision 1.253
> diff -u -p -r1.253 main.c
> --- main.c15 Jun 2020 17:25:03 -  1.253
> +++ main.c19 Jul 2020 15:18:31 -
> @@ -1194,7 +1194,7 @@ spawn_pager(struct outstate *outst, char
>   if (pager == NULL || *pager == '\0')
>   pager = getenv("PAGER");
>   if (pager == NULL || *pager == '\0')
> - pager = "more -s";
> + pager = "less";
>   cp = mandoc_strdup(pager);
>  
>   /*
> Index: man.1
> ===
> RCS file: /cvs/src/usr.bin/mandoc/man.1,v
> retrieving revision 1.37
> diff -u -p -r1.37 man.1
> --- man.1 17 Jun 2020 19:41:25 -  1.37
> +++ man.1 19 Jul 2020 15:18:31 -
> @@ -275,7 +275,7 @@ is case insensitive.
>  Any non-empty value of the environment variable
>  .Ev MANPAGER
>  is used instead of the standard pagination program,
> -.Xr more 1 .
> +.Xr less 1 .
>  If
>  .Xr less 1
>  is used, the interactive
> @@ -329,7 +329,7 @@ Specifies the pagination program to use 
>  .Ev MANPAGER
>  is not defined.
>  If neither PAGER nor MANPAGER is defined,
> -.Xr more 1
> +.Xr less 1
>  .Fl s
>  is used.
>  .El
> Index: mandoc.1
> ===
> RCS file: /cvs/src/usr.bin/mandoc/mandoc.1,v
> retrieving revision 1.168
> diff -u -p -r1.168 mandoc.1
> --- mandoc.1  15 Jun 2020 18:05:25 -  1.168
> +++ mandoc.1  19 Jul 2020 15:18:31 -
> @@ -650,7 +650,7 @@ It never affects the interpretation of i
>  Any non-empty value of the environment variable
>  .Ev MANPAGER
>  is used instead of the standard pagination program,
> -.Xr more 1 ;
> +.Xr less 1 ;
>  see
>  .Xr man 1
>  for details.
> @@ -664,7 +664,7 @@ Specifies the pagination program to use 
>  .Ev MANPAGER
>  is 

Re: ssh-keygen(1): -a is missing in SYNOPSIS and small wording change

2020-07-13 Thread Jason McIntyre
On Mon, Jul 13, 2020 at 10:36:45PM +0200, Solene Rapenne wrote:
> On Thu, 25 Jun 2020 18:02:23 +0100
> Jason McIntyre :
> 
> > On Thu, Jun 25, 2020 at 06:40:36PM +0200, Solene Rapenne wrote:
> > > I found that ssh-keygen(1) missed mention of -a flag in SYNOPSIS.
> > >   
> > 
> > i think this got accidently removed in -r1.184:
> > 
> > remove single letter flags for moduli operations
> > 
> > > The following patch adds mention to [-a rounds] with default (no
> > > flag), -p, -c, -K and -A
> > >   
> > 
> > i'm definitely not the right person to ok that
> > 
> > > All the functions triggered by these flags use the rounds variable
> > > defined with -a parameter (default 0)
> > > 
> > > 
> > > I also propose a small wording change, in the sentence:
> > > "After a key is generated, instructions below detail [...]"
> > > 
> > > I thought below refered to the list of options after that sentence,
> > > but it may be a mistake of mine here.
> > >   
> > 
> > i wanted to ask about this text too. it's unclear to me. after a key is
> > generated, ssh-keygen asks where to save it. i wonder why we use the
> > wording "should be placed to be activated"? it seems odd, but maybe
> > there's a reason.
> > 
> > jmc
> 
> I don't really understand the whole sentence but I thought it was
> due to my english understanding.
> 
> New patch adding [-a rounds] in ssh-keygen usage(). I'm not sure
> if the first line of usage() output is ok or too long now.
> 

morning.

it does indeed look horrible, but somehow the page currently has -t in
the wrong place, so that may help. i suggest you try to get it like
this:

... [-f output_keyfile]
[-m format] [-N new_passphrase] [-O option]
[-t ...]
[-w provider]

in the man source, that will mean rearranging -t to list it after -O and
before -w. that will format a bit more nicely too.

jmc

> Index: ssh-keygen.1
> ===
> RCS file: /cvs/src/usr.bin/ssh/ssh-keygen.1,v
> retrieving revision 1.203
> diff -u -p -r1.203 ssh-keygen.1
> --- ssh-keygen.1  3 Apr 2020 02:26:56 -   1.203
> +++ ssh-keygen.1  13 Jul 2020 20:34:14 -
> @@ -44,6 +44,7 @@
>  .Sh SYNOPSIS
>  .Nm ssh-keygen
>  .Op Fl q
> +.Op Fl a Ar rounds
>  .Op Fl b Ar bits
>  .Op Fl C Ar comment
>  .Op Fl f Ar output_keyfile
> @@ -54,6 +55,7 @@
>  .Op Fl w Ar provider
>  .Nm ssh-keygen
>  .Fl p
> +.Op Fl a Ar rounds
>  .Op Fl f Ar keyfile
>  .Op Fl m Ar format
>  .Op Fl N Ar new_passphrase
> @@ -71,6 +73,7 @@
>  .Op Fl f Ar input_keyfile
>  .Nm ssh-keygen
>  .Fl c
> +.Op Fl a Ar rounds
>  .Op Fl C Ar comment
>  .Op Fl f Ar keyfile
>  .Op Fl P Ar passphrase
> @@ -93,6 +96,7 @@
>  .Op Fl f Ar known_hosts_file
>  .Nm ssh-keygen
>  .Fl K
> +.Op Fl a Ar rounds
>  .Op Fl w Ar provider
>  .Nm ssh-keygen
>  .Fl R Ar hostname
> @@ -125,6 +129,7 @@
>  .Op Fl f Ar input_keyfile
>  .Nm ssh-keygen
>  .Fl A
> +.Op Fl a Ar rounds
>  .Op Fl f Ar prefix_path
>  .Nm ssh-keygen
>  .Fl k
> @@ -248,7 +253,9 @@ keys may be converted using this option 
>  .Fl p
>  (change passphrase) flag.
>  .Pp
> -After a key is generated, instructions below detail where the keys
> +After a key is generated,
> +.Nm
> +will ask where the keys
>  should be placed to be activated.
>  .Pp
>  The options are as follows:
> Index: ssh-keygen.c
> ===
> RCS file: /cvs/src/usr.bin/ssh/ssh-keygen.c,v
> retrieving revision 1.413
> diff -u -p -r1.413 ssh-keygen.c
> --- ssh-keygen.c  26 Jun 2020 05:02:03 -  1.413
> +++ ssh-keygen.c  13 Jul 2020 20:34:15 -
> @@ -3013,15 +3013,15 @@ static void
>  usage(void)
>  {
>   fprintf(stderr,
> - "usage: ssh-keygen [-q] [-b bits] [-C comment] [-f output_keyfile] 
> [-m format]\n"
> + "usage: ssh-keygen [-q] [-a rounds] [-b bits] [-C comment] [-f 
> output_keyfile] [-m format]\n"
>   "  [-t dsa | ecdsa | ecdsa-sk | ed25519 | 
> ed25519-sk | rsa]\n"
>   "  [-N new_passphrase] [-O option] [-w provider]\n"
> - "   ssh-keygen -p [-f keyfile] [-m format] [-N 
> new_passphrase]\n"
> + "   ssh-keygen -p [-a rounds] [-f keyfile] [-m format] [-N 
> new_passphrase]\n"
>   "   [-P old_passphrase]\n"
>   "   ssh-keygen -

Re: OpenBSD.calendar patch

2020-06-29 Thread Jason McIntyre
On Sat, Jun 27, 2020 at 11:56:49AM -0700, jungle boogie wrote:
> Hi Friends,
> 
> Here's a small patch to the OpenBSD.calendar. I didn't want to spend too 
> much time on this until I find out if it would be accepted.
> 

morning.

i think if such a file is worth having, it's worth updating.

having said that, i'm counting myself out from looking after this
one - hopefully someone else will pick it up.

jmc

> Here's my changes:
> 
> 
> --- /usr/share/calendar/calendar.openbsd  Fri Jun 26 21:01:56 2020
> +++ calendar.openbsd  Sat Jun 27 01:37:40 2020
> @@ -10,15 +10,19 @@
>   Jan 06  IPF gets integrated into the OpenBSD kernel, 1996
>   Jan 06  NRL IPv6 addition to OpenBSD, 1999
>   Jan 09  n2k10: Network hackathon, Melbourne, Australia, 17 developers, 
> 2010
> +Jan 12   u2k20: Uckermark hackathon, Urckermark, Germany, 14 developers, 
> 2020
>   Jan 13  n2k13: Network hackathon, Dunedin, New Zealand, 17 developers, 
> 2013
> +Jan 17   a2k19: Antipodean hackathon, Wellington, New Zealand, 18 
> developers, 2019
>   Jan 18  n2k14: Mini-hackathon, Dunedin, New Zealand, 15 developers, 2014
>   Jan 20  Bind 9 goes into the tree, 2003
> +Jan 20   a2k20: Antipodean hackathon, Hobart, Tasmania, 17 developers, 
> 2020
>   Jan 26  Anoncvs service inaugurated, 1996
>   Jan 26  n2k9: Network hackathon, Basel, Switzerland, 19 developers, 2009
>   Jan 27  OpenBSD/amd64 port is added, from NetBSD, 2004
>   Jan 29  "second anoncvs server is 100 miles from the first", 1996
>   Jan 31  OpenBSD/cats port is added, from NetBSD, 2004
>   Feb 03  Describe the ports mechanism [in OpenBSD], 1997
> +Feb 05   a2k18: Dunedin, New Zeland, 19 developers, 2018
>   Feb 13  Unpatented fast block cipher for new password hashing, 1997
>   Feb 14  GNU RCS expired from source tree, replaced with OpenRCS, 2007
>   Feb 19  IPsec package by John Ioannidis and Angelos D. Keromytis, 1997
> @@ -27,6 +31,7 @@
>   Feb 28  Cryptographic services framework in OpenBSD, 2000
>   Mar 09  Support for the VAX architecture removed, 2016
>   Mar 10  OpenBSD/WWW translation started -- German, Spanish, Dutch, 2000
> +Mar 28   t2k19: Taipei mini hackathon, Taipei, Taiwan, 16 developers, 
> 2019
>   Apr 01  OpenBSD/hppa64 port is added, 2005
>   Apr 01  k2k11: Kernel hackathon, Hafnarfjordur, Iceland, 15 developers, 
> 2011
>   Apr 10  f2k7: First filesystem hackathon, Vienna, Austria, 14 
> developers, 2007
> @@ -40,10 +45,12 @@
>   Apr 27  i386/PAE work integrated, 2006
>   May 01  OpenBSD 3.3 released, exploiting W^X, 2003
>   May 05  n2k8: Network hackathon, Ito, Japan, 18 developers, 2008
> +May 07   g2k19: General hackathon, Ottawa, Canada, 43 developers, 2019
>   May 08  c2k3 General hackathon, Calgary, Alberta, 51 developers, 2003
>   May 09  First commit to OpenBSD stable branch, OPENBSD_2_7, 2000
>   May 09  OpenBSD/aviion port is added, 2006
>   May 19  OpenBSD 2.3 released, including "ports" system, 1998
> +May 19   OpenBSD 6.7 released, 48th release, 2020
>   May 21  c2k5: General hackathon, Calgary, Alberta, 60 developers, 2005
>   May 21  c2k6: General hackathon, Calgary, Alberta, 47 developers, 2006
>   May 24  OpenBSD gets a trunk(4), 2005
> @@ -57,6 +64,7 @@
>   Jun 04  c99: First hackathon (IPsec), Calgary, Alberta, 10 developers, 
> 1999
>   Jun 04  c2k2: General hackathon, Calgary, Alberta, 42 developers, 2002
>   Jun 06  c2k8: General hackathon, Edmonton, Alberta, 55 developers, 2008
> +Jun 21   WireGuard imported into kernel, 2020
>   Jun 14  r2k6: First network hackathon, Hamburg, Germany, 6 developers, 
> 2006
>   Jun 15  OpenBSD 2.7 released, including OpenSSH, 2000
>   Jun 15  c2k: First general hackathon, Calgary, Alberta, 18 developers, 
> 2000
> @@ -70,6 +78,7 @@
>   Jul 02  c2k11: General hackathon, Edmonton, Alberta, Canada, 36 
> developers, 2011
>   Jul 07  g2k12: General hackathon, Budapest, Hungary, 41 developers, 2012
>   Jul 08  g2k14: General hackathon, Ljubljana, Slovenia, 49 developers, 
> 2014
> +Jul 08   g2k18: General hackathon, Ljubljana, Slovenia, 39 developers, 
> 2018
>   Jul 11  OpenBSD goes wireless w/ if_wi addition, 1999
>   Jul 23  OpenBSD goes multimedia with Brooktree 848 support, 1998
>   Jul 24  Non-executable stack on most architectures, 2002
> @@ -83,6 +92,7 @@
>   Aug 28  k2k6: IPsec hackathon, Schloss Kransberg, Germany, 14 
> developers, 2006
>   Sep 01  Support for the sparc (32bit) architecture removed, 2016
>   Sep 03  Support for the zaurus architecture removed, 2016
> +Sep 06   n2k18: Network hackathon, Usti nad Labem, Czech Republic, 11 
> developers, 2018
>   Sep 16  s2k11: General hackathon, Ljubljana, Slovenia, 25 developers, 
> 2011
>   Sep 17  n2k12: Network hackathon, Starnberg, Germany, 23 developers, 
> 2012
>   Sep 19  j2k10: Mini-hackathon, Sakae 

Re: ifconfig.8 Ar/Cm typo

2020-06-27 Thread Jason McIntyre
On Sat, Jun 27, 2020 at 02:48:18AM -0500, Matthew Martin wrote:
> A rule on a bridge interface that uses arp or rarp may be followed with
> a literal "request" or "reply" (cf. sbin/ifconfig/brconfig.c L1041 and
> 1048), so the Ar macro is incorrect as it's argument is not
> a placeholder.
> 

right/

> Aside: Is there a rule for when to list alternatives with foo | bar or
> foo Ns | Ns bar? in/out, arp/rarp, and request/reply are all the former
> sans-Ns; however, block/pass uses the Ns macro.
> 

normally we just use arg1 | arg2, but sometimes this becomes ambiguous:

rule block | pass [in | out]

do "in" and "out" go with both "block" and "pass", or just "pass"? so
sometimes we scrunch them up to make it clearer:

rule block|pass [in | out]

hence the need for Ns.

i just committed your diff, but it needed a little more:

Index: ifconfig.8
===
RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
retrieving revision 1.350
diff -u -r1.350 ifconfig.8
--- ifconfig.8  24 Jun 2020 17:40:10 -  1.350
+++ ifconfig.8  27 Jun 2020 15:31:01 -
@@ -751,7 +751,7 @@
 .Bk -words
 .Op Cm tag Ar tagname
 .Oo
-.Cm arp | rarp Op Ar request | reply
+.Cm arp | rarp Op Cm request | reply
 .Op Cm sha Ar lladdr
 .Op Cm spa Ar ipaddr
 .Op Cm tha Ar lladdr
@@ -779,9 +779,9 @@
 keyword for regular packets and
 .Cm rarp
 for reverse arp.
-.Ar request
+.Cm request
 and
-.Ar reply
+.Cm reply
 limit matches to requests or replies.
 The source and target host addresses can be matched with the
 .Cm sha

thanks for the diff!
jmc



Re: awk FS behaviour change

2020-06-27 Thread Jason McIntyre
On Sat, Jun 27, 2020 at 06:32:11AM -0600, Todd C. Miller wrote:
> On Sat, 27 Jun 2020 06:50:39 +0100, Jason McIntyre wrote:
> 
> > i'm not sure it reads better when we switch the emphasis from whitespace
> > to FS. i think it's better that people see how it normally works, then
> > the gories about FS. so i'd have kept the first part of the sentence,
> > but maybe reworked the FS bit.
> 
> I wasn't sure that was an improvement either.  Does this seem better?
> 
>  - todd
> 

yes, i think this is better. ok by me.
jmc

> Index: usr.bin/awk/awk.1
> ===
> RCS file: /cvs/src/usr.bin/awk/awk.1,v
> retrieving revision 1.54
> diff -u -p -u -r1.54 awk.1
> --- usr.bin/awk/awk.1 26 Jun 2020 21:50:06 -  1.54
> +++ usr.bin/awk/awk.1 27 Jun 2020 12:29:21 -
> @@ -130,26 +130,24 @@ and newlines are used as field separator
>  This is convenient when working with multi-line records.
>  .Pp
>  An input line is normally made up of fields separated by whitespace,
> -or by the regular expression
> -.Va FS .
> +or by the value of the field separator
> +.Va FS
> +at the time the line is read.
>  The fields are denoted
>  .Va $1 , $2 , ... ,
>  while
>  .Va $0
>  refers to the entire line.
> -If
>  .Va FS
> -is null, the input line is split into one field per character.
> -Lines are split into fields using the value of
> +may be set to either a single character or a regular expression.
> +As as special case, if
>  .Va FS
> -at the time the line is read.
> -Because of this,
> +is a single space
> +.Pq the default ,
> +fields will be split by one or more whitespace characters.
> +If
>  .Va FS
> -is usually set via the
> -.Fl F
> -option or inside of a
> -.Ic BEGIN
> -block.
> +is null, the input line is split into one field per character.
>  .Pp
>  Normally, any number of blanks separate fields.
>  In order to set the field separator to a single blank, use the
> @@ -171,6 +169,11 @@ as the field separator, use the
>  .Fl F
>  option with a value of
>  .Sq [t] .
> +The field separator is usually set via the
> +.Fl F
> +option or from inside a
> +.Ic BEGIN
> +block so that it takes effect before the input is read.
>  .Pp
>  A pattern-action statement has the form:
>  .Pp
> @@ -407,9 +410,9 @@ The name of the current input file.
>  .It Va FNR
>  Ordinal number of the current record in the current file.
>  .It Va FS
> -Regular expression used to separate fields; also settable
> -by option
> -.Fl F Ar fs .
> +Regular expression used to separate fields (default whitespace);
> +also settable by option
> +.Fl F Ar fs
>  .It Va NF
>  Number of fields in the current record.
>  .Va $NF
> 



Re: awk FS behaviour change

2020-06-26 Thread Jason McIntyre
On Fri, Jun 26, 2020 at 09:28:00PM -0600, Todd C. Miller wrote:
> On Fri, 26 Jun 2020 23:56:23 +0200, Klemens Nanni wrote:
> 
> > How about adding something like "Therefore, FS should be set with -F or
> > in a BEGIN block before input is read." as second sentence in this
> > paragraph?
> 
> That whole section is missing important details.  I've tried to add
> the missing info without being too repetitive.
> 
>  - todd
> 
> Index: usr.bin/awk/awk.1
> ===
> RCS file: /cvs/src/usr.bin/awk/awk.1,v
> retrieving revision 1.54
> diff -u -p -u -r1.54 awk.1
> --- usr.bin/awk/awk.1 26 Jun 2020 21:50:06 -  1.54
> +++ usr.bin/awk/awk.1 27 Jun 2020 03:25:48 -
> @@ -129,27 +129,25 @@ and newlines are used as field separator
>  .Va FS ) .
>  This is convenient when working with multi-line records.
>  .Pp
> -An input line is normally made up of fields separated by whitespace,
> -or by the regular expression
> -.Va FS .
> +An input line is normally made up of fields split based on the value
> +of the field separator
> +.Va FS
> +at the time the line is read.

i'm not sure it reads better when we switch the emphasis from whitespace
to FS. i think it's better that people see how it normally works, then
the gories about FS. so i'd have kept the first part of the sentence,
but maybe reworked the FS bit.

>  The fields are denoted
>  .Va $1 , $2 , ... ,
>  while
>  .Va $0
>  refers to the entire line.
> -If
>  .Va FS
> -is null, the input line is split into one field per character.
> -Lines are split into fields using the value of
> +may be set to either a single character or a regular expression.
> +As as special case, if
>  .Va FS
> -at the time the line is read.
> -Because of this,
> +is a single space
> +.Pq the default ,
> +fields will be split by one or more whitespace characters.
> +If
>  .Va FS
> -is usually set via the
> -.Fl F
> -option or inside of a
> -.Ic BEGIN
> -block.
> +is null, the input line is split into one field per character.
>  .Pp
>  Normally, any number of blanks separate fields.
>  In order to set the field separator to a single blank, use the
> @@ -171,6 +169,11 @@ as the field separator, use the
>  .Fl F
>  option with a value of
>  .Sq [t] .
> +The field separator is usually set via the
> +.Fl F
> +option or from inside of a

that sounds odd, but it may be a US/UK thing: i would say either "from
inside a block" or "from the inside of a block".

jmc

> +.Ic BEGIN
> +block so that it takes effect before the input is read.
>  .Pp
>  A pattern-action statement has the form:
>  .Pp
> @@ -407,9 +410,9 @@ The name of the current input file.
>  .It Va FNR
>  Ordinal number of the current record in the current file.
>  .It Va FS
> -Regular expression used to separate fields; also settable
> -by option
> -.Fl F Ar fs .
> +Regular expression used to separate fields (default whitespace);
> +also settable by option
> +.Fl F Ar fs
>  .It Va NF
>  Number of fields in the current record.
>  .Va $NF
> 



Re: ssh-keygen(1): -a is missing in SYNOPSIS and small wording change

2020-06-25 Thread Jason McIntyre
On Thu, Jun 25, 2020 at 06:40:36PM +0200, Solene Rapenne wrote:
> I found that ssh-keygen(1) missed mention of -a flag in SYNOPSIS.
> 

i think this got accidently removed in -r1.184:

remove single letter flags for moduli operations

> The following patch adds mention to [-a rounds] with default (no
> flag), -p, -c, -K and -A
> 

i'm definitely not the right person to ok that

> All the functions triggered by these flags use the rounds variable
> defined with -a parameter (default 0)
> 
> 
> I also propose a small wording change, in the sentence:
> "After a key is generated, instructions below detail [...]"
> 
> I thought below refered to the list of options after that sentence,
> but it may be a mistake of mine here.
> 

i wanted to ask about this text too. it's unclear to me. after a key is
generated, ssh-keygen asks where to save it. i wonder why we use the
wording "should be placed to be activated"? it seems odd, but maybe
there's a reason.

jmc

> 
> Index: ssh-keygen.1
> ===
> RCS file: /cvs/src/usr.bin/ssh/ssh-keygen.1,v
> retrieving revision 1.203
> diff -u -p -r1.203 ssh-keygen.1
> --- ssh-keygen.1  3 Apr 2020 02:26:56 -   1.203
> +++ ssh-keygen.1  25 Jun 2020 16:28:54 -
> @@ -44,6 +44,7 @@
>  .Sh SYNOPSIS
>  .Nm ssh-keygen
>  .Op Fl q
> +.Op Fl a Ar rounds
>  .Op Fl b Ar bits
>  .Op Fl C Ar comment
>  .Op Fl f Ar output_keyfile
> @@ -54,6 +55,7 @@
>  .Op Fl w Ar provider
>  .Nm ssh-keygen
>  .Fl p
> +.Op Fl a Ar rounds
>  .Op Fl f Ar keyfile
>  .Op Fl m Ar format
>  .Op Fl N Ar new_passphrase
> @@ -71,6 +73,7 @@
>  .Op Fl f Ar input_keyfile
>  .Nm ssh-keygen
>  .Fl c
> +.Op Fl a Ar rounds
>  .Op Fl C Ar comment
>  .Op Fl f Ar keyfile
>  .Op Fl P Ar passphrase
> @@ -93,6 +96,7 @@
>  .Op Fl f Ar known_hosts_file
>  .Nm ssh-keygen
>  .Fl K
> +.Op Fl a Ar rounds
>  .Op Fl w Ar provider
>  .Nm ssh-keygen
>  .Fl R Ar hostname
> @@ -125,6 +129,7 @@
>  .Op Fl f Ar input_keyfile
>  .Nm ssh-keygen
>  .Fl A
> +.Op Fl a Ar rounds
>  .Op Fl f Ar prefix_path
>  .Nm ssh-keygen
>  .Fl k
> @@ -248,7 +253,9 @@ keys may be converted using this option 
>  .Fl p
>  (change passphrase) flag.
>  .Pp
> -After a key is generated, instructions below detail where the keys
> +After a key is generated,
> +.Nm
> +will ask where the keys
>  should be placed to be activated.
>  .Pp
>  The options are as follows:
> 



Re: Adapt usbhidaction.1 example to sndio changes

2020-06-24 Thread Jason McIntyre
On Tue, Jun 23, 2020 at 02:22:09PM +0200, Benjamin Baier wrote:
> Hi,
> 
> adapt usbhidaction.1 example to sndio changes.
> 
> Greetings Ben
> 

fixed, thanks.
jmc

> Index: usbhidaction.1
> ===
> RCS file: /var/cvs/src/usr.bin/usbhidaction/usbhidaction.1,v
> retrieving revision 1.14
> diff -u -p -r1.14 usbhidaction.1
> --- usbhidaction.120 Apr 2020 20:54:31 -  1.14
> +++ usbhidaction.123 Jun 2020 12:06:01 -
> @@ -105,20 +105,20 @@ master volume and muting of an
>  .Xr azalia 4
>  device using the multimedia keys on a Belkin USB keyboard.
>  .Bd -literal -offset indent
> -# The volume range is 0..255. Moving 8 volume steps each keypress
> +# The volume range is 0..1. Moving 0.05 volume steps each keypress
>  # moves quickly through the volume range but still has decent
>  # granularity.
>  Consumer:Volume_Increment   1
> - mixerctl -f $1 outputs.master=+8
> + sndioctl -f $1 output.level=+0.05
>  Consumer:Volume_Decrement   1
> - mixerctl -f $1 outputs.master=-8
> + sndioctl -f $1 output.level=-0.05
>  Consumer:Mute   1
> - mixerctl -f $1 outputs.master.mute=toggle
> + sndioctl -f $1 output.mute=!
>  .Ed
>  .Pp
>  A sample invocation using this configuration would be
>  .Bd -literal -offset indent
> -$ usbhidaction -f /dev/uhid1 -c conf /dev/audioctl0
> +$ usbhidaction -f /dev/uhid1 -c conf snd/0
>  .Ed
>  .Sh SEE ALSO
>  .Xr usbhidctl 1 ,
> 



Re: Typo in ifconfig.8

2020-06-24 Thread Jason McIntyre
On Wed, Jun 24, 2020 at 07:17:23PM +0200, Matthias Schmidt wrote:
> 
> Hi,
> 
> there is a typo in the Wireguard section of the ifconfig man page.
> 
> Cheers
> 
>   Matthias
> 

fixed, thanks.
jmc

>  diff --git a/ifconfig.8 b/ifconfig.8
>  index 5c4a8ad0792..4a95d644972 100644
>  --- a/ifconfig.8
>  +++ b/ifconfig.8
>  @@ -2148,7 +2148,7 @@ Set the allowed IPs for the peer.
>   The allowed IPs indicate the IP addresses a peer is allowed to send
>   from.
>   That is, in order for an incoming packet from a peer to reach the host,
>  -the decryped IP source address must be in the peer's
>  +the decrypted IP source address must be in the peer's
>   .Ar allowed-ip
>   ranges.
>   .Pp
> 



Re: pkg_add.1

2020-06-24 Thread Jason McIntyre
On Tue, Jun 23, 2020 at 07:28:09PM -0400, sven falempin wrote:
> Dear readers,
> 
> It may not be very obvious that 'dry run' mode of pkg_add
> actually downloads packages.
> It is a good feature and maybe the pkg_add man could use an EXAMPLES
> section.
> 

hi.

it might not be obvious, but it is documented:

 -n   Don't actually install a package, just report the
  steps that would be taken if it was.  Will still
  copy packages to PKG_CACHE if applicable.

if you look through the page for how the PKG_CACHE stuff works, it
seems clear.

anyway, i'll defer to espie on whether the diff is wanted or not.
comments on your text inline:

> Index: pkg_add.1
> ===
> RCS file: /cvs/src/usr.sbin/pkg_add/pkg_add.1,v
> retrieving revision 1.163
> diff -u -p -r1.163 pkg_add.1
> --- pkg_add.1   24 Jan 2020 21:10:46 -  1.163
> +++ pkg_add.1   23 Jun 2020 23:25:12 -
> @@ -836,6 +836,18 @@ information about individual packages
>  database of installed
>  .Xr packages 7
>  .El
> +.Sh EXAMPLES
> +It is possible to download packages before installing them to separate
> download and installation process.

this would have to be sth like:

...before installing them,
in order to separate the download and installation processes.

> +.Pp
> +.Dl PKG_CACHE=/tmp/pkgs pkg_add -I -u -n
> +.Pp
> +will download the package(s) to be updated into .Dq /tmp/pkgs

then you have a new paragraph started, mid-sentence. so it's better to
structure the text like this:

...installation processes.
To download the packages to
.Dq /tmp/pkgs :
.Pp
.Dl $ blah ...
.Pp
They can then be installed at a later date:
.Pp
.Dl $ blah ...

note also that the Dq stuff should be on a separate line.
plus we normally show commands with "$" or "#" prompts.

> +directory
> +and they can be installed later
> +.Pp
> +pkg_add -I /tmp/pkgs/*
> +.Pp
> +.El

and you didn;t start a list (Bl) so no need to end one (El).

jmc

>  .Sh SEE ALSO
>  .Xr ftp 1 ,
>  .Xr pkg_create 1 ,
> 
> Best,



Re: top.1: Fix COMMAND description

2020-06-23 Thread Jason McIntyre
On Tue, Jun 23, 2020 at 09:42:06PM +0200, Klemens Nanni wrote:
> There simply is no code that adds angle brackets the swapped out
> processes in the COMMAND column.
> 
> I double checked with a tiny VMM instance using 64M of RAM where
> ld(1) from the library_aslr script immediately hits swap: no <> around.
> 
> While here, mention that -C appends arguments.
> 
> Feedback? OK?
> 

that seems correct:

RCS file: /cvs/src/usr.bin/top/machine.c,v

revision 1.54
date: 2006/11/29 12:34:22;  author: miod;  state: Exp;  lines: +1 -10;
Do not test for processes being swapped out since this can't happen anymore.

=
Index: machine.c
===
RCS file: /cvs/src/usr.bin/top/machine.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- machine.c   20 Sep 2006 21:26:20 -  1.53
+++ machine.c   29 Nov 2006 12:34:22 -  1.54
@@ -1,4 +1,4 @@
-/* $OpenBSD: machine.c,v 1.53 2006/09/20 21:26:20 ray Exp $ */
+/* $OpenBSD: machine.c,v 1.54 2006/11/29 12:34:22 miod Exp $*/
 
 /*-
  * Copyright (c) 1994 Thorsten Lockert 
@@ -475,15 +475,6 @@
pp = *(hp->next_proc++);
hp->remaining--;
 
-   if ((pp->p_flag & P_INMEM) == 0) {
-   /*
-* Print swapped processes as 
-*/
-   char buf[sizeof(pp->p_comm)];
-
-   (void) strlcpy(buf, pp->p_comm, sizeof(buf));
-   (void) snprintf(pp->p_comm, sizeof(pp->p_comm), "<%s>", buf);
-   }
cputime = (pp->p_uticks + pp->p_sticks + pp->p_iticks) / stathz;
 
/* calculate the base for cpu percentages */

ok for the (amended) diff.
jmc

> 
> Index: top.1
> ===
> RCS file: /cvs/src/usr.bin/top/top.1,v
> retrieving revision 1.73
> diff -u -p -r1.73 top.1
> --- top.1 7 Jan 2020 13:30:43 -   1.73
> +++ top.1 23 Jun 2020 19:33:04 -
> @@ -450,9 +450,9 @@ The number of system and user CPU second
>  The raw percentage of CPU usage and the default field on which the
>  display is sorted.
>  .It COMMAND
> -The name of the command that the process is currently running.
> -(If the process is swapped out, this column is enclosed by angle
> -brackets.)
> +The name (and arguments if
> +.Fl H
> +is specified) of the command that the process is currently running.
>  .El
>  .Sh ENVIRONMENT
>  .Bl -tag -width Ev
> 



Re: systat.1: Remove ^z mention

2020-06-22 Thread Jason McIntyre
On Mon, Jun 22, 2020 at 03:12:34PM +0200, Klemens Nanni wrote:
> On Mon, Jun 22, 2020 at 07:22:24AM +0100, Jason McIntyre wrote:
> > i guess the diff is correct, but removes what might be a handy reminder.
> It makes assumptions about the environment in which systat was started
> and it is wrong/misleading in some cases.
> 
> > i'm fine with this bit of doc remaining or being deleted. i guess ^Z is
> > well enough known that people don;t need it documented here.
> Then top(1) ought to have it as well, but there is no point in doing so;
> we might as well mention ^c killing the program in most manuals, but
> even then we're making an assumption about the program's environment
> rather than documenting behaviour of the very program itself.
> 

yes, these are good points.
jmc



Re: systat.1: Remove ^z mention

2020-06-22 Thread Jason McIntyre
On Mon, Jun 22, 2020 at 06:06:43AM +0200, Klemens Nanni wrote:
> Suspending systat with ^Z is done by the shell iff job control is
> enabled, not systat itself.
> 
> Try `set +m' to disable job control or start systat in a terminal
> without a shell, e.g. `xterm -e systat', to confirm that ^z does nothing
> in these cases.
> 
> Feedback? OK?
> 

i guess the diff is correct, but removes what might be a handy reminder.
i'm fine with this bit of doc remaining or being deleted. i guess ^Z is
well enough known that people don;t need it documented here.

jmc

> 
> Index: systat.1
> ===
> RCS file: /cvs/src/usr.bin/systat/systat.1,v
> retrieving revision 1.117
> diff -u -p -r1.117 systat.1
> --- systat.1  23 Apr 2020 07:57:27 -  1.117
> +++ systat.1  22 Jun 2020 04:02:06 -
> @@ -211,9 +210,6 @@ Scroll current view up by one line.
>  Scroll current view down by one page.
>  .It Ic Alt-V | Aq Ic Page Up
>  Scroll current view up by one page.
> -.It Ic ^Z
> -Suspend
> -.Nm .
>  .El
>  .Pp
>  The following commands are interpreted by the
> 



Re: systat.1: document "s" command

2020-06-22 Thread Jason McIntyre
On Mon, Jun 22, 2020 at 05:54:51AM +0200, Klemens Nanni wrote:
> Feedback? OK?
> 

ok.
jmc

> Index: systat.1
> ===
> RCS file: /cvs/src/usr.bin/systat/systat.1,v
> retrieving revision 1.117
> diff -u -p -r1.117 systat.1
> --- systat.1  23 Apr 2020 07:57:27 -  1.117
> +++ systat.1  22 Jun 2020 03:53:15 -
> @@ -188,6 +185,8 @@ Quit
>  .Nm .
>  .It Ic r
>  Reverse the selected ordering if supported by the view.
> +.It Ic s
> +Change the screen refresh interval in seconds.
>  .It Ic \&,
>  Print numbers with thousand separators, where applicable.
>  .It Ic ^A | Aq Ic Home
> 



Re: systat.1: Trim ":" description, support line kill character

2020-06-22 Thread Jason McIntyre
On Mon, Jun 22, 2020 at 05:49:43AM +0200, Klemens Nanni wrote:
> The manual's wording is untouched since import in 1995, engine.c however
> came to be in 2008 as "New display engine for systat" from canacar.
> 
> While characte erase (^h) works, word erase (^w) is not implemented and
> line kill (^u) is supported but as ^g instead.
> 
> I see no value in documenting this either way, so remove the lines from
> the manual but also support the actual line kill character for.
> 
> Feedback? OK?
> 

morning.

how will people be able to find this if we don;t document it? from a
brief skim of docs which may hold answers, i still can;t find where
these values are documented.

couldn;t we document these work and what the defaults are? it seems
handy.

jmc

> 
> Index: engine.c
> ===
> RCS file: /cvs/src/usr.bin/systat/engine.c,v
> retrieving revision 1.25
> diff -u -p -r1.25 engine.c
> --- engine.c  12 Jan 2020 20:51:08 -  1.25
> +++ engine.c  22 Jun 2020 03:35:40 -
> @@ -1204,6 +1204,7 @@ cmd_keyboard(int ch)
>   break;
>   case 0x1b:
>   case CTRL_G:
> + case CTRL_U:
>   if (cmd_len > 0) {
>   cmdbuf[0] = '\0';
>   cmd_len = 0;
> Index: engine.h
> ===
> RCS file: /cvs/src/usr.bin/systat/engine.h,v
> retrieving revision 1.12
> diff -u -p -r1.12 engine.h
> --- engine.h  12 Jan 2020 20:51:08 -  1.12
> +++ engine.h  22 Jun 2020 03:36:21 -
> @@ -36,6 +36,7 @@
>  #define CTRL_L  12
>  #define CTRL_N  14
>  #define CTRL_P  16
> +#define CTRL_U  21
>  #define CTRL_V  22
>  
>  #define META_V  246
> Index: systat.1
> ===
> RCS file: /cvs/src/usr.bin/systat/systat.1,v
> retrieving revision 1.117
> diff -u -p -r1.117 systat.1
> --- systat.1  23 Apr 2020 07:57:27 -  1.117
> +++ systat.1  22 Jun 2020 03:09:25 -
> @@ -172,9 +172,6 @@ These are:
>  .It Ic \&:
>  Move the cursor to the command line and interpret the input
>  line typed as a command.
> -While entering a command the
> -current character erase, word erase, and line kill characters
> -may be used.
>  .It Ic o
>  Select the next ordering which sorts the rows according to a
>  combination of columns.
> 



Re: npppd(8) man pages fix

2020-06-13 Thread Jason McIntyre
On Sat, Jun 13, 2020 at 11:08:52AM +1000, David Gwynne wrote:
> 
> 
> > On 13 Jun 2020, at 6:47 am, Jason McIntyre  wrote:
> > 
> > On Fri, Jun 12, 2020 at 09:53:33PM +0300, Vitaliy Makkoveev wrote:
> >> Since 6.7-release npppd(8) uses pppac(4) instead of tun(4) but manual
> >> page still has the reference to tun(4).
> >> 
> >> Diff below replaced `tun' by `pppac' in npppd(8) man page. Also `pppac'
> >> added to npppd.conf(5).
> >> 
> > 
> > hi!
> > 
> > this isn;t warranted, because pppx is already listed and it's the same
> > page. if a page has multiple names, we'd only list it once.
> > 
> > i'm already asking about the removal of the tun reference from npppd.
> > i'll do that after confirmation...
> 
> I think you can still use tun(4) with npppd, you just can't use it with pipex 
> cos that code was ripped out and moved to pppac. I'm not convinced this is 
> worth mentioning though, cos you can also use pppac without pipex.
> 

so i removed the tun reference (on your advice).
thanks,

jmc

> > 
> > jmc
> > 
> >> Index: usr.sbin/npppd/npppd/npppd.8
> >> ===
> >> RCS file: /cvs/src/usr.sbin/npppd/npppd/npppd.8,v
> >> retrieving revision 1.6
> >> diff -u -p -r1.6 npppd.8
> >> --- usr.sbin/npppd/npppd/npppd.8   9 Nov 2015 01:14:22 -   1.6
> >> +++ usr.sbin/npppd/npppd/npppd.8   12 Jun 2020 18:48:00 -
> >> @@ -78,7 +78,7 @@ configuration file.
> >> .Xr gre 4 ,
> >> .Xr pipex 4 ,
> >> .Xr pppx 4 ,
> >> -.Xr tun 4 ,
> >> +.Xr pppac 4 ,
> >> .Xr npppd.conf 5 ,
> >> .Xr npppctl 8 ,
> >> .Xr sysctl 8
> >> Index: usr.sbin/npppd/npppd/npppd.conf.5
> >> ===
> >> RCS file: /cvs/src/usr.sbin/npppd/npppd/npppd.conf.5,v
> >> retrieving revision 1.27
> >> diff -u -p -r1.27 npppd.conf.5
> >> --- usr.sbin/npppd/npppd/npppd.conf.5  23 Apr 2020 21:10:54 -  
> >> 1.27
> >> +++ usr.sbin/npppd/npppd/npppd.conf.5  12 Jun 2020 18:48:00 -
> >> @@ -691,6 +691,7 @@ bind tunnel from L2TP authenticated by L
> >> .Sh SEE ALSO
> >> .Xr pipex 4 ,
> >> .Xr pppx 4 ,
> >> +.Xr pppac 4 ,
> >> .Xr npppctl 8 ,
> >> .Xr npppd 8 ,
> >> .Xr sysctl 8
> >> 
> > 
> 



Re: npppd(8) man pages fix

2020-06-12 Thread Jason McIntyre
On Fri, Jun 12, 2020 at 09:53:33PM +0300, Vitaliy Makkoveev wrote:
> Since 6.7-release npppd(8) uses pppac(4) instead of tun(4) but manual
> page still has the reference to tun(4).
> 
> Diff below replaced `tun' by `pppac' in npppd(8) man page. Also `pppac'
> added to npppd.conf(5).
> 

hi!

this isn;t warranted, because pppx is already listed and it's the same
page. if a page has multiple names, we'd only list it once.

i'm already asking about the removal of the tun reference from npppd.
i'll do that after confirmation...

jmc

> Index: usr.sbin/npppd/npppd/npppd.8
> ===
> RCS file: /cvs/src/usr.sbin/npppd/npppd/npppd.8,v
> retrieving revision 1.6
> diff -u -p -r1.6 npppd.8
> --- usr.sbin/npppd/npppd/npppd.8  9 Nov 2015 01:14:22 -   1.6
> +++ usr.sbin/npppd/npppd/npppd.8  12 Jun 2020 18:48:00 -
> @@ -78,7 +78,7 @@ configuration file.
>  .Xr gre 4 ,
>  .Xr pipex 4 ,
>  .Xr pppx 4 ,
> -.Xr tun 4 ,
> +.Xr pppac 4 ,
>  .Xr npppd.conf 5 ,
>  .Xr npppctl 8 ,
>  .Xr sysctl 8
> Index: usr.sbin/npppd/npppd/npppd.conf.5
> ===
> RCS file: /cvs/src/usr.sbin/npppd/npppd/npppd.conf.5,v
> retrieving revision 1.27
> diff -u -p -r1.27 npppd.conf.5
> --- usr.sbin/npppd/npppd/npppd.conf.5 23 Apr 2020 21:10:54 -  1.27
> +++ usr.sbin/npppd/npppd/npppd.conf.5 12 Jun 2020 18:48:00 -
> @@ -691,6 +691,7 @@ bind tunnel from L2TP authenticated by L
>  .Sh SEE ALSO
>  .Xr pipex 4 ,
>  .Xr pppx 4 ,
> +.Xr pppac 4 ,
>  .Xr npppctl 8 ,
>  .Xr npppd 8 ,
>  .Xr sysctl 8
> 



Re: [Patch] Fix mangled language in x509v3.cnf.5

2020-06-11 Thread Jason McIntyre
On Thu, Jun 11, 2020 at 07:13:52PM +0200, Theo Buehler wrote:
> On Thu, Jun 11, 2020 at 05:38:32PM +0100, Jason McIntyre wrote:
> > On Thu, Jun 11, 2020 at 09:55:50PM +1000, Ross L Richardson wrote:
> > > 
> > > Fix a horribly mangled sentence.   Would "may" be more appropriate
> > > than "can"?
> > > 
> > 
> > hi.
> > 
> > i think the rewording is fine. i don;t think we should change "may" to
> > "can" though.
> > 
> > > Also, in the list of usages: for serverAuth and clientAuth, shouldn't
> > > the word "web" be elided?
> > > 
> > 
> > i don;t know. hence i will wait awhile - if no one comments, i'll take
> > your diff as-is.
> 
> that's ok tb
> 

thanks

> I think you could remove both "SSL" and "web" in these two lines if you
> wanted to. The first few items of this list are derived from RFC 5280
> (page 44) where it says "TLS WWW server authentication" (which is even
> uglier).
> 

so i committed it without SSL and web.
jmc

> I also think we're putting lipstick on a pig.
> 
> > 
> > jmc
> > 
> > > Ross
> > > 
> > > 
> > > Index: x509v3.cnf.5
> > > ===
> > > RCS file: /cvs/src/lib/libcrypto/man/x509v3.cnf.5,v
> > > retrieving revision 1.6
> > > diff -u -p -r1.6 x509v3.cnf.5
> > > --- x509v3.cnf.5  6 Jun 2019 01:06:59 -   1.6
> > > +++ x509v3.cnf.5  11 Jun 2020 11:48:34 -
> > > @@ -186,8 +186,8 @@ keyUsage=digitalSignature, nonRepudiatio
> > >  keyUsage=critical, keyCertSign
> > >  .Ed
> > >  .Ss Extended key usage
> > > -This extensions consists of a list of usages indicating purposes for
> > > -which the certificate public key can be used for.
> > > +This extension consists of a list of purposes for
> > > +which the certificate public key can be used.
> > >  .Pp
> > >  These can either be object short names or the dotted numerical form of 
> > > OIDs.
> > >  While any OID can be used, only certain values make sense.
> > > 
> > 
> 



Re: [Patch] Fix mangled language in x509v3.cnf.5

2020-06-11 Thread Jason McIntyre
On Thu, Jun 11, 2020 at 09:55:50PM +1000, Ross L Richardson wrote:
> 
> Fix a horribly mangled sentence.   Would "may" be more appropriate
> than "can"?
> 

hi.

i think the rewording is fine. i don;t think we should change "may" to
"can" though.

> Also, in the list of usages: for serverAuth and clientAuth, shouldn't
> the word "web" be elided?
> 

i don;t know. hence i will wait awhile - if no one comments, i'll take
your diff as-is.

jmc

> Ross
> 
> 
> Index: x509v3.cnf.5
> ===
> RCS file: /cvs/src/lib/libcrypto/man/x509v3.cnf.5,v
> retrieving revision 1.6
> diff -u -p -r1.6 x509v3.cnf.5
> --- x509v3.cnf.5  6 Jun 2019 01:06:59 -   1.6
> +++ x509v3.cnf.5  11 Jun 2020 11:48:34 -
> @@ -186,8 +186,8 @@ keyUsage=digitalSignature, nonRepudiatio
>  keyUsage=critical, keyCertSign
>  .Ed
>  .Ss Extended key usage
> -This extensions consists of a list of usages indicating purposes for
> -which the certificate public key can be used for.
> +This extension consists of a list of purposes for
> +which the certificate public key can be used.
>  .Pp
>  These can either be object short names or the dotted numerical form of OIDs.
>  While any OID can be used, only certain values make sense.
> 



Re: [patch] correct return type in pcap_open_live.3

2020-05-28 Thread Jason McIntyre
On Tue, May 26, 2020 at 05:10:33PM -0500, Edgar Pettijohn wrote:
> Please see attached diff.

fixed, thanks.
jmc

> Index: pcap_open_live.3
> ===
> RCS file: /cvs/src/lib/libpcap/pcap_open_live.3,v
> retrieving revision 1.3
> diff -u -p -u -r1.3 pcap_open_live.3
> --- pcap_open_live.3  25 Sep 2019 17:02:00 -  1.3
> +++ pcap_open_live.3  26 May 2020 22:09:24 -
> @@ -95,7 +95,7 @@
>  .Fn pcap_dump_fopen "pcap_t *p" "FILE *f"
>  .Ft "char *"
>  .Fn pcap_lookupdev "char *errbuf"
> -.Ft uint
> +.Ft int
>  .Fn pcap_lookupnet "const char *device" "bpf_u_int32 *netp" "bpf_u_int32 
> *maskp" "char *errbuf"
>  .Ft int
>  .Fn pcap_dispatch "pcap_t *p" "int cnt" "pcap_handler callback" "u_char 
> *user"



Re: [RFC] pppd: add pipex(4) L2TP control support

2020-05-28 Thread Jason McIntyre
On Wed, May 27, 2020 at 08:43:47AM +0200, Martin Pieuchot wrote:
> On 26/05/20(Tue) 10:31, Claudio Jeker wrote:
> > [...] 
> > npppd(8) is server only it can not establish a connection. pppd(8) on the
> > other hand is more client side (but I think it can do both).
> 
> Could someone knowledgable indicate that in the man pages?

well, i don;t qualify as knowledgable about ppp, but i'll bite anyway:

> Currently there is:
> 
>   npppd ??? new Point-to-Point Protocol daemon
>   pppd ??? Point-to-Point Protocol daemon
> 
> Confusing...
> 

yes. at the time, i think npppd's description made sense - it was
a newer version of the ppp server. i think it was pppd that had
the confusing description, but there was a reason for that too.
wasn;t there an alternative way to do dialup, and pppd was the
kernel method?

i guess i'm going to be burned for that vague text. anyway:

> The DESCRIPTIONs aren't much more helpful :)
> 

to be honest, i think they're clear enough. i do dislike the
descriptions: "new" always goes out of date. i personally don;t
have any suggestions though. if we make them the same, they could cause
more confusion (or just as much). we could make pppd client/daemon, and
remove "new" i suppose:

npppd - Point-to-Point Protocol daemon
pppd - Point-to-Point Protocol client/daemon

jmc



Re: [patch] fuse_main.3 - fix example to compile without warnings and apply style changes

2020-05-25 Thread Jason McIntyre
On Sat, May 23, 2020 at 01:12:41PM -0500, Edgar Pettijohn wrote:
> 

fixed, thanks.
jmc

> Index: fuse_main.3
> ===
> RCS file: /cvs/src/lib/libfuse/fuse_main.3,v
> retrieving revision 1.6
> diff -u -p -u -r1.6 fuse_main.3
> --- fuse_main.3   28 Nov 2018 21:19:11 -  1.6
> +++ fuse_main.3   23 May 2020 18:11:16 -
> @@ -56,39 +56,46 @@ Here is a simple example of a FUSE imple
>  
>  static int
>  fs_readdir(const char *path, void *data, fuse_fill_dir_t filler,
> -off_t off, struct fuse_file_info *ffi)
> +   off_t off, struct fuse_file_info *ffi)
>  {
>   if (strcmp(path, "/") != 0)
> - return (-ENOENT);
> + return -ENOENT;
>  
>   filler(data, ".", NULL, 0);
>   filler(data, "..", NULL, 0);
>   filler(data, "file", NULL, 0);
> - return (0);
> + return 0;
>  }
>  
>  static int
>  fs_read(const char *path, char *buf, size_t size, off_t off,
> -struct fuse_file_info *ffi)
> +struct fuse_file_info *ffi)
>  {
> - if (off >= 5)
> - return (0);
> + size_t len;
> + const char *file_contents = "fuse filesystem example\\n";
>  
> - size = 5 - off;
> - memcpy(buf, "data." + off, size);
> - return (size);
> + len = strlen(file_contents);
> +
> + if (off < len) {
> + if (off + size > len)
> + size = len - off;
> + memcpy(buf, file_contents + off, size);
> + } else
> + size = 0;
> +
> + return size;
>  }
>  
>  static int
>  fs_open(const char *path, struct fuse_file_info *ffi)
>  {
>   if (strncmp(path, "/file", 10) != 0)
> - return (-ENOENT);
> + return -ENOENT;
>  
>   if ((ffi->flags & 3) != O_RDONLY)
> - return (-EACCES);
> + return -EACCES;
>  
> - return (0);
> + return 0;
>  }
>  
>  static int
> @@ -104,10 +111,10 @@ fs_getattr(const char *path, struct stat
>   st->st_nlink = 1;
>   st->st_size = 5;
>   } else {
> - return (-ENOENT);
> + return -ENOENT;
>   }
>  
> - return (0);
> + return 0;
>  }
>  
>  struct fuse_operations fsops = {
> @@ -118,9 +125,9 @@ struct fuse_operations fsops = {
>  };
>  
>  int
> -main(int ac, char **av)
> +main(int argc, char **argv)
>  {
> - return (fuse_main(ac, av, , NULL));
> + return (fuse_main(argc, argv, , NULL));
>  }
>  .Ed
>  .Sh SEE ALSO



Re: sysupgrade change to allow installing from url

2020-05-25 Thread Jason McIntyre
On Mon, May 25, 2020 at 03:25:40PM +0200, Solene Rapenne wrote:
> Hi,
> 
> I don't know if this will be accepted but I propose to add a -u [url]
> parameter to use older snapshots from an archive server for example.
> 
> I wanted to add an optional parameter to -s at first but in case of
> sysupgrade -s [installurl] the install url would have been mistaken by
> this.
> 
> If you specify a -u url and installurl at the same time, -u url
> superseed installurl.
> 
> This would allow easier bisecting using older snapshots.
> 
> Index: sysupgrade.8
> ===
> RCS file: /cvs/src/usr.sbin/sysupgrade/sysupgrade.8,v
> retrieving revision 1.10
> diff -u -p -r1.10 sysupgrade.8
> --- sysupgrade.8  3 Oct 2019 12:43:58 -   1.10
> +++ sysupgrade.8  25 May 2020 13:23:06 -
> @@ -24,6 +24,7 @@
>  .Nm
>  .Op Fl fkn
>  .Op Fl r | s
> +.Op Fl u Pa url
>  .Op Ar installurl
>  .Sh DESCRIPTION
>  .Nm
> @@ -66,6 +67,13 @@ This is the default if the system is cur
>  .It Fl s
>  Upgrade to a snapshot.
>  This is the default if the system is currently running a snapshot.
> +.It Fl u Pa url
> +Fetch and verify the files downloaded from 
> +.Pa url .
> +This is superseeding
> +.Op Pa installurl ,
> +its usage is intended for installing older snapshots available under url not 
> following
> +the usual installurl format.

hi. i would rewrite this a little:

It is intended for installing older snapshots available which do not 
follow
the usual installurl format;
it takes precedence over
.Pa installurl .

sth like that

i don;t know whether you want to try and make it like -u url | installurl

jmc

>  .El
>  .Sh FILES
>  .Bl -tag -width "/auto_upgrade.conf" -compact
> Index: sysupgrade.sh
> ===
> RCS file: /cvs/src/usr.sbin/sysupgrade/sysupgrade.sh,v
> retrieving revision 1.37
> diff -u -p -r1.37 sysupgrade.sh
> --- sysupgrade.sh 26 Jan 2020 22:08:36 -  1.37
> +++ sysupgrade.sh 25 May 2020 13:23:06 -
> @@ -34,7 +34,7 @@ ug_err()
>  
>  usage()
>  {
> - ug_err "usage: ${0##*/} [-fkn] [-r | -s] [installurl]"
> + ug_err "usage: ${0##*/} [-fkn] [-r | -s] [-u url] [installurl]"
>  }
>  
>  unpriv()
> @@ -79,13 +79,14 @@ FORCE=false
>  KEEP=false
>  REBOOT=true
>  
> -while getopts fknrs arg; do
> +while getopts fknrsu: arg; do
>   case ${arg} in
>   f)  FORCE=true;;
>   k)  KEEP=true;;
>   n)  REBOOT=false;;
>   r)  RELEASE=true;;
>   s)  SNAP=true;;
> + u)  SNAPURL=${OPTARG};;
>   *)  usage;;
>   esac
>  done
> @@ -121,7 +122,11 @@ else
>  fi
>  
>  if $SNAP; then
> - URL=${MIRROR}/snapshots/${ARCH}/
> + if [[ -n "$SNAPURL" ]]; then
> + URL=$SNAPURL
> + else
> + URL=${MIRROR}/snapshots/${ARCH}/
> + fi
>  else
>   URL=${MIRROR}/${NEXT_VERSION}/${ARCH}/
>  fi
> 



Re: Add CAVEATS to ldom.conf(5) man page

2020-05-19 Thread Jason McIntyre
On Wed, May 20, 2020 at 02:30:31AM +0200, Ingo Schwarze wrote:
> Hi Kurt,
> 
> Kurt Mosiejczuk wrote on Tue, May 19, 2020 at 07:49:56PM -0400:
> > On Mon, May 18, 2020 at 08:12:00PM +0200, Klemens Nanni wrote:
> >> On Mon, May 18, 2020 at 01:20:07PM -0400, Kurt Mosiejczuk wrote:
> 
> >>> Learning how LDOMs work on this T4-1 and we only create 8 devices
> >>> (each /dev/ldom* and /dev/ttyV*) by default. The now-commonly-available
> >>> T4-1 machines can do far more than that pretty easily, so bump up the
> >>> number created by default from 8 to 16.
> 
> >> Seems reasonable, what about adopting vmd(8) CAVEATS for ldomd(8)?
> >> Running out of devices with more guests can be nasty do debug.
> 
> > Here's an attempt at doing that. There isn't a man page for the ldom
> > devices nor is there one specifically for the ttyV* devices, so I left
> > the ".Xr" off of those.
> 
> Fair enough as long as those don't exist; if you want to stress that
> those correspond to file names (below /dev/ i guess), you can use
> ".Pa ldom" and/or ".Pa ttyV"; your call.
> 
> I can't comment on the content, but:
> 
>$ mandoc -Tlint ldom.conf.5
>   mandoc: ldom.conf.5:136:10: WARNING: new sentence, new line
>   mandoc: ldom.conf.5:139:1: WARNING: blank line in fill mode, using .sp
>   mandoc: ldom.conf.5:140:1: WARNING: blank line in fill mode, using .sp
>   mandoc: ldom.conf.5:134:2: WARNING:
> sections out of conventional order: Sh CAVEATS
> 
> So here is a version that
> 
>  * starts the new sentence on a new input line
>  * avoids trailing blank lines
>  * puts CAVEATS before BUGS, which is the conventional ordering
> 

i'm fine with the text, but does it really warrant a CAVEATS section? it
sounds like it should just be part of "this is how it works" text.

jmc

> Feel free to use that, or parts of it as desired.
> 
> Yours,
>   Ingo
> 
> P.S.
> Maybe somebody wants to look at writing an ldom(4) manual page,
> too?  If i understand correctly, then usually, if there is a device
> file, having a manual page explaining its purpose is desirable,
> right?  Or should ldom(4) maybe be an additional .Nm in vldc(4),
> with a brief explanation what the purposes of the various vldc
> device nodes are?  Maybe a FILES section might help there, too?
> A bit like audio(4) has an additional name audioctl(4), even though
> "audioctl" does not appear in the kernel config files?
> 
> 
> Index: ldom.conf.5
> ===
> RCS file: /cvs/src/usr.sbin/ldomctl/ldom.conf.5,v
> retrieving revision 1.13
> diff -u -r1.13 ldom.conf.5
> --- ldom.conf.5   21 Feb 2020 19:39:28 -  1.13
> +++ ldom.conf.5   20 May 2020 00:22:39 -
> @@ -116,6 +116,12 @@
>  .Xr eeprom 8 ,
>  .Xr ldomctl 8 ,
>  .Xr ldomd 8
> +.Sh CAVEATS
> +Each guest requires one ldom device and one ttyV device per configured
> +logical domain.
> +Administrators may need to create additional devices using
> +.Xr MAKEDEV 8
> +if more than 16 logical domains are configured.
>  .Sh BUGS
>  The hypervisor requires a machine dependent amount of physical memory that is
>  reserved automatically.
> 



Re: Mention /etc/examples/ in those config files manpages + FILES short description

2020-05-16 Thread Jason McIntyre
On Thu, Apr 30, 2020 at 07:13:16PM +0200, clematis wrote:
> Hello,
> 
> Following the previous thread about /etc/examples/doas.conf [1] ,
> I've noticed those example files aren't always listed in their
> respective manpage or without a description.
> This has been discussed here recently for bgpd.conf [2].
> Also noticed updates for some of them like acme-client.conf [3].
> 
> Taking into account those email threads I would suggest the changes
> below:
> 

hi.

i've gotten round to committing something which lists the example file
in FILES, along with a standard wording (Example configuration file.) i
did not attempt to describe the contents - that is not the point of
FILES.

feel free to cvs up and make sure i didn;t miss anything, or otherwise
mess up.

thanks for your mail!
jmc

> Adding FILES section with description for:
> - /usr.sbin/dhcpd/dhcpd.conf.5
> - /usr.sbin/httpd/httpd.conf.5
> 
> Adding short description for:
> - /sbin/iked/iked.conf.5
> - /usr.sbin/inetd/inetd.8
> - /sbin/ipsecctl/ipsec.conf.5
> - /usr.bin/mandoc/man.conf.5
> - /usr.sbin/sasyncd/sasyncd.conf.5
> - /share/man/man5/sysctl.conf.5
> - /usr.sbin/vmd/vm.conf.5
> - /share/man/man5/wsconsctl.conf.5
> 
> Other changes:
> - /usr.sbin/mrouted/mrouted.8
>   +.Nm mrouted.conf + short description
> - /usr.sbin/rbootd/rbootd.8
>   +.Nm rbootd.conf + minor description update
> - /share/man/man8/rc.shutdown.8
>   adding example file + description
> 
> The others examples file' man pages looked OK and consistent with
> this approach.
> 
> Diff attached to this email. Please let me know if adjustments have to
> be made.
> 
> [1] https://marc.info/?t=15878367111=1=2
> [2] https://marc.info/?t=15812050392=1=2
> [3] 
> https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/acme-client/acme-client.conf.5.diff?r1=1.21=1.22=h
> 
> Thanks,
> 
> -- 
> clematis (0xA2C87EDB507B4C53)

> Index: dhcpd.conf.5
> ===
> RCS file: /cvs/src/usr.sbin/dhcpd/dhcpd.conf.5,v
> retrieving revision 1.25
> diff -u -p -r1.25 dhcpd.conf.5
> --- dhcpd.conf.5  17 Apr 2020 06:24:28 -  1.25
> +++ dhcpd.conf.5  30 Apr 2020 16:13:27 -
> @@ -885,6 +885,15 @@ the DHCP ACK or NAK reply sent to the cl
>  DHCP option statements are documented in the
>  .Xr dhcp-options 5
>  manual page.
> +.Sh FILES
> +.Bl -tag -width /etc/examples/dhcpd.conf -compact
> +.It Pa /etc/dhcpd.conf
> +Default
> +.Xr dhcpd 8
> +configuration file.
> +.It Pa /etc/examples/dhcpd.conf
> +Example configuration file.
> +.El
>  .Sh SEE ALSO
>  .Xr dhcp-options 5 ,
>  .Xr dhcpd.leases 5 ,

> Index: httpd.conf.5
> ===
> RCS file: /cvs/src/usr.sbin/httpd/httpd.conf.5,v
> retrieving revision 1.110
> diff -u -p -r1.110 httpd.conf.5
> --- httpd.conf.5  23 Apr 2020 21:10:53 -  1.110
> +++ httpd.conf.5  30 Apr 2020 16:16:57 -
> @@ -796,6 +796,15 @@ server "example.com" {
>   }
>  }
>  .Ed
> +.Sh FILES
> +.Bl -tag -width /etc/examples/httpd.conf -compact
> +.It Pa /etc/httpd.conf
> +Default
> +.Xr httpd 8
> +configuration file.
> +.It Pa /etc/examples/httpd.conf
> +Example configuration file.
> +.El
>  .Sh SEE ALSO
>  .Xr htpasswd 1 ,
>  .Xr patterns 7 ,

> Index: iked.conf.5
> ===
> RCS file: /cvs/src/sbin/iked/iked.conf.5,v
> retrieving revision 1.67
> diff -u -p -r1.67 iked.conf.5
> --- iked.conf.5   28 Apr 2020 15:18:52 -  1.67
> +++ iked.conf.5   30 Apr 2020 16:14:17 -
> @@ -937,7 +937,11 @@ backwards compatibility.
>  .Sh FILES
>  .Bl -tag -width /etc/examples/iked.conf -compact
>  .It Pa /etc/iked.conf
> +Default
> +.Xr iked 8
> +configuration file.
>  .It Pa /etc/examples/iked.conf
> +Example configuration file for EAP or pre-shared key authentification.
>  .El
>  .Sh EXAMPLES
>  The first example is intended for a server with clients connecting to

> Index: inetd.8
> ===
> RCS file: /cvs/src/usr.sbin/inetd/inetd.8,v
> retrieving revision 1.42
> diff -u -p -r1.42 inetd.8
> --- inetd.8   10 Feb 2020 13:18:21 -  1.42
> +++ inetd.8   30 Apr 2020 16:19:39 -
> @@ -361,7 +361,11 @@ only IPv6 traffic will be routed to the 
>  .Sh FILES
>  .Bl -tag -width /etc/examples/inetd.conf -compact
>  .It Pa /etc/inetd.conf
> +Default
> +.Xr inetd 8
> +configuration file.
>  .It Pa /etc/examples/inetd.conf
> +Example configuration file.
>  .El
>  .Sh SEE ALSO
>  .Xr comsat 8 ,

> Index: ipsec.conf.5
> ===
> RCS file: /cvs/src/sbin/ipsecctl/ipsec.conf.5,v
> retrieving revision 1.159
> diff -u -p -r1.159 ipsec.conf.5
> --- ipsec.conf.5  16 Feb 2020 11:28:28 -  1.159
> +++ ipsec.conf.5  30 Apr 2020 16:15:24 -
> @@ -994,7 +994,13 @@ and
>  .Sh FILES
>  .Bl -tag -width /etc/examples/ipsec.conf -compact
>  .It Pa 

Re: calendars typo

2020-05-12 Thread Jason McIntyre
On Tue, May 12, 2020 at 10:07:43PM +0200, f.holop wrote:
> A very minor typo:
> 

fixed, thanks.
jmc

> 
> diff --git usr.bin/calendar/calendars/calendar.music 
> usr.bin/calendar/calendars/calendar.music
> index e05c1b023..2118a658f 100644
> --- usr.bin/calendar/calendars/calendar.music
> +++ usr.bin/calendar/calendars/calendar.music
> @@ -199,7 +199,7 @@
>  05/11  Max Reger dies in Leipzig, Germany, 1916
>  05/12  Pink Floyd performs the first quadrophonic concert, 1977
>  05/12  Jules Emile Frederic Massenet is born, 1842
> -05/12  Berdrich Smetana dies, 1884
> +05/12  Bedrich Smetana dies, 1884
>  05/14  Lou Harrison is born in Portland, Oregon, 1917
>  05/17  Erik Satie is born in Honfleur, France, 1866
>  05/17  Paul Dukas dies in Paris, France, 1935
> 
> 
> -f
> -- 
> 



Re: Mention /etc/examples/ in those config files manpages + FILES short description

2020-05-01 Thread Jason McIntyre
On Fri, May 01, 2020 at 07:13:53AM -0600, Theo de Raadt wrote:
> I think there's a bit of drama going on here.
> 
> Once a person uses one example in the examples directory, they
> will become aware of the directory and see it has other files.
> And possibly use them in the future.
> 
> It is not clear to me that example discovery has to come via
> each and every manual page.
> 

yes, that's perfectly true. but it's also a bit about consistency - why
would we add entries to some pages and not others? i suppose we do it or
not.

jmc



Re: Mention /etc/examples/ in those config files manpages + FILES short description

2020-04-30 Thread Jason McIntyre
On Fri, May 01, 2020 at 12:22:26AM +0200, clematis wrote:
> On Thu, Apr 30, 2020 at 07:20:04PM +0100, Jason McIntyre wrote:
> > On Thu, Apr 30, 2020 at 07:13:16PM +0200, clematis wrote:
> > > Hello,
> > > 
> > > Following the previous thread about /etc/examples/doas.conf [1] ,
> > > I've noticed those example files aren't always listed in their
> > > respective manpage or without a description.
> > > This has been discussed here recently for bgpd.conf [2].
> > > Also noticed updates for some of them like acme-client.conf [3].
> > > 
> > > Taking into account those email threads I would suggest the changes
> > > below:
> > > 
> > > Adding FILES section with description for:
> > > - /usr.sbin/dhcpd/dhcpd.conf.5
> > > - /usr.sbin/httpd/httpd.conf.5
> > > 
> > > Adding short description for:
> > > - /sbin/iked/iked.conf.5
> > > - /usr.sbin/inetd/inetd.8
> > > - /sbin/ipsecctl/ipsec.conf.5
> > > - /usr.bin/mandoc/man.conf.5
> > > - /usr.sbin/sasyncd/sasyncd.conf.5
> > > - /share/man/man5/sysctl.conf.5
> > > - /usr.sbin/vmd/vm.conf.5
> > > - /share/man/man5/wsconsctl.conf.5
> > > 
> > > Other changes:
> > > - /usr.sbin/mrouted/mrouted.8
> > >   +.Nm mrouted.conf + short description
> > > - /usr.sbin/rbootd/rbootd.8
> > >   +.Nm rbootd.conf + minor description update
> > > - /share/man/man8/rc.shutdown.8
> > >   adding example file + description
> > > 
> > > The others examples file' man pages looked OK and consistent with
> > > this approach.
> > > 
> > > Diff attached to this email. Please let me know if adjustments have to
> > > be made.
> > > 
> > > [1] https://marc.info/?t=15878367111=1=2
> > > [2] https://marc.info/?t=15812050392=1=2
> > > [3] 
> > > https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/acme-client/acme-client.conf.5.diff?r1=1.21=1.22=h
> > > 
> > > Thanks,
> > > 
> > > -- 
> > > clematis (0xA2C87EDB507B4C53)
> > 
> > hi.
> 
> Hi Jason,
>  
> > i'm broadly in favour. having said that, i have a horrible feeling this
> > has come up before and there was some reason not to.
> 
> This might be the thread I was also referring to, in regards to
> bgpd.conf. In the end, there was kind of an agreement to move into that
> direction: https://marc.info/?l=openbsd-tech=158125647814751=2
> (at least it was my understanding)
> A lot was previously discussed in the dhclient.conf thread:
> https://marc.info/?t=15811267801=1=2
> 
> > supposing that no one has such a reason, i'd be happy to fix this.
> > however one thing bugs me - i don;t think the description in FILES
> > should attempt to outline the contents. it will just go out of date and
> > even if it doesn't, it's not the place. too wordy. i'd prefer to just
> > use a single, consistent, description. like "Example configuration
> > file." or somesuch.
> 
> Well, I see value doing it for the complex ones. I tend to agree that it
> might not be so valuable for the basic ones. Hence why only a few were
> providing more than a basic: "Example configuration file."
> That's also based on how "good" is the example file itself.
> It was my understanding that this was a direction some already have
> considered: https://marc.info/?l=openbsd-tech=158121091805006=2
> 
> I understand there's different opinions on that matter. And ultimately
> it's your call. But because this was done for 28 out of 41 files it felt
> right to carry on with the same approach for the remaining 13 files.
> Just so this now applies to all /etc/examples/ files' manpages
> "consistently".
> 
> Cheers,
> -- 
> clematis (0xA2C87EDB507B4C53)
> 

ok, so i see from those threads that i was against expanding FILES, but
happy for entries for the corresponding files.

so i'm broadly against your diff. ingo seems to have more or less
completely updated our FILES. the only question is about whether we need
FILES section in dhcpd.conf and httpd.conf.

i don;t understand your reference to 28 out of 41 files. i cannot see
where we added any expanded FILES entries. can you provide a summary of
these inconsistencies, please?

jmc



Re: IPv6 Support for umb(4)

2020-04-30 Thread Jason McIntyre
On Thu, Apr 30, 2020 at 03:33:56PM -0600, Theo de Raadt wrote:
> Jason McIntyre  wrote:
> 
> > On Thu, Apr 30, 2020 at 10:07:14PM +0100, Stuart Henderson wrote:
> > > 
> > > On 2020/04/30 20:52, Gerhard Roth wrote:
> > > > It it too much to expect users to read the ifconfig man page?
> > > 
> > > Printed, it is 28 pages of A4.
> > > 
> > 
> > ouch.
> > 
> > > Compare with the wifi drivers, you have to look at ifconfig(8) if
> > > you want all the details, but EXAMPLES in iwm(4) (and I think all the 
> > > other
> > > drivers) is enough for a quick bare-bones config. That seems a reasonable
> > > model.
> > > 
> > 
> > i think we have lost our way a bit with ifconfig.8. the need to avoid
> > repitition drove it, but bridge broke it.
> > 
> > we should start farming out all of the subsections back to their
> > respective pages.
> 
> Respective pages?!  The respective page for ifconfig commands *is* the
> ifconfig page.  The drivers impliment various lowlevel and system
> behaviours, but ifconfig is documenting the commands.
> 

there is more than one way to do it. that's all.

> > umb.4 is one screenful, but how to use it with
> > ifconfig is at the end of ifconfig.8. that can;t be optimal.
> 
> Since the beginning of umb, I've begged for it to stop being
> a such special snowflake, and to search for common functionality with
> other drivers, to hide the specialness.
> 
> But the previous comment remains.  These are ifconfig commands.
> They belong in the ifconfig manual page.  We don't describe ls options
> in filesystem manual pages, we describe them in the ls man page.
> 
> > of course there's an issue, and it's a big one: IEEE 802.11. farming
> > that out would inflate a lot of pages, and require care to keep
> > consistent.
> 
> It simply makes no sense.  Driver options aren't being explained.
> All of those drivers have interfaces to low-level network stack.
> The network stack is told what to do with the ifconfig command,
> using ifconfig options.  The docs are in the right place.
> 

since you disagree, it won;t happen.

but i don;t agree that the docs are in the right place - there is
no "right place". farming it out would solve some of ifconfig's
problems, and replace them with some other. it's a trade off. that's
all. i think the trade off would be worth it.

an analogy: carp documents some sysctls. but you use sysctl to set them.

jmc



Re: IPv6 Support for umb(4)

2020-04-30 Thread Jason McIntyre
On Thu, Apr 30, 2020 at 10:07:14PM +0100, Stuart Henderson wrote:
> 
> On 2020/04/30 20:52, Gerhard Roth wrote:
> > It it too much to expect users to read the ifconfig man page?
> 
> Printed, it is 28 pages of A4.
> 

ouch.

> Compare with the wifi drivers, you have to look at ifconfig(8) if
> you want all the details, but EXAMPLES in iwm(4) (and I think all the other
> drivers) is enough for a quick bare-bones config. That seems a reasonable
> model.
> 

i think we have lost our way a bit with ifconfig.8. the need to avoid
repitition drove it, but bridge broke it.

we should start farming out all of the subsections back to their
respective pages. umb.4 is one screenful, but how to use it with
ifconfig is at the end of ifconfig.8. that can;t be optimal.

of course there's an issue, and it's a big one: IEEE 802.11. farming
that out would inflate a lot of pages, and require care to keep
consistent.

thinks...

jmc



Re: Mention /etc/examples/ in those config files manpages + FILES short description

2020-04-30 Thread Jason McIntyre
On Thu, Apr 30, 2020 at 07:13:16PM +0200, clematis wrote:
> Hello,
> 
> Following the previous thread about /etc/examples/doas.conf [1] ,
> I've noticed those example files aren't always listed in their
> respective manpage or without a description.
> This has been discussed here recently for bgpd.conf [2].
> Also noticed updates for some of them like acme-client.conf [3].
> 
> Taking into account those email threads I would suggest the changes
> below:
> 
> Adding FILES section with description for:
> - /usr.sbin/dhcpd/dhcpd.conf.5
> - /usr.sbin/httpd/httpd.conf.5
> 
> Adding short description for:
> - /sbin/iked/iked.conf.5
> - /usr.sbin/inetd/inetd.8
> - /sbin/ipsecctl/ipsec.conf.5
> - /usr.bin/mandoc/man.conf.5
> - /usr.sbin/sasyncd/sasyncd.conf.5
> - /share/man/man5/sysctl.conf.5
> - /usr.sbin/vmd/vm.conf.5
> - /share/man/man5/wsconsctl.conf.5
> 
> Other changes:
> - /usr.sbin/mrouted/mrouted.8
>   +.Nm mrouted.conf + short description
> - /usr.sbin/rbootd/rbootd.8
>   +.Nm rbootd.conf + minor description update
> - /share/man/man8/rc.shutdown.8
>   adding example file + description
> 
> The others examples file' man pages looked OK and consistent with
> this approach.
> 
> Diff attached to this email. Please let me know if adjustments have to
> be made.
> 
> [1] https://marc.info/?t=15878367111=1=2
> [2] https://marc.info/?t=15812050392=1=2
> [3] 
> https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/acme-client/acme-client.conf.5.diff?r1=1.21=1.22=h
> 
> Thanks,
> 
> -- 
> clematis (0xA2C87EDB507B4C53)

hi.

i'm broadly in favour. having said that, i have a horrible feeling this
has come up before and there was some reason not to.

supposing that no one has such a reason, i'd be happy to fix this.
however one thing bugs me - i don;t think the description in FILES
should attempt to outline the contents. it will just go out of date and
even if it doesn't, it's not the place. too wordy. i'd prefer to just
use a single, consistent, description. like "Example configuration
file." or somesuch.

jmc

> Index: dhcpd.conf.5
> ===
> RCS file: /cvs/src/usr.sbin/dhcpd/dhcpd.conf.5,v
> retrieving revision 1.25
> diff -u -p -r1.25 dhcpd.conf.5
> --- dhcpd.conf.5  17 Apr 2020 06:24:28 -  1.25
> +++ dhcpd.conf.5  30 Apr 2020 16:13:27 -
> @@ -885,6 +885,15 @@ the DHCP ACK or NAK reply sent to the cl
>  DHCP option statements are documented in the
>  .Xr dhcp-options 5
>  manual page.
> +.Sh FILES
> +.Bl -tag -width /etc/examples/dhcpd.conf -compact
> +.It Pa /etc/dhcpd.conf
> +Default
> +.Xr dhcpd 8
> +configuration file.
> +.It Pa /etc/examples/dhcpd.conf
> +Example configuration file.
> +.El
>  .Sh SEE ALSO
>  .Xr dhcp-options 5 ,
>  .Xr dhcpd.leases 5 ,

> Index: httpd.conf.5
> ===
> RCS file: /cvs/src/usr.sbin/httpd/httpd.conf.5,v
> retrieving revision 1.110
> diff -u -p -r1.110 httpd.conf.5
> --- httpd.conf.5  23 Apr 2020 21:10:53 -  1.110
> +++ httpd.conf.5  30 Apr 2020 16:16:57 -
> @@ -796,6 +796,15 @@ server "example.com" {
>   }
>  }
>  .Ed
> +.Sh FILES
> +.Bl -tag -width /etc/examples/httpd.conf -compact
> +.It Pa /etc/httpd.conf
> +Default
> +.Xr httpd 8
> +configuration file.
> +.It Pa /etc/examples/httpd.conf
> +Example configuration file.
> +.El
>  .Sh SEE ALSO
>  .Xr htpasswd 1 ,
>  .Xr patterns 7 ,

> Index: iked.conf.5
> ===
> RCS file: /cvs/src/sbin/iked/iked.conf.5,v
> retrieving revision 1.67
> diff -u -p -r1.67 iked.conf.5
> --- iked.conf.5   28 Apr 2020 15:18:52 -  1.67
> +++ iked.conf.5   30 Apr 2020 16:14:17 -
> @@ -937,7 +937,11 @@ backwards compatibility.
>  .Sh FILES
>  .Bl -tag -width /etc/examples/iked.conf -compact
>  .It Pa /etc/iked.conf
> +Default
> +.Xr iked 8
> +configuration file.
>  .It Pa /etc/examples/iked.conf
> +Example configuration file for EAP or pre-shared key authentification.
>  .El
>  .Sh EXAMPLES
>  The first example is intended for a server with clients connecting to

> Index: inetd.8
> ===
> RCS file: /cvs/src/usr.sbin/inetd/inetd.8,v
> retrieving revision 1.42
> diff -u -p -r1.42 inetd.8
> --- inetd.8   10 Feb 2020 13:18:21 -  1.42
> +++ inetd.8   30 Apr 2020 16:19:39 -
> @@ -361,7 +361,11 @@ only IPv6 traffic will be routed to the 
>  .Sh FILES
>  .Bl -tag -width /etc/examples/inetd.conf -compact
>  .It Pa /etc/inetd.conf
> +Default
> +.Xr inetd 8
> +configuration file.
>  .It Pa /etc/examples/inetd.conf
> +Example configuration file.
>  .El
>  .Sh SEE ALSO
>  .Xr comsat 8 ,

> Index: ipsec.conf.5
> ===
> RCS file: /cvs/src/sbin/ipsecctl/ipsec.conf.5,v
> retrieving revision 1.159
> diff -u -p -r1.159 ipsec.conf.5
> --- ipsec.conf.5  16 Feb 2020 11:28:28 -  

Re: correction for insque.3

2020-04-26 Thread Jason McIntyre
On Thu, Apr 23, 2020 at 05:48:42PM -0400, Andras Farkas wrote:
> I was reading the thread about STAILQ and SIMPLEQ and thought it was
> interesting, so I then read a little about sys/queue.h and search.h
> I noticed an error in insque.3:
> https://man.openbsd.org/insque.3
> The words "next" and "previous" are swapped, as it is the first
> pointer that points to the next element, and the second pointer that
> points to the previous element.
> I confirmed this both in insque.c (to make sure I understood the
> directionality correctly):
> https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdlib/insque.c?rev=1.3=text/x-cvsweb-markup
> and in POSIX, which the man page states OpenBSD's insque() conforms to:
> https://pubs.opengroup.org/onlinepubs/9699919799/functions/insque.html
> 
> I have the diff to fix this both inline and attached.
> Checksum for anyone trying to grab the diff from inline, since my
> inline diffs usually get mangled:
> SHA256 (insque3diff.txt) =
> 8340d135c06abc46127a12307b9611d274e1ad3e35dc6cf662da15a1f4502dec
> 
> Index: insque.3
> ===
> RCS file: /cvs/src/lib/libc/stdlib/insque.3,v
> retrieving revision 1.10
> diff -u -p -r1.10 insque.3
> --- insque.3 30 Nov 2014 20:19:12 - 1.10
> +++ insque.3 23 Apr 2020 21:13:10 -
> @@ -61,7 +61,7 @@ struct qelem {
>  .Ed
>  .Pp
>  The first two elements in the struct must be pointers of the
> -same type that point to the previous and next elements in
> +same type that point to the next and previous elements in
>  the queue respectively.
>  Any subsequent data in the struct is application-dependent.
>  .Pp
> 

hi. i just committed this part.

> Also, I feel the phrasing isn't as clear as it could be.  The way
> "respectively" is used makes more sense in the way the other BSD man
> pages use "first and second" (in "first and second members") rather
> than the OpenBSD man page's "first two" (in "first two elements").  I
> think "respectively" makes more sense when used in analogy, or pairing
> up words.
> https://www.freebsd.org/cgi/man.cgi?query=insque=0=0=FreeBSD+12.1-RELEASE+and+Ports=default=html
> https://netbsd.gw.com/cgi-bin/man-cgi?insque
> https://leaf.dragonflybsd.org/cgi/web-man?command=insque=ANY
> Their wording is identical.
> 

but could;t convince myself that this was any clearer.

jmc

> I have a larger diff as an option, in light of the above:
> SHA256 (insque3difflarge.txt) =
> c2e242221f016ae4bafa3b40a466f27016d4f44b3f58053a60204e06aecefaf9
> 
> Index: insque.3
> ===
> RCS file: /cvs/src/lib/libc/stdlib/insque.3,v
> retrieving revision 1.10
> diff -u -p -r1.10 insque.3
> --- insque.3 30 Nov 2014 20:19:12 - 1.10
> +++ insque.3 23 Apr 2020 21:42:07 -
> @@ -60,8 +60,8 @@ struct qelem {
>  };
>  .Ed
>  .Pp
> -The first two elements in the struct must be pointers of the
> -same type that point to the previous and next elements in
> +The first and second elements in the struct must be pointers of the
> +same type that point to the next and previous elements in
>  the queue respectively.
>  Any subsequent data in the struct is application-dependent.
>  .Pp
> 
> Thanks for reading!

> Index: insque.3
> ===
> RCS file: /cvs/src/lib/libc/stdlib/insque.3,v
> retrieving revision 1.10
> diff -u -p -r1.10 insque.3
> --- insque.3  30 Nov 2014 20:19:12 -  1.10
> +++ insque.3  23 Apr 2020 21:13:10 -
> @@ -61,7 +61,7 @@ struct qelem {
>  .Ed
>  .Pp
>  The first two elements in the struct must be pointers of the
> -same type that point to the previous and next elements in
> +same type that point to the next and previous elements in
>  the queue respectively.
>  Any subsequent data in the struct is application-dependent.
>  .Pp

> Index: insque.3
> ===
> RCS file: /cvs/src/lib/libc/stdlib/insque.3,v
> retrieving revision 1.10
> diff -u -p -r1.10 insque.3
> --- insque.3  30 Nov 2014 20:19:12 -  1.10
> +++ insque.3  23 Apr 2020 21:42:07 -
> @@ -60,8 +60,8 @@ struct qelem {
>  };
>  .Ed
>  .Pp
> -The first two elements in the struct must be pointers of the
> -same type that point to the previous and next elements in
> +The first and second elements in the struct must be pointers of the
> +same type that point to the next and previous elements in
>  the queue respectively.
>  Any subsequent data in the struct is application-dependent.
>  .Pp



Re: resolv.conf(5) says options inet6 does nothing

2020-04-23 Thread Jason McIntyre
On Thu, Apr 23, 2020 at 05:17:08PM +0200, Solene Rapenne wrote:
> Is there a reason to keep this part in resolv.conf(5) about an option
> doing nothing?
> 
> > options inet6
> > Enables support for IPv6-only applications, by setting RES_USE_INET6
> > in _res.options (see res_init(3)). On OpenBSD this option does
> > nothing.
> 
> If we can remove it, here is the diff.
> 

hi.

i guess if you did this, you'd need to look at res_init.3 too.
jmc

> Index: resolv.conf.5
> ===
> RCS file: /home/cvs/src/share/man/man5/resolv.conf.5,v
> retrieving revision 1.59
> diff -u -p -r1.59 resolv.conf.5
> --- resolv.conf.5 24 Jan 2020 06:16:47 -  1.59
> +++ resolv.conf.5 23 Apr 2020 15:09:42 -
> @@ -258,13 +258,6 @@ particularly if there is a reduced MTU,
>  as is often the case with
>  .Xr pppoe 4
>  or with tunnels.
> -.It Cm inet6
> -Enables support for IPv6-only applications, by setting RES_USE_INET6 in
> -_res.options (see
> -.Xr res_init 3 ) .
> -On
> -.Ox
> -this option does nothing.
>  .It Cm insecure1
>  Do not require IP source address on the reply packet to be equal to the
>  server's address.
> 



Re: bwfm(4): document supported chipsets

2020-04-19 Thread Jason McIntyre
On Sun, Apr 19, 2020 at 10:24:31PM +0200, Stefan Sperling wrote:
> We really should be documenting supported wifi chipsets to help users
> find devices that will work with OpenBSD.
> The bwfm(4) man page leaves such questions entirely open at present.
> 
> The diff below intends to fill that gap by adding table which lists
> supported devices. The table includes chipset name, supported bands,
> MIMO config, and bus attachments.
> 
> I have cross-checked data in my table with internet searches. Sometimes
> I found official product sheets, but some info is based on tech press
> articles, copies of wikidevi pages, or gleaned from kernel messages
> posted on forums. It should be mostly accurate and much better than
> no info at all.
> 
> Note that some chips support bus attachments which bwfm does not
> recognize. I have documented the bus attachments which the driver
> actually supports, which is a subset of what the chipsets support.
> This list will need to be kept in sync anyway whenever device support
> in the driver is improved.
> 
> While here, also document the hex product IDs in bwfm's sdmmc attachment
> driver in source code comments. These hex numbers actually correspond
> to decimal chipset numbers but that is not immediately obvious so I think
> adding comments is warranted (of course it would be better to use macros,
> but I'm not going to go that far in a documentation patch).
> 
> ok?
>

ok.
jmc

> diff 5c72fbec79072d838dd652f6d7785e8d2b15dab2 /usr/src
> blob - f1df893ec80181f14a37bbc8703739bbca13e316
> file + share/man/man4/bwfm.4
> --- share/man/man4/bwfm.4
> +++ share/man/man4/bwfm.4
> @@ -30,6 +30,36 @@ The
>  driver provides support for Broadcom and Cypress FullMAC network
>  adapters.
>  .Pp
> +The following table summarizes supported chipsets and their capabilites,
> +as well as the bus attachments recognized by the
> +.Nm
> +driver:
> +.Bl -column "Chipset" "Spectrum" "MIMO" "Bus" -offset 6n
> +.It Em Chipset Ta Em Spectrum Ta Em MIMO Ta Em Bus
> +.It BCM43143 Ta 2GHz Ta 1x1 Ta SDMMC/USB
> +.It BCM43236 Ta 2GHz/5GHz Ta 2x2 Ta USB
> +.It BCM4324 Ta  2GHz/5GHz Ta 2x2 Ta SDMMC
> +.It BCM43242 Ta 2GHz/5GHz Ta 2x2 Ta USB
> +.It BCM4329 Ta  2GHz/5GHz Ta 2x2 Ta SDMMC
> +.It BCM4330 Ta  2GHz/5GHz Ta 2x2 Ta SDMMC
> +.It BCM4334 Ta  2GHz/5GHz Ta 2x2 Ta SDMMC
> +.It BCM43340 Ta 2GHz/5GHz Ta 1x1 Ta SDMMC
> +.It BCM43341 Ta 2GHz/5GHz Ta 1x1 Ta SDMMC
> +.It BCM4335 Ta  2GHz/5GHz Ta 1x1 Ta SDMMC
> +.It BCM43362 Ta 2GHz Ta 1x1 Ta SDMMC
> +.It BCM43364 Ta 2GHz Ta 1x1 Ta SDMMC
> +.It BCM4339 Ta  2GHz/5GHz Ta 1x1 Ta SDMMC
> +.It BCM43430 Ta 2GHz Ta 1x1 Ta SDMMC
> +.It BCM43455 Ta  2GHz/5GHz Ta 1x1 Ta SDMMC
> +.It BCM43456 Ta  2GHz/5GHz Ta 2x2 Ta SDMMC
> +.It BCM4350 Ta 2GHz/5GHz Ta 2x2 Ta PCI
> +.It BCM4354 Ta  2GHz/5GHz Ta 2x2 Ta SDMMC
> +.It BCM4356 Ta 2GHz/5GHz Ta 2x2 Ta PCI/SDMMC
> +.It BCM43569 Ta 2GHz/5GHz Ta 2x2 Ta USB
> +.It BCM43602 Ta 2GHz/5GHz Ta 3x3 Ta PCI
> +.It BCM4371 Ta 2GHz/5GHz Ta 2x2 Ta PCI
> +.El
> +.Pp
>  These are the modes the
>  .Nm
>  driver can operate in:
> blob - b053ab936ef10b21834ed74640124d8abe761af2
> file + sys/dev/sdmmc/if_bwfm_sdio.c
> --- sys/dev/sdmmc/if_bwfm_sdio.c
> +++ sys/dev/sdmmc/if_bwfm_sdio.c
> @@ -222,12 +222,12 @@ bwfm_sdio_match(struct device *parent, void *match, vo
>   case 0x4345:
>   case 0x4354:
>   case 0x4356:
> - case 0xa887:
> - case 0xa94c:
> - case 0xa94d:
> - case 0xa962:
> - case 0xa9a6:
> - case 0xa9bf:
> + case 0xa887:/* BCM43143 */
> + case 0xa94c:/* BCM43340 */
> + case 0xa94d:/* BCM43341 */
> + case 0xa962:/* BCM43362 */
> + case 0xa9a6:/* BCM43430 */
> + case 0xa9bf:/* BCM43364 */
>   break;
>   default:
>   return 0;
> 



Re: suggest to run rpki-client hourly

2020-04-14 Thread Jason McIntyre
On Tue, Apr 14, 2020 at 01:05:44PM -0600, Todd C. Miller wrote:
> On Mon, 13 Apr 2020 21:45:21 -0600, Bob Beck wrote:
> 
> > Like this one plenty.  I think it's ok the values change on reload. 
> 
> Here's a cleaned up version that includes the man page.  The random
> interval can now be one of "~", "low~high", "low~", or "~high" where
> if low and/or high are omitted, the appropriate value for the field
> is used.  Multiple random intervals can be used, separated by a
> comma.
> 
>  - todd
> 

hi. i think the doc parts read fine.

a couple of points:

- in STANDARDS, i guess stick to using Ql rather than Dq
- the system crontab and the example in acme-client.1 should probably be 
changed too

jmc

> Index: usr.sbin/cron/crontab.5
> ===
> RCS file: /cvs/src/usr.sbin/cron/crontab.5,v
> retrieving revision 1.37
> diff -u -p -u -r1.37 crontab.5
> --- usr.sbin/cron/crontab.5   6 Jan 2020 19:44:09 -   1.37
> +++ usr.sbin/cron/crontab.5   14 Apr 2020 19:01:33 -
> @@ -144,7 +144,18 @@ For example,
>  .Ar hour
>  entry specifies execution at hours 8, 9, 10 and 11.
>  .Pp
> -Step values can be used in conjunction with ranges.
> +A random value (within the legal range) may be obtained by using the
> +.Ql ~
> +character in a field.
> +The interval of the random value may be specified explicitly, for example
> +.Dq 0~30
> +will result in a random value between 0 and 30 inclusive.
> +If either (or both) of the numbers on either side of the
> +.Ql ~
> +are omitted, the appropriate limit (low or high) for the field will be used.
> +.Pp
> +Step values can be used in conjunction with ranges (but not random ranges
> +which represent a single number).
>  Following a range with
>  .No / Ns Ar number
>  specifies skips of
> @@ -318,6 +329,9 @@ MAILTO=paul
>  23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday"
>  
>  5 4 * * sun echo "run at 5 after 4 every sunday"
> +
> +# run hourly at a random time within the first 30 minutes of the hour
> +0~30 * * * *   /usr/libexec/spamd-setup
>  .Ed
>  .Sh SEE ALSO
>  .Xr crontab 1 ,
> @@ -337,6 +351,10 @@ field may use 7 to represent Sunday.
>  .It
>  Ranges may include
>  .Dq steps .
> +.It
> +Random intervals are supported using the
> +.Dq ~
> +character.
>  .It
>  Months or days of the week can be specified by name.
>  .It
> Index: usr.sbin/cron/entry.c
> ===
> RCS file: /cvs/src/usr.sbin/cron/entry.c,v
> retrieving revision 1.49
> diff -u -p -u -r1.49 entry.c
> --- usr.sbin/cron/entry.c 13 Jun 2018 11:27:30 -  1.49
> +++ usr.sbin/cron/entry.c 14 Apr 2020 19:03:47 -
> @@ -450,33 +450,29 @@ static int
>  get_range(bitstr_t *bits, int low, int high, const char *names[],
> int ch, FILE *file)
>  {
> - /* range = number | number "-" number [ "/" number ]
> + /* range = number | number* "~" number* | number "-" number ["/" number]
>*/
>  
>   int i, num1, num2, num3;
>  
> + num1 = low;
> + num2 = high;
> +
>   if (ch == '*') {
> - /* '*' means "first-last" but can still be modified by /step
> + /* '*' means [low, high] but can still be modified by /step
>*/
> - num1 = low;
> - num2 = high;
>   ch = get_char(file);
>   if (ch == EOF)
>   return (EOF);
>   } else {
> - ch = get_number(, low, names, ch, file, ",- \t\n");
> - if (ch == EOF)
> - return (EOF);
> -
> - if (ch != '-') {
> - /* not a range, it's a single number.
> -  */
> - if (EOF == set_element(bits, low, high, num1)) {
> - unget_char(ch, file);
> + if (ch != '~') {
> + ch = get_number(, low, names, ch, file, ",-~ 
> \t\n");
> + if (ch == EOF)
>   return (EOF);
> - }
> - return (ch);
> - } else {
> + }
> +
> + switch (ch) {
> + case '-':
>   /* eat the dash
>*/
>   ch = get_char(file);
> @@ -488,6 +484,37 @@ get_range(bitstr_t *bits, int low, int h
>   ch = get_number(, low, names, ch, file, "/, \t\n");
>   if (ch == EOF || num1 > num2)
>   return (EOF);
> + break;
> + case '~':
> + /* eat the tilde
> +  */
> + ch = get_char(file);
> + if (ch == EOF)
> + return (EOF);
> +
> + /* get the (optional) number following the tilde
> +  */
> + ch = get_number(, low, names, 

Re: simplepanel(4) man page stub

2020-04-13 Thread Jason McIntyre
On Sun, Apr 05, 2020 at 03:24:30PM +0200, Marcus MERIGHI wrote:
> Hello,
> 
> reading plus.html I noticed that the link to simplepanel(4) was a dead
> end.
> 
> below is my attempt at a stub man page with what I could gather from
> plus.html and the commit log.
> 
> Marcus
> 

hi. thanks for the diff - i've committed a tweaked version.
jmc

> --- /dev/null Sun Apr  5 15:13:10 2020
> +++ src/share/man/man4/simplepanel.4  Sun Apr  5 15:08:52 2020
> @@ -0,0 +1,38 @@
> +.\" Copyright (c) 2020 Patrick Wildt 
> +.\"
> +.\" 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 5 2020 $
> +.Dt SIMPLEPANEL 4
> +.Os
> +.Sh NAME
> +.Nm simplepanel
> +.Nd simple panel display
> +.Sh SYNOPSIS
> +.Cd "simplepanel* at mainbus?"
> +.Sh DESCRIPTION
> +The
> +.Nm
> +driver enables the Pinebook Pro display panel.
> +.Sh SEE ALSO
> +.Xr mainbus 4
> +.Sh HISTORY
> +The
> +.Nm
> +driver first appeared in
> +.Ox 6.7
> +.Sh AUTHORS
> +The
> +.Nm
> +driver was written by
> +.An Patrick Wildt Aq Mt patr...@openbsd.org .
> 



Re: [patch] Remove old sshd_config(5) keyword from authpf(8) manual

2020-04-05 Thread Jason McIntyre
On Sun, Apr 05, 2020 at 11:05:48AM +0200, Martin Vahlensieck wrote:
> Hi!
> 
> From my research in the cvs history of sshd_config.5 the `Protocol'
> keyword was removed in 2016, so remove it here as well.
> 
> Best,
> 
> Martin
> 

fixed, thanks.
jmc

> Index: authpf.8
> ===
> RCS file: /cvs/src/usr.sbin/authpf/authpf.8,v
> retrieving revision 1.54
> diff -u -p -r1.54 authpf.8
> --- authpf.8  1 Nov 2015 21:26:48 -   1.54
> +++ authpf.8  5 Apr 2020 09:01:48 -
> @@ -379,7 +379,6 @@ must be properly configured to detect an
>  To that end, the following options should be added to
>  .Xr sshd_config 5 :
>  .Bd -literal -offset indent
> -Protocol 2
>  ClientAliveInterval 15
>  ClientAliveCountMax 3
>  .Ed
> 



Re: find.1: Markup primaries with Fl not Cm for easier tags

2020-03-20 Thread Jason McIntyre
On Fri, Mar 20, 2020 at 12:12:39AM +0100, Klemens Nanni wrote:

morning.

> In both command line usage and manual output format, find's options
> and primaries behave the same, but their mdoc(7) markup is different and
> therefore causes different tag names:
>

i'm not sure what you mean by behaving the same, but essentially you
could think of options and primaries as being different (as the page
does now). so i'm not surprised. i don;t really think of -group, for
example, as being an option.

> -x (option) can be looked up with ":tx" in the manual pager,
> whereas -amin (primary) requires ":t-amin" including the dash.
> 
> I'd like primaries to behave the same like options when it comes to tags
> in manuals, is that a reasonable expectation?
> 

i'm not going to answer that, but...

> If so, diff below switches all primaries from `Cm -amin' to `Fl amin'
> markup such that their resulting tag name is "amin" not "-amin";  man's
> output stays identical.
> 

you mean Ic, not Cm, right? if we do decide to do this, the diff would
have to be more comprehensive. there are are a lot of places where
primaries are discussed, which would need to be changed too (i.e. not
just list items).

note also that /-x and /-amin work pretty well, without source changes!

jmc

> Feedback? OK?
> 
> 
> Index: find.1
> ===
> RCS file: /cvs/src/usr.bin/find/find.1,v
> retrieving revision 1.98
> diff -u -p -U0 -r1.98 find.1
> --- find.12 Sep 2019 21:18:41 -   1.98
> +++ find.119 Mar 2020 22:59:33 -
> @@ -149 +149 @@ the last option given overrides the othe
> -.It Ic -amin Ar n
> +.It Fl amin Ar n
> @@ -156 +156 @@ minutes.
> -.It Ic -anewer Ar file
> +.It Fl anewer Ar file
> @@ -160 +160 @@ True if the current file has a more rece
> -.It Ic -atime Ar n
> +.It Fl atime Ar n
> @@ -167 +167 @@ was started, rounded up to the next full
> -.It Ic -cmin Ar n
> +.It Fl cmin Ar n
> @@ -175 +175 @@ minutes.
> -.It Ic -cnewer Ar file
> +.It Fl cnewer Ar file
> @@ -179 +179 @@ True if the current file has a more rece
> -.It Ic -ctime Ar n
> +.It Fl ctime Ar n
> @@ -187 +187 @@ was started, rounded up to the next full
> -.It Ic -delete
> +.It Fl delete
> @@ -205 +205 @@ Following symlinks is incompatible with 
> -.It Ic -depth
> +.It Fl depth
> @@ -211 +211 @@ option.
> -.It Ic -empty
> +.It Fl empty
> @@ -214,2 +214,2 @@ True if the current file or directory is
> -.It Ic -exec Ar utility Oo Ar argument ... Oc \&;
> -.It Ic -exec Ar utility Oo Ar argument ... Oc {} +
> +.It Fl exec Ar utility Oo Ar argument ... Oc \&;
> +.It Fl exec Ar utility Oo Ar argument ... Oc {} +
> @@ -256 +256 @@ does not exceed
> -.It Ic -execdir Ar utility Oo Ar argument ... Oc \&;
> +.It Fl execdir Ar utility Oo Ar argument ... Oc \&;
> @@ -284 +284 @@ flags specified exactly match those of t
> -.It Ic -follow
> +.It Fl follow
> @@ -290 +290 @@ option.
> -.It Ic -fstype Ar type
> +.It Fl fstype Ar type
> @@ -303 +303 @@ mounted read-only.
> -.It Ic -group Ar gname
> +.It Fl group Ar gname
> @@ -312 +312 @@ is treated as a group ID.
> -.It Ic -iname Ar pattern
> +.It Fl iname Ar pattern
> @@ -317 +317 @@ primary except that the matching is done
> -.It Ic -inum Ar n
> +.It Fl inum Ar n
> @@ -321 +321 @@ True if the file has inode number
> -.It Ic -links Ar n
> +.It Fl links Ar n
> @@ -326 +326 @@ links.
> -.It Ic -ls
> +.It Fl ls
> @@ -339 +339 @@ The format is identical to that produced
> -.It Ic -maxdepth Ar n
> +.It Fl maxdepth Ar n
> @@ -343 +343 @@ True if the current search depth is less
> -.It Ic -mindepth Ar n
> +.It Fl mindepth Ar n
> @@ -347 +347 @@ True if the current search depth is at l
> -.It Ic -mmin Ar n
> +.It Fl mmin Ar n
> @@ -354 +354 @@ minutes.
> -.It Ic -mtime Ar n
> +.It Fl mtime Ar n
> @@ -361 +361 @@ was started, rounded up to the next full
> -.It Ic -name Ar pattern
> +.It Fl name Ar pattern
> @@ -367 +367 @@ which may use any of the special charact
> -.It Ic -newer Ar file
> +.It Fl newer Ar file
> @@ -371 +371 @@ True if the current file has a more rece
> -.It Ic -nogroup
> +.It Fl nogroup
> @@ -374 +374 @@ True if the file belongs to an unknown g
> -.It Ic -nouser
> +.It Fl nouser
> @@ -377 +377 @@ True if the file belongs to an unknown u
> -.It Ic -ok Ar utility Oo Ar argument ... Oc \&;
> +.It Fl ok Ar utility Oo Ar argument ... Oc \&;
> @@ -393 +393 @@ expression is false.
> -.It Ic -path Ar pattern
> +.It Fl path Ar pattern
> @@ -427 +427 @@ Note, the first character of a symbolic 
> -.It Ic -print
> +.It Fl print
> @@ -434 +434 @@ character.
> -.It Ic -print0
> +.It Fl print0
> @@ -442 +442 @@ option to
> -.It Ic -prune
> +.It Fl prune
> @@ -453 +453 @@ option was specified.
> -.It Ic -size Ar n Ns Op Cm c
> +.It Fl size Ar n Ns Op Cm c
> @@ -465 +465 @@ bytes.
> -.It Ic -type Ar t
> +.It Fl type Ar t
> @@ -486 +486 @@ socket
> -.It Ic -user Ar uname
> +.It Fl user Ar uname
> @@ -495 +495 @@ is treated as a user ID.
> -.It Ic -xdev
> +.It Fl xdev
> 



Re: bt.5: Document exit, zero and delete functions

2020-03-19 Thread Jason McIntyre
On Thu, Mar 19, 2020 at 08:17:10PM +0100, Klemens Nanni wrote:
> On Thu, Mar 19, 2020 at 07:07:10PM +0000, Jason McIntyre wrote:
> > hi. i think you need to end these descriptions with a full stop. you did
> > it with the last list item already!
> Right, haven't done it for consistency with the other lists in there,
> but then again function descriptions are proper sentences.
> 
> Ending the last item was a mistake ;)
> 

well, that's a fair point - i failed to spot that there are two lists
previous ("variable names"), also minus full stops. so although i don;t
really like the missing stop, it would at least be consistent to just
remove the one you added. or we can add stops everywhere. your call!

jmc

> Thanks.
> 
> 
> Index: bt.5
> ===
> RCS file: /cvs/src/usr.sbin/btrace/bt.5,v
> retrieving revision 1.3
> diff -u -p -r1.3 bt.5
> --- bt.5  18 Mar 2020 20:19:42 -  1.3
> +++ bt.5  19 Mar 2020 19:15:56 -
> @@ -107,19 +107,30 @@ of the corresponding probe
>  .Pp
>  Functions:
>  .Pp
> -.Bl -tag -width "printf fmt ...  " -compact
> +.Bl -tag -width "delete(@map[key])" -compact
>  .It Fn clear "@map"
> -Delete all (key, value) pairs from map
> -.Va @map
> +Delete all (key, value) pairs from
> +.Va @map .
> +.It Fn delete "@map[key]"
> +Delete the pair indexed by
> +.Va key
> +from
> +.Va @map .
> +.It Fn exit
> +Terminate execution with exit code 0.
>  .It Fn print "@map"
> -Print all (key, value) pairs from map
> -.Va @map
> +Print all pairs from
> +.Va @map .
>  .It Fn printf "fmt" ...
>  print formatted string
>  .Va fmt
>  .It Fn time timefmt
>  print timestamps using
> -.Xr strftime 3
> +.Xr strftime 3 .
> +.It Fn zero "@map"
> +Set all values from
> +.Va @map
> +to 0.
>  .El
>  .Sh SEE ALSO
>  .Xr awk 1 ,
> 



Re: bt.5: Document exit, zero and delete functions

2020-03-19 Thread Jason McIntyre
On Thu, Mar 19, 2020 at 07:58:44PM +0100, Klemens Nanni wrote:
> Totally fine with me, just wanted to keep the diff clear, but I'll do so
> now before the manual grows further.
> 
> OK?
> 

hi. i think you need to end these descriptions with a full stop. you did
it with the last list item already!

the text reads fine.

jmc

> 
> Index: bt.5
> ===
> RCS file: /cvs/src/usr.sbin/btrace/bt.5,v
> retrieving revision 1.3
> diff -u -p -r1.3 bt.5
> --- bt.5  18 Mar 2020 20:19:42 -  1.3
> +++ bt.5  19 Mar 2020 18:57:57 -
> @@ -107,12 +107,19 @@ of the corresponding probe
>  .Pp
>  Functions:
>  .Pp
> -.Bl -tag -width "printf fmt ...  " -compact
> +.Bl -tag -width "delete(@map[key])" -compact
>  .It Fn clear "@map"
> -Delete all (key, value) pairs from map
> +Delete all (key, value) pairs from
>  .Va @map
> +.It Fn delete "@map[key]"
> +Delete the pair indexed by
> +.Va key
> +from
> +.Va @map
> +.It Fn exit
> +Terminate execution with exit code 0
>  .It Fn print "@map"
> -Print all (key, value) pairs from map
> +Print all pairs from
>  .Va @map
>  .It Fn printf "fmt" ...
>  print formatted string
> @@ -120,6 +127,10 @@ print formatted string
>  .It Fn time timefmt
>  print timestamps using
>  .Xr strftime 3
> +.It Fn zero "@map"
> +Set all values from
> +.Va @map
> +to 0.
>  .El
>  .Sh SEE ALSO
>  .Xr awk 1 ,
> 



Re: iked.conf.5: Provide GRE tunnel in transport mode example

2020-02-21 Thread Jason McIntyre
On Sat, Feb 22, 2020 at 12:26:01AM +0100, Klemens Nanni wrote:
> On Fri, Feb 21, 2020 at 10:28:50PM +0000, Jason McIntyre wrote:
> > it should be "a gre tunnel", not "an"
> Sure, leftover from previous wording/reshuffling.
> 
> > > +.Xr gre 4
> > > +tunnel from the local machine A to peer D using FQDN based public key
> > 
> > probably s/the local machine A/local machine A/ (as you do for peer D)
> > maybe "FQDN-based", since similar instances exist in this page:
> Both reads better, thanks.
> 
> > you should try to not split a sentence with a comma. if it's a list you
> > can do:
> I went with a semicolon.
> 
> 
> OK?
> 

ok by me, yes.
jmc

> 
> Index: iked.conf.5
> ===
> RCS file: /cvs/src/sbin/iked/iked.conf.5,v
> retrieving revision 1.63
> diff -u -p -r1.63 iked.conf.5
> --- iked.conf.5   21 Feb 2020 15:17:34 -  1.63
> +++ iked.conf.5   21 Feb 2020 23:25:01 -
> @@ -990,6 +990,23 @@ ikev2 "subnet" esp from 10.0.3.0/24 to 1
>  ikev2 esp from 10.0.5.0/30 to 10.0.5.4/30 peer 192.168.1.2
>  ikev2 esp from 10.0.5.8/30 to 10.0.5.12/30 peer 192.168.1.3
>  .Ed
> +.Pp
> +This example encrypts a
> +.Xr gre 4
> +tunnel from local machine A to peer D using FQDN-based public key
> +authentication.
> +.Ar transport
> +mode is used to avoid duplicate encapsulation of GRE;
> +.Ar dstid
> +is set explicitly to the peer's FQDN such that its public key is looked up 
> even
> +if the peer does not send its FQDN as peer ID:
> +.Bd -literal -offset indent
> +ikev2 transport \e
> + proto gre \e
> + from A.example.com to D.example.com \e
> + peer D.example.com \e
> + dstid D.example.com
> +.Ed
>  .Sh SEE ALSO
>  .Xr enc 4 ,
>  .Xr ipsec 4 ,
> 



Re: iked.conf.5: Provide GRE tunnel in transport mode example

2020-02-21 Thread Jason McIntyre
On Fri, Feb 21, 2020 at 11:12:24PM +0100, Klemens Nanni wrote:
> tobhe recently committed transport mode support, so here's an example
> that hopefully providea good starting point for users wanting to set up
> encrypted tunnels.
> 
> Feedback? OK?
> 

hi. feedback inline.

> 
> Index: iked.conf.5
> ===
> RCS file: /cvs/src/sbin/iked/iked.conf.5,v
> retrieving revision 1.63
> diff -u -p -r1.63 iked.conf.5
> --- iked.conf.5   21 Feb 2020 15:17:34 -  1.63
> +++ iked.conf.5   21 Feb 2020 22:07:03 -
> @@ -990,6 +990,23 @@ ikev2 "subnet" esp from 10.0.3.0/24 to 1
>  ikev2 esp from 10.0.5.0/30 to 10.0.5.4/30 peer 192.168.1.2
>  ikev2 esp from 10.0.5.8/30 to 10.0.5.12/30 peer 192.168.1.3
>  .Ed
> +.Pp
> +This example encrypts an

it should be "a gre tunnel", not "an"

> +.Xr gre 4
> +tunnel from the local machine A to peer D using FQDN based public key

probably s/the local machine A/local machine A/ (as you do for peer D)
maybe "FQDN-based", since similar instances exist in this page:

supports user-based authentication by tunneling the Extensible
required to support different challenge-based EAP methods like
or to support queue-based bandwidth control,
authentication and additional challenge-based EAP-MSCHAPv2 password

> +authentication.
> +.Ar transport
> +mode is used to avoid duplicate encapsulation of GRE,
> +.Ar dstid
> +is set explicitly to the peer's FQDN such that its public key is looked up 
> even
> +if the peer does not send its FQDN as peer ID:

you should try to not split a sentence with a comma. if it's a list you
can do:

one, two, and three

but with two things you want a semi-colon, a joining word (to get
technical), or to start a new sentence. i guess i'd go with a semi-colon
in this case (it's a logical joining).

> +.Bd -literal -offset indent
> +ikev2 transport \e
> + proto gre \e
> + from A.example.com to D.example.com \e
> + peer D.example.com \e
> + dstid D.example.com
> +.Ed
>  .Sh SEE ALSO
>  .Xr enc 4 ,
>  .Xr ipsec 4 ,
> 

otherwise reads ok./

jmc



Re: iked.conf.5, ipsec.conf.5: Quote $domain in tag string

2020-02-16 Thread Jason McIntyre
On Sun, Feb 16, 2020 at 12:23:40AM +0100, Klemens Nanni wrote:
> On Sat, Feb 15, 2020 at 10:30:52PM +0000, Jason McIntyre wrote:
> > from a practical point of view, is there a reason to say when expansion
> > happens? by this i mean, what (if any) difference does it have for the
> > user - they will specify this in the conf file anyway, no?
> Macros are expanded by the parser at parse time, whereas variables are
> read as ordinary strings and left unmodified;  hence, quoted `"$domain"'
> gets passed to the daemon as is, which substitutes proper values before
> passing it to the kernel.  `$domain' without quotes never makes it to
> the daemon, that is with `domain = foo' somewhere else "foo" is being
> eventually passed unmodified to the kernel.
> 
> Macro:
> 
>   $ echo 'ike esp from ::1 to ::2 tag $domain' | ipsecctl -vnf- | grep 
> PF-Tag  
>   stdin: 1: macro 'domain' not defined
>   stdin: 1: syntax error
>   ipsecctl: Syntax error in config file: ipsec rules not loaded
>   $ echo 'ike esp from ::1 to ::2 tag $domain' | ipsecctl -Ddomain=foo 
> -vnf- | grep PF-Tag
>   C set [from-::1-to-::2]:PF-Tag=foo force
> 
> Variable:
> 
>   $ echo 'ike esp from ::1 to ::2 tag "$domain"' | ipsecctl -vnf- | grep 
> PF-Tag
>   C set [from-::1-to-::2]:PF-Tag=$domain force
>   $ echo 'ike esp from ::1 to ::2 tag "$domain"' | ipsecctl -Ddomain=foo 
> -vnf- | grep PF-Tag
>   C set [from-::1-to-::2]:PF-Tag=$domain force
> 
> 
> > if it doesn;t have to be said, we could knock out the whole runtime
> > sentence.
> > 
> > if it does have to be said (i realise i may be overlooking something
> > obvious here) could we be smarter about making the text shorter?
> It briefly outlines the above mentioned, so I'd like to retain it.
> 
> Strictly speaking, it must only be quoted if the tag string _starts_
> with a dollar sign, but that is parser specific and I explicitly want
> to advise general quoting of variables:
> 
>   $ echo 'ike esp from ::1 to ::2 tag ipsec-$domain' | ipsecctl -vnf- | 
> grep PF-Tag 
>   C set [from-::1-to-::2]:PF-Tag=ipsec-$domain force
> 
> > The variable expansion for the
> > .Ar tag
> > directive only occurs at runtime (not when the file is parsed)
> > and must be quoted, or it will be interpreted as a macro.
> That reads fine, I incorporated your wording, thanks.
> 
> OK?
> 

yep, ok by me.
jmc

> 
> Index: sbin/iked/iked.conf.5
> ===
> RCS file: /cvs/src/sbin/iked/iked.conf.5,v
> retrieving revision 1.61
> diff -u -p -r1.61 iked.conf.5
> --- sbin/iked/iked.conf.5 10 Feb 2020 13:18:20 -  1.61
> +++ sbin/iked/iked.conf.5 15 Feb 2020 23:19:20 -
> @@ -64,7 +64,7 @@ for more information about manual keying
>  is divided into three main sections:
>  .Bl -tag -width 
>  .It Sy Macros
> -User-defined variables may be defined and used later, simplifying the
> +User-defined macros may be defined and used later, simplifying the
>  configuration file.
>  .It Sy Global Configuration
>  Global settings for
> @@ -643,7 +643,8 @@ expands to
>  .Dq ipsec-example.com .
>  The variable expansion for the
>  .Ar tag
> -directive occurs only at runtime, not during configuration file parse time.
> +directive occurs only at runtime (not when the file is parsed)
> +and must be quoted, or it will be interpreted as a macro.
>  .It Ic tap Ar interface
>  Send the decapsulated IPsec traffic to the specified
>  .Xr enc 4 @@ -766,7 +767,7 @@ configuration and also sets an alternati
>  device:
>  .Bd -literal -offset indent
>  ikev2 esp from 10.1.1.0/24 to 10.1.2.0/24 peer 192.168.3.2 \e
> - tag ipsec-$domain tap "enc1"
> + tag "ipsec-$domain" tap "enc1"
>  .Ed
>  .Sh OUTGOING NETWORK ADDRESS TRANSLATION
>  In some network topologies it is desirable to perform NAT on traffic leaving
> Index: sbin/ipsecctl/ipsec.conf.5
> ===
> RCS file: /cvs/src/sbin/ipsecctl/ipsec.conf.5,v
> retrieving revision 1.158
> diff -u -p -r1.158 ipsec.conf.5
> --- sbin/ipsecctl/ipsec.conf.510 Feb 2020 13:18:20 -  1.158
> +++ sbin/ipsecctl/ipsec.conf.515 Feb 2020 23:19:43 -
> @@ -466,7 +466,8 @@ expands to
>  .Dq ipsec-bar.org .
>  The variable expansion for the
>  .Ar tag
> -directive occurs only at runtime, not during configuration file parse time.
> +directive occurs only at runtime (not when the file is parsed)
> +and must be quoted, or it will be interpreted as a macro.
>  .El
>  .Sh PACKET FILTERING
>  IPsec traffic appears unencrypted on the
> @@ -575,7 +576,7 @@ The tags will be assigned by the followi
>  example:
>  .Bd -literal -offset indent
>  ike esp from 10.1.1.0/24 to 10.1.2.0/24 peer 192.168.3.2 \e
> - tag ipsec-$domain
> + tag "ipsec-$domain"
>  .Ed
>  .Sh OUTGOING NETWORK ADDRESS TRANSLATION
>  In some network topologies it is desirable to perform NAT on traffic leaving
> 



Re: iked.conf.5, ipsec.conf.5: Quote $domain in tag string

2020-02-15 Thread Jason McIntyre
On Sat, Feb 15, 2020 at 11:17:36PM +0100, Klemens Nanni wrote:
> On Sat, Feb 15, 2020 at 09:57:51PM +0000, Jason McIntyre wrote:
> > for the reader, it's hard to know if the text ipsec-$domain is
> > quoted because we are emphasising it (as we subsequently do for
> > ipsec-example.com) or because the actual quotes are required.
> > 
> > your mail states something that the document doesn't:
> > 
> > Otherwise it will be evaluated as macro during config parsing;
> Good point, I stated the quoting requirement and renamed "variable" to
> "macro" in the Macros section for the sake of clarity.
> 
> OK?
> 
> 
> Index: sbin/iked/iked.conf.5
> ===
> RCS file: /cvs/src/sbin/iked/iked.conf.5,v
> retrieving revision 1.61
> diff -u -p -r1.61 iked.conf.5
> --- sbin/iked/iked.conf.5 10 Feb 2020 13:18:20 -  1.61
> +++ sbin/iked/iked.conf.5 15 Feb 2020 22:14:15 -
> @@ -64,7 +64,7 @@ for more information about manual keying
>  is divided into three main sections:
>  .Bl -tag -width 
>  .It Sy Macros
> -User-defined variables may be defined and used later, simplifying the
> +User-defined macros may be defined and used later, simplifying the
>  configuration file.
>  .It Sy Global Configuration
>  Global settings for
> @@ -644,6 +644,7 @@ expands to
>  The variable expansion for the
>  .Ar tag
>  directive occurs only at runtime, not during configuration file parse time.
> +Strings with variables must be quoted, otherwise they are interpreted as 
> macros.

from a practical point of view, is there a reason to say when expansion
happens? by this i mean, what (if any) difference does it have for the
user - they will specify this in the conf file anyway, no?

if it doesn;t have to be said, we could knock out the whole runtime
sentence.

if it does have to be said (i realise i may be overlooking something
obvious here) could we be smarter about making the text shorter?

The variable expansion for the
.Ar tag
directive only occurs at runtime (not when the file is parsed)
and must be quoted, or it will be interpreted as a macro.

jmc

>  .It Ic tap Ar interface
>  Send the decapsulated IPsec traffic to the specified
>  .Xr enc 4
> @@ -766,7 +767,7 @@ configuration and also sets an alternati
>  device:
>  .Bd -literal -offset indent
>  ikev2 esp from 10.1.1.0/24 to 10.1.2.0/24 peer 192.168.3.2 \e
> - tag ipsec-$domain tap "enc1"
> + tag "ipsec-$domain" tap "enc1"
>  .Ed
>  .Sh OUTGOING NETWORK ADDRESS TRANSLATION
>  In some network topologies it is desirable to perform NAT on traffic leaving
> Index: sbin/ipsecctl/ipsec.conf.5
> ===
> RCS file: /cvs/src/sbin/ipsecctl/ipsec.conf.5,v
> retrieving revision 1.158
> diff -u -p -r1.158 ipsec.conf.5
> --- sbin/ipsecctl/ipsec.conf.510 Feb 2020 13:18:20 -  1.158
> +++ sbin/ipsecctl/ipsec.conf.515 Feb 2020 22:14:14 -
> @@ -467,6 +467,7 @@ expands to
>  The variable expansion for the
>  .Ar tag
>  directive occurs only at runtime, not during configuration file parse time.
> +Strings with variables must be quoted, otherwise they are interpreted as 
> macros.
>  .El
>  .Sh PACKET FILTERING
>  IPsec traffic appears unencrypted on the
> @@ -575,7 +576,7 @@ The tags will be assigned by the followi
>  example:
>  .Bd -literal -offset indent
>  ike esp from 10.1.1.0/24 to 10.1.2.0/24 peer 192.168.3.2 \e
> - tag ipsec-$domain
> + tag "ipsec-$domain"
>  .Ed
>  .Sh OUTGOING NETWORK ADDRESS TRANSLATION
>  In some network topologies it is desirable to perform NAT on traffic leaving
> 



Re: iked.conf.5, ipsec.conf.5: Quote $domain in tag string

2020-02-15 Thread Jason McIntyre
On Sat, Feb 15, 2020 at 10:38:08PM +0100, Klemens Nanni wrote:
> Otherwise it will be evaluated as macro during config parsing; `$domain`
> is a special value that is bein replaced much later at runtime.
> 
> iked.conf's EXAMPLES already quotes it.
> 
> OK?
> 

hi.

maybe the tag sections of these pages should say explicitly that they
need to be quoted? the current text is ambiguous:

   For example, if the ID is FQDN/foo.example.com or
   UFQDN/u...@example.com, "ipsec-$domain" expands to
   "ipsec-example.com".  The variable expansion for the
   tag directive occurs only at runtime, not during
   configuration file parse time.

for the reader, it's hard to know if the text ipsec-$domain is
quoted because we are emphasising it (as we subsequently do for
ipsec-example.com) or because the actual quotes are required.

your mail states something that the document doesn't:

Otherwise it will be evaluated as macro during config parsing;

jmc

> Index: ipsec.conf.5
> ===
> RCS file: /cvs/src/sbin/ipsecctl/ipsec.conf.5,v
> retrieving revision 1.158
> diff -u -p -r1.158 ipsec.conf.5
> --- ipsec.conf.5  10 Feb 2020 13:18:20 -  1.158
> +++ ipsec.conf.5  15 Feb 2020 21:29:51 -
> @@ -575,7 +575,7 @@ The tags will be assigned by the followi
>  example:
>  .Bd -literal -offset indent
>  ike esp from 10.1.1.0/24 to 10.1.2.0/24 peer 192.168.3.2 \e
> - tag ipsec-$domain
> + tag "ipsec-$domain"
>  .Ed
>  .Sh OUTGOING NETWORK ADDRESS TRANSLATION
>  In some network topologies it is desirable to perform NAT on traffic leaving
> Index: iked.conf.5
> ===
> RCS file: /cvs/src/sbin/iked/iked.conf.5,v
> retrieving revision 1.61
> diff -u -p -r1.61 iked.conf.5
> --- iked.conf.5   10 Feb 2020 13:18:20 -  1.61
> +++ iked.conf.5   15 Feb 2020 21:34:19 -
> @@ -766,7 +766,7 @@ configuration and also sets an alternati
>  device:
>  .Bd -literal -offset indent
>  ikev2 esp from 10.1.1.0/24 to 10.1.2.0/24 peer 192.168.3.2 \e
> - tag ipsec-$domain tap "enc1"
> + tag "ipsec-$domain" tap "enc1"
>  .Ed
>  .Sh OUTGOING NETWORK ADDRESS TRANSLATION
>  In some network topologies it is desirable to perform NAT on traffic leaving
> 



Re: enc.4: Remove tcpdump WARNING

2020-02-15 Thread Jason McIntyre
On Sat, Feb 15, 2020 at 10:08:43PM +0100, Klemens Nanni wrote:
> Current tcpdump(8) does not emit this warning:
> 
>   # sysctl -n kern.version   
>   OpenBSD 6.6-current (GENERIC.MP) #200: Thu Jan 30 07:08:22 MST 2020
>   
> dera...@sparc64.openbsd.org:/usr/src/sys/arch/sparc64/compile/GENERIC.MP
> 
>   # ifconfig enc0
>   enc0: flags=41
>   index 21 priority 0 llprio 3
>   groups: enc
>   status: active
>   # tcpdump -envps 1500 -i enc0 -l
>   tcpdump: listening on enc0, link-type ENC
> 
> OK?
> 

in that case, ok!
jmc

> 
> Index: enc.4
> ===
> RCS file: /cvs/src/share/man/man4/enc.4,v
> retrieving revision 1.29
> diff -u -p -r1.29 enc.4
> --- enc.4 16 Feb 2015 16:38:54 -  1.29
> +++ enc.4 15 Feb 2020 21:05:43 -
> @@ -108,7 +108,6 @@ interface to see packets prior to encaps
>  For example:
>  .Bd -literal -offset 3n
>  # tcpdump -envps 1500 -i enc0 -l | grep 10.0.0.33
> -tcpdump: WARNING: enc0: no IPv4 address assigned
>  tcpdump: listening on enc0, link-type ENC
>  15:05:08.934708 (authentic,confidential): SPI 0x6bcac587: \e
>   172.25.0.45 > 1.2.3.4: 10.9.9.28.7001 > 10.0.0.33.7000: \e
> 



Re: ssh.1: document -F none

2020-02-15 Thread Jason McIntyre
On Sat, Feb 15, 2020 at 06:23:09PM +0100, Christian Weisgerber wrote:
> OK?  Better phrasing?
> 
> Index: ssh.1
> ===
> RCS file: /cvs/src/usr.bin/ssh/ssh.1,v
> retrieving revision 1.410
> diff -u -p -r1.410 ssh.1
> --- ssh.1 7 Feb 2020 03:54:44 -   1.410
> +++ ssh.1 15 Feb 2020 17:20:52 -
> @@ -233,6 +233,9 @@ the system-wide configuration file
>  will be ignored.
>  The default for the per-user configuration file is
>  .Pa ~/.ssh/config .
> +If set to
> +.Dq none ,
> +no configuration file will be read.
>  .Pp
>  .It Fl f
>  Requests
> -- 
> Christian "naddy" Weisgerber  na...@mips.inka.de
> 

hi. i think your text is fine. there is a possible ambiguity though -
does "-F none" result in just ~/.ssh/config being ignored or both
~/.ssh/config and /etc/ssh/ssh_config?

if the former, maybe "no per-user configuration file will be read".
if the latter, maybe "no configuration files will be read" (plural).

i don;t like the use of "will be", but it correctly matches the rest of
the text, so fine/

jmc



Re: dd(1) wording and style

2020-02-14 Thread Jason McIntyre
On Fri, Feb 14, 2020 at 05:37:27PM +0100, Ingo Schwarze wrote:
> Hi,
> 
> Jason McIntyre wrote on Fri, Feb 14, 2020 at 07:28:59AM +:
> > On Thu, Feb 13, 2020 at 11:25:07PM +0100, Jan Stary wrote:
> 
> >> -.It Cm seek= Ns Ar n
> >> +.It Cm seek Ns = Ns Ar n
> >>  Seek
> >>  .Ar n
> >>  blocks from the beginning of the output before copying.
> >> -On non-tape devices, an
> >> -.Xr lseek 2
> >> -operation is used.
> >> -Otherwise, existing blocks are read and the data discarded.
> >> -If the user does not have read permission for the tape, it is positioned
> >> -using the tape
> >> +On a tape device, existing blocks are read and the data discarded;
> >> +if the user does not have read permission for the tape,
> >> +it is positioned using the tape
> >>  .Xr ioctl 2
> >>  function calls.
> >> +On all other devices devices, an
> >> +.Xr lseek 2
> >> +operation is used.
> >>  If the seek operation is past the end of file, space from the current
> >>  end of file to the specified offset is filled with blocks of NUL bytes.
> 
> > i think this change is ok. however i think non-tape is clearer than "on
> > all other devices". it's not a biggie, but i think the current stress on
> > non-tape devices is probably intentional.
> 
> The patch is misleading.  The sentence "If the seek operation is
> past the end of file..." only applies to tape devices, so it must
> not follow a sentence about lseek(2).
> 
> I'm not convinced the text needs to be changed.
> 
> The existing order makes sense because the non-tape case can be
> handled quickly, and then all the remaining complicated explanations
> apply to tapes only.
> 
> Or what would you want to change, and why?
> 

i understand. so i agree with your assessment (i failed to read further
into the text!)

> 
> >> @@ -135,14 +137,10 @@ Otherwise, input data is read and discar
> >>  For pipes, the correct number of bytes is read.
> >>  For all other devices, the correct number of blocks is read without
> >>  distinguishing between a partial or complete block being read.
> >> -.It Xo
> >> -.Sm off
> >> -.Cm status= Ar value
> >> -.Sm on
> >> -.Xc
> >> -Where
> >> +.It Cm status Ns = Ns Ar value
> >> +where
> 
> > you're correct that "Where" doesn;t really start a sentence, but this is
> > sentence start position. using a small letter is also incorrect.
> > 
> > in all honesty i would leave this, because it is not easy to rewrite in
> > a way that sounds natural. but maybe
> > 
> > The
> > .Ar value
> > parameter is one of the symbols from the following list:
> 
> That would look ugly by causing the line to wrap, but what about
> the patch below?
>

line wrap?

anyway, i'm ok with your diff, but in all honesty, i'd just get over the
fact that it isn;t quite lovely, and just start

.Ar value
is...

but i'm fine with your approach too.
jmc

> Yours,
>   Ingo
> 
> 
> Index: dd.1
> ===
> RCS file: /cvs/src/bin/dd/dd.1,v
> retrieving revision 1.36
> diff -u -r1.36 dd.1
> --- dd.1  14 Feb 2020 15:55:57 -  1.36
> +++ dd.1  14 Feb 2020 16:33:23 -
> @@ -136,9 +136,9 @@
>  For all other devices, the correct number of blocks is read without
>  distinguishing between a partial or complete block being read.
>  .It Cm status Ns = Ns Ar value
> -Where
> +The
>  .Ar value
> -is one of the symbols from the following list.
> +is one of the symbols from the following list:
>  .Bl -tag -width unblock
>  .It Cm noxfer
>  Do not print the transfer statistics as the last line of status output.
> @@ -147,9 +147,9 @@
>  Error messages are shown; informational messages are not.
>  .El
>  .It Cm conv Ns = Ns Ar value Ns Op , Ns Ar value ...
> -Where
> +Each
>  .Ar value
> -is one of the symbols from the following list.
> +is one of the symbols from the following list:
>  .Bl -tag -width unblock
>  .It Cm ascii
>  The same as the
> 



Re: dd(1) wording and style

2020-02-13 Thread Jason McIntyre
On Thu, Feb 13, 2020 at 11:25:07PM +0100, Jan Stary wrote:
> This diff changes the dd(1) manpage in the following ways:
> 

morning.

> * Replace "It Cm if= Ns Ar file" with "It Cm if Ns = Ns Ar file"
>   and similarly for others. The operand is "if", not "if=";
>   the "Ns = Ns" might be a slightly excessive markup,
>   but common: grep -Fr 'Ns = Ns' /usr/share/man | wc -l
>   and is symmetric around the =
> 

yes, it is common. and preferred, i think.

> * Fix a factual error in the description of bs: it does not
>   supersede ibs/obs, dd will error out when both are specified.
>  

i don;t want to comment on this change

i'll make some comments inline though:

> * "On non-tape devices ... Otherwise ..." is a convoluted way
>   to say "tape"; describe tape first and remove the double negative.
> 
> * Say "It Cm status Ns = Ns Ar value" instead of
> 
>   .It Xo
>   .Sm off
>   .Cm status= Ar value
>   .Sm on
>   .Xc
> 
> * "Where every value" is not a beginning of a sentence.
> 
> * Tweak the wording of osync: regular-sized output block
>   is enforced in every case, drop the "if not a multiple".
> 
>   Jan
> 
> 
> Index: dd.1
> ===
> RCS file: /cvs/src/bin/dd/dd.1,v
> retrieving revision 1.35
> diff -u -p -r1.35 dd.1
> --- dd.1  16 Feb 2019 17:01:24 -  1.35
> +++ dd.1  13 Feb 2020 21:45:56 -
> @@ -57,11 +57,11 @@ and truncated input records to the stand
>  .Pp
>  The following operands are available:
>  .Bl -tag -width of=file
> -.It Cm if= Ns Ar file
> +.It Cm if Ns = Ns Ar file
>  Read input from
>  .Ar file
>  instead of the standard input.
> -.It Cm of= Ns Ar file
> +.It Cm of Ns = Ns Ar file
>  Write output to
>  .Ar file
>  instead of the standard output.
> @@ -72,22 +72,24 @@ If an initial portion of the output file
>  .Cm seek
>  operand),
>  the output file is truncated at that point.
> -.It Cm ibs= Ns Ar n
> +.It Cm ibs Ns = Ns Ar n
>  Set the input block size to
>  .Ar n
>  bytes instead of the default 512.
> -.It Cm obs= Ns Ar n
> +.It Cm obs Ns = Ns Ar n
>  Set the output block size to
>  .Ar n
>  bytes instead of the default 512.
> -.It Cm bs= Ns Ar n
> +.It Cm bs Ns = Ns Ar n
>  Set both the input and output block size to
>  .Ar n
> -bytes, superseding the
> +bytes.
> +It is an error to specify both
> +.Cm bs
> +and either of
>  .Cm ibs
> -and
> -.Cm obs
> -operands.
> +or
> +.Cm obs .
>  If no conversion values other than
>  .Cm noerror ,
>  .Cm notrunc ,
> @@ -95,36 +97,36 @@ or
>  .Cm sync
>  are specified, then each input block is copied to the output as a
>  single block without any aggregation of short blocks.
> -.It Cm cbs= Ns Ar n
> +.It Cm cbs Ns = Ns Ar n
>  Set the conversion record size to
>  .Ar n
>  bytes.
>  The conversion record size is required by the record oriented conversion
>  values.
> -.It Cm count= Ns Ar n
> +.It Cm count Ns = Ns Ar n
>  Copy only
>  .Ar n
>  input blocks.
> -.It Cm files= Ns Ar n
> +.It Cm files Ns = Ns Ar n
>  Copy
>  .Ar n
>  input files before terminating.
>  This operand is only applicable when the input device is a tape.
> -.It Cm seek= Ns Ar n
> +.It Cm seek Ns = Ns Ar n
>  Seek
>  .Ar n
>  blocks from the beginning of the output before copying.
> -On non-tape devices, an
> -.Xr lseek 2
> -operation is used.
> -Otherwise, existing blocks are read and the data discarded.
> -If the user does not have read permission for the tape, it is positioned
> -using the tape
> +On a tape device, existing blocks are read and the data discarded;
> +if the user does not have read permission for the tape,
> +it is positioned using the tape
>  .Xr ioctl 2
>  function calls.
> +On all other devices devices, an
> +.Xr lseek 2
> +operation is used.

i think this change is ok. however i think non-tape is clearer than "on
all other devices". it's not a biggie, but i think the current stress on
non-tape devices is probably intentional.

>  If the seek operation is past the end of file, space from the current
>  end of file to the specified offset is filled with blocks of NUL bytes.
> -.It Cm skip= Ns Ar n
> +.It Cm skip Ns = Ns Ar n
>  Skip
>  .Ar n
>  blocks from the beginning of the input before copying.
> @@ -135,14 +137,10 @@ Otherwise, input data is read and discar
>  For pipes, the correct number of bytes is read.
>  For all other devices, the correct number of blocks is read without
>  distinguishing between a partial or complete block being read.
> -.It Xo
> -.Sm off
> -.Cm status= Ar value
> -.Sm on
> -.Xc
> -Where
> +.It Cm status Ns = Ns Ar value
> +where

you're correct that "Where" doesn;t really start a sentence, but this is
sentence start position. using a small letter is also incorrect.

in all honesty i would leave this, because it is not easy to rewrite in
a way that sounds natural. but maybe

The
.Ar value
parameter is one of the symbols from the following list:

>  .Ar value
> -is one of the symbols from the 

Re: mention /etc/examples/ in bgpf.conf(5)/bgpd(8)

2020-02-09 Thread Jason McIntyre
On Sun, Feb 09, 2020 at 02:27:23PM +0100, Marc Espie wrote:
> On Sun, Feb 09, 2020 at 12:41:43AM +0100, Sebastian Benoit wrote:
> > Ingo Schwarze(schwa...@usta.de) on 2020.02.09 00:33:06 +0100:
> > > Hi,
> > > 
> > > Jason McIntyre wrote on Sat, Feb 08, 2020 at 10:15:08PM +:
> > > 
> > > > - i'm ok with adding the path to these files to a FILES section
> > > 
> > > So, here is a specific patch for bgpf.conf(5) and bgpd(8) such
> > > that we can agree on a general direction for one case where
> > > the example file is particularly important.
> > > 
> > > Once the direction is agreed, applying it to the relatively
> > > small number of other cases is likely not difficult.
> > > 
> > > OK?
> > >   Ingo
> > 
> > I'm not against this as it only adds to the manpage, but an
> > alternative could be to just tell users (in afterboot(8)?) that there is
> > /etc/examples for them to look at and see whats there?
> > 
> > Otherwise ok.
> 
> I still think it's a good idea to put it in afterboot(8).
> That was the patch I sent to a few people that obviously triggered Ingo.
> 
> As for /etc/examples, I still think that directory has merits.
> It's WAY easier to copy an example file and uncomment/tweak the parts you
> need while skimming through the manpage than creating one from scratch.
> 
> Also, cut from an EXAMPLE in the manpage is distasteful.
> 
> Yeah, it's more info that has to be kept in synch. So what ? It's still
> useful, so it should stay.
> 
> Here's an updated version, taking Theo's remarks into account.
> 

hi. i'm fine with your text, but it would be better placed in the
section "Daemons" (yes i'm aware not all the files are for daemons)
or a new section in "FURTHER CHANGES".

jmc

> Index: afterboot.8
> ===
> RCS file: /cvs/src/share/man/man8/afterboot.8,v
> retrieving revision 1.164
> diff -u -p -r1.164 afterboot.8
> --- afterboot.8   28 Sep 2018 18:21:31 -  1.164
> +++ afterboot.8   9 Feb 2020 13:26:29 -
> @@ -60,6 +60,10 @@ command, type:
>  Administrators will rapidly become more familiar with
>  .Ox
>  if they get used to using the high quality manual pages.
> +.Pp
> +Some base programs and subsystems also come with sample configuration 
> +files in
> +.Pa /etc/examples .
>  .Ss Errata
>  By the time that you have installed your system, it is possible that
>  bugs in the release have been found.
> 



Re: mention /etc/examples/ in bgpf.conf(5)/bgpd(8)

2020-02-08 Thread Jason McIntyre
On Sun, Feb 09, 2020 at 01:15:59AM +0100, Ingo Schwarze wrote:
> Hi,
> 
> Theo de Raadt wrote on Sat, Feb 08, 2020 at 04:39:42PM -0700:
> 
> > For complicated configurations, the text could explain the reason the
> > example is valuable -- for instance
> > 
> > .It Pa /etc/examples/bgpd.conf
> > Example configuration file demonstrating IBGP mesh, multiple transits,
> > RPKI filtering, and other best practices.
> 
> I like that.  It gives the reader an idea of how interesting the file
> might be without even opening it.
> 
> We have to be careful to not make the comment too long, or FILES
> might look bad, but your text still looks reasonable to me.
> 
> I think it's sufficient to have this wording in bgpd.conf(5);
> in bgpd(8), mentioning the existence of the example seems fair, but
> the exact contents seem more tangential there.  I guess network
> admins running that beast will have to look at bgpd.conf(5) anyway.
> 
> 
> I applied Jason's recommendation to remove the "do not edit";
> probably he is right that it isn't required.
> 
> Regarding benno@'s comment:  /etc/exanmples/ is already mentioned
> in hier(7) and yet some people missed it.  I wouldn't blame them.
> Also, you don't really need to look into /etc/examples/ for all
> programs; if we point to it from where it matters, that's even
> better usability.  Still, i think it would *also* make sense to
> mention the directory in a FILES section in help(1), and optionally
> also in afterboot(8), though the latter seems less relevant.  I'm
> not feeling strongly about that, and one doesn't exclude the other.
> Pointers are cheap and can be added whereever they help, only not
> in such an amount that they would become a distraction.
> 
> Updated patch: still OK?
>   Ingo
> 

morning.

here's some issues i see. i'll concentrate on bgpd to keep it simple:

- bgpd.8 refers to /etc/bgpd.conf. that file doesn;t exist by default.
- i'm not convinced bgpd.8 needs to refer to the example file.
- only root can view the example file. i understand why, but in itself
  it's not that helpful.
- we've seen from this thread that people are missing the existence of
  /etc/examples/bgpd.conf. that's a shame because it looks like a nicely
  written file.

the essential issue is we want people to find the examples. the least
amount of work to achieve that is just for bgpd.conf.5 to mention it.
adding extra stuff about what's in there is a lot of work and sets us up
for things going out of date in the future. and although it might work
well for bgpd - a big, complex, piece of software, it will probably make
less sense for most other software. leaving us with a divided strategy.

it'd be good to have a clear idea of which pages we're planning to
change, and how, so that it's clear for other authors.

for bgpd i propose:

- no change to bgpd.8. i don;t have a solution to the fact that we moved
  its config file to examples/ so there isn;t an /etc/bgpd.conf file. i
  suppose everyone understands what is happening.
- for bgpd.conf.5, add an entry to FILES "example configuration file".
  no more.
- i'm not the right person to judge the existence of individual example
  files. ratchov already indicated he doesn;t see the point of
  examples/mixerctl.conf. i guess individual devs get to judge this.
- i think an addition to afterboot.8 totally makes sense. it's what it's
  there for.
- i don;t think an addition to help.1 makes sense. that is just trying
  to tell people how to use unix, and no one reads it anyway.

jmc

> 
> Index: bgpd.8
> ===
> RCS file: /cvs/src/usr.sbin/bgpd/bgpd.8,v
> retrieving revision 1.62
> diff -u -p -r1.62 bgpd.8
> --- bgpd.810 Nov 2019 20:51:53 -  1.62
> +++ bgpd.88 Feb 2020 23:52:00 -
> @@ -205,11 +205,13 @@ Only check the configuration file for va
>  Produce more verbose output.
>  .El
>  .Sh FILES
> -.Bl -tag -width "/var/run/bgpd.sockXXX" -compact
> +.Bl -tag -width "/etc/examples/bgpd.conf" -compact
>  .It Pa /etc/bgpd.conf
>  default
>  .Nm
>  configuration file
> +.It Pa /etc/examples/bgpd.conf
> +example configuration file
>  .It Pa /var/run/bgpd.sock
>  default
>  .Nm
> Index: bgpd.conf.5
> ===
> RCS file: /cvs/src/usr.sbin/bgpd/bgpd.conf.5,v
> retrieving revision 1.199
> diff -u -p -r1.199 bgpd.conf.5
> --- bgpd.conf.5   25 Jan 2020 12:07:28 -  1.199
> +++ bgpd.conf.5   8 Feb 2020 23:52:00 -
> @@ -1883,10 +1883,13 @@ For prefixes with equally long paths, th
>  is selected.
>  .El
>  .Sh FILES
> -.Bl -tag -width "/etc/bgpd.conf" -compact
> +.Bl -tag -width "/etc/examples/bgpd.conf" -compact
>  .It Pa /etc/bgpd.conf
>  .Xr bgpd 8
>  configuration file
> +.It Pa /etc/examples/bgpd.conf
> +example configuration file demonstrating IBGP mesh, multiple transits,
> +RPKI filtering, and other best practices
>  .El
>  .Sh SEE ALSO
>  .Xr strftime 3 ,
> 



Re: mention /etc/examples/ in bgpf.conf(5)/bgpd(8)

2020-02-08 Thread Jason McIntyre
On Sun, Feb 09, 2020 at 12:33:06AM +0100, Ingo Schwarze wrote:
> Hi,
> 
> Jason McIntyre wrote on Sat, Feb 08, 2020 at 10:15:08PM +:
> 
> > - i'm ok with adding the path to these files to a FILES section
> 
> So, here is a specific patch for bgpf.conf(5) and bgpd(8) such
> that we can agree on a general direction for one case where
> the example file is particularly important.
> 
> Once the direction is agreed, applying it to the relatively
> small number of other cases is likely not difficult.
> 
> OK?
>   Ingo
> 

i think it should just say sth like "example configuration file". i
don;t think we should say "do not edit": i hope people will understand
that they need to copy it over to /etc. i guess that is an issue with an
examples dir, but hopefully it is self explanatory.

jmc

> 
> Index: bgpd.8
> ===
> RCS file: /cvs/src/usr.sbin/bgpd/bgpd.8,v
> retrieving revision 1.62
> diff -u -p -r1.62 bgpd.8
> --- bgpd.810 Nov 2019 20:51:53 -  1.62
> +++ bgpd.88 Feb 2020 23:24:28 -
> @@ -205,11 +205,13 @@ Only check the configuration file for va
>  Produce more verbose output.
>  .El
>  .Sh FILES
> -.Bl -tag -width "/var/run/bgpd.sockXXX" -compact
> +.Bl -tag -width "/etc/examples/bgpd.conf" -compact
>  .It Pa /etc/bgpd.conf
>  default
>  .Nm
>  configuration file
> +.It Pa /etc/examples/bgpd.conf
> +example file, do not edit
>  .It Pa /var/run/bgpd.sock
>  default
>  .Nm
> Index: bgpd.conf.5
> ===
> RCS file: /cvs/src/usr.sbin/bgpd/bgpd.conf.5,v
> retrieving revision 1.199
> diff -u -p -r1.199 bgpd.conf.5
> --- bgpd.conf.5   25 Jan 2020 12:07:28 -  1.199
> +++ bgpd.conf.5   8 Feb 2020 23:24:28 -
> @@ -1883,10 +1883,12 @@ For prefixes with equally long paths, th
>  is selected.
>  .El
>  .Sh FILES
> -.Bl -tag -width "/etc/bgpd.conf" -compact
> +.Bl -tag -width "/etc/examples/bgpd.conf" -compact
>  .It Pa /etc/bgpd.conf
>  .Xr bgpd 8
>  configuration file
> +.It Pa /etc/examples/bgpd.conf
> +example file, do not edit
>  .El
>  .Sh SEE ALSO
>  .Xr strftime 3 ,
> 



Re: get rid of almost empty /etc/examples/mixerctl.conf

2020-02-08 Thread Jason McIntyre
On Sat, Feb 08, 2020 at 03:33:37PM -0700, Theo de Raadt wrote:
> Jason McIntyre  wrote:
> 
> > without getting into a discussion about /etc/examples, in this case i
> > personally see neither the point of the example config file (so trivial
> > as to be questionable) nor the addition to the man page (if the example
> > is worthwhile, add it to mixerctl, not the conf page).
> 
> there is additional pieces of "documentation" that occurs here
> 
> - this is a filename, which if placed one directory above., would
>   perform a function

yep. so the reference in FILES makes sense. but could confuse the reader
too (because an example in top level /etc is no longer provided). i don;t
currently have a solution to that issue.

> - the comment format of the file is demonstrated

yep. but the comment format is pretty much universal and not needed for
demonstration.

> - the basic format of the file is demonstrated (is it simply a series
>   of name=value, or have we created a richer DSL)
> 

yep.

> you can argue that is in the manual page.  It is.  After you read a
> lot more.  There is a pace-of-learning going on here.  Noone ever

it's in the first paragraph

> demanded that learning must come from a man page, additional sources
> of transient information are not prohibited, but I'm picking up a
> disdain for information learned any other way...
> 

i don;t think it's disdain. just a discussion about how to get the info
across effectively. that the discussion began is maybe evidence that we
haven;t nailed it/.

jmc



Re: get rid of almost empty /etc/examples/mixerctl.conf

2020-02-08 Thread Jason McIntyre
On Sat, Feb 08, 2020 at 11:04:10PM +0100, Ingo Schwarze wrote:
> Hi Theo,
> 
> you have a point, that was a lot of cheap talk and no patch.
> 
> I don't aim at changing yacc(1) grammars.  I think most parts of
> OpenBSD configuration systems already have sane defaults and most
> configuration syntaxes are already good with respect to simplicity
> and usability.  At least "most", maybe even all.
> 
> > The example files were moved from /etc, so that /etc contained fewer
> > files for unconfigured software.
> 
> That was a very good step, and it was also good to not encumber it
> by trying to do more at the same time.
> 
> > Little to no effort was put into curating them.  That's the gap that
> > occured.
> 
> So, here i'm putting a few pennies where my mouth is, starting from the
> shortest file in /etc/examples/.  The example is so short that cut and
> paste from the manual page will certainly cause no trouble, and the
> file also isn't a special case with respect to permissions,
> it is -rw-r--r-- root:wheel.
> 
> OK?
>   Ingo
> 
> 
> P.S.
> When preparing this, i noticed i already had the change to
> mixerctl.conf.5 in my tree.  It looks like i started it
> in the past, then forgot about it.
> 
> P.P.S.
> Note that i will not propose to get rid of *all* of /etc/examples/,
> but just of trivial examples that provide no benefit by being outside
> the manual page.  There are certainly some that make sense as they
> are.
> 
> 
> Index: etc/Makefile
> ===
> RCS file: /cvs/src/etc/Makefile,v
> retrieving revision 1.477
> diff -u -p -r1.477 Makefile
> --- etc/Makefile  24 Jan 2020 06:17:37 -  1.477
> +++ etc/Makefile  8 Feb 2020 21:42:14 -
> @@ -46,7 +46,7 @@ MUTABLE=changelist daily etc.${MACHINE}/
>  
>  # -rw-r--r--
>  EXAMPLES=acme-client.conf chio.conf dhclient.conf dhcpd.conf exports \
> - httpd.conf ifstated.conf inetd.conf man.conf mixerctl.conf \
> + httpd.conf ifstated.conf inetd.conf man.conf \
>   mrouted.conf ntpd.conf printcap rad.conf rbootd.conf \
>   remote sensorsd.conf wsconsctl.conf
>  
> Index: share/man/man5/mixerctl.conf.5
> ===
> RCS file: /cvs/src/share/man/man5/mixerctl.conf.5,v
> retrieving revision 1.7
> diff -u -p -r1.7 mixerctl.conf.5
> --- share/man/man5/mixerctl.conf.530 Jul 2018 17:24:24 -  1.7
> +++ share/man/man5/mixerctl.conf.58 Feb 2020 21:42:14 -
> @@ -141,6 +141,11 @@ Default audio mixing device.
>  .Xr mixerctl 1
>  configuration file.
>  .El
> +.Sh EXAMPLES
> +Most audio cards support setting the output volume by adding this line to
> +.Nm :
> +.Pp
> +.Dl outputs.master=200
>  .Sh SEE ALSO
>  .Xr aucat 1 ,
>  .Xr audioctl 1 ,
> Index: etc/examples/mixerctl.conf
> ===
> RCS file: etc/examples/mixerctl.conf
> diff -N etc/examples/mixerctl.conf
> --- etc/examples/mixerctl.conf16 Jul 2014 13:21:33 -  1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -
> @@ -1,7 +0,0 @@
> -# $OpenBSD: mixerctl.conf,v 1.1 2014/07/16 13:21:33 deraadt Exp $
> -#
> -# mixerctl(1) configurable parameters. See mixerctl.conf(5) for details.
> -#
> -
> -# output volume value for most audio cards
> -#outputs.master=200

without getting into a discussion about /etc/examples, in this case i
personally see neither the point of the example config file (so trivial
as to be questionable) nor the addition to the man page (if the example
is worthwhile, add it to mixerctl, not the conf page).

surely stuff like this is self explanatory.

note that mixerctl.conf.5 has an entry in FILES for /etc/mixerctl.conf
(non-existent by default) but not /etc/examples/mixerctl.conf (which
does exist). i guess whatever we decide on, we need to check that we're
getting this right and doing it consistently across our pages.

jmc



Re: Add note about example dhclient.conf

2020-02-08 Thread Jason McIntyre
On Sat, Feb 08, 2020 at 01:37:00PM -0800, Kyle Isom wrote:
> On Fri, Feb 7, 2020, at 23:22, Jason McIntyre wrote:
> > if we do reference these config files from the man pages, i guess that
> > should be correctly done from a FILES section, since EXAMPLES is really
> > showing how to use the tool, rather than how to configure it. it is a
> > fine line though.
> > 
> > i wouldn;t be against adding to FILES - it'd be very brief, make sense,
> > and provide the reminder being asked for.
> 
> I got the EXAMPLES part from httpd.conf(5). If you think the note should 
> still be added there, I'm happy to do that. In the case where following the 
> style of httpd.conf(5) is okay, here's an updated diff, though it's hard to 
> tell from this thread if it's wanted.
> 
> 
> - kyle
> 
> 
> Index: sbin/dhclient/dhclient.conf.5
> ===
> RCS file: /cvs/src/sbin/dhclient/dhclient.conf.5,v
> retrieving revision 1.49
> diff -u -p -u -p -r1.49 dhclient.conf.5
> --- sbin/dhclient/dhclient.conf.5 17 Dec 2019 14:21:54 -  1.49
> +++ sbin/dhclient/dhclient.conf.5 8 Feb 2020 21:31:05 -
> @@ -288,6 +288,11 @@ instead of the
>  .Ic sname
>  field of the DHCP offer when binding a lease.
>  .El
> +.Sh EXAMPLES
> +An example configuration for
> +.Pa dhclient.conf
> +is provided in
> +.Pa /etc/examples/dhclient.conf .
>  .Sh SEE ALSO
>  .Xr dhclient.leases 5 ,
>  .Xr dhcp-options 5 ,
> 

in my opinion, i'm definitely against this type of addition: it adds an
EXAMPLES section, without providing any examples.

- i'm ok with adding the path to these files to a FILES section
- i'm ok with afterboot.8 mentioning /etc/examples
- i recognise that there may be some cases where EXAMPLES points to the
  example config. it possibly makes sense for httpd.conf. i don;t think
  it makes sense for dhclient.conf.

jmc



Re: Add note about example dhclient.conf

2020-02-07 Thread Jason McIntyre
On Fri, Feb 07, 2020 at 08:46:05PM -0700, Aaron Bieber wrote:
> On Fri, 07 Feb 2020 at 17:49:41 -0800, Kyle Isom wrote:
> > I was looking through the dhclient.conf man page and missed that there was 
> > an example config in /etc/examples, so  I added this to the man page. I'm 
> > also happy to go through the rest of man pages for the examples and add 
> > them if there's interest.
> > 
> > Cheers,
> > Kyle
> > 
> > 
> > Index: sbin/dhclient/dhclient.conf.5
> > ===
> > RCS file: /cvs/src/sbin/dhclient/dhclient.conf.5,v
> > retrieving revision 1.49
> > diff -u -p -u -p -r1.49 dhclient.conf.5
> > --- sbin/dhclient/dhclient.conf.5   17 Dec 2019 14:21:54 -  1.49
> > +++ sbin/dhclient/dhclient.conf.5   8 Feb 2020 00:22:38 -
> > @@ -288,6 +288,11 @@ instead of the
> >  .Ic sname
> >  field of the DHCP offer when binding a lease.
> >  .El
> > +.Sh EXAMPLE
> > +There is an example
> > +.Pa dhclient.conf
> > +in
> > +.Pa /etc/examples/dhclient.conf .
> >  .Sh SEE ALSO
> >  .Xr dhclient.leases 5 ,
> >  .Xr dhcp-options 5 ,
> > 
> 
> IMO this is worth doing. acme-client.1 and httpd.conf.5 have reference to
> /etc/examples, and I have run into a number of people that are unaware of the
> existence of the examples.
> 
> Maybe something a bit more similar to what's in acme-client(1) which uses a
> more standard EXAMPLES section:
> 
> .Sh EXAMPLES
> Example configuration files for
> .Nm
> and
> .Xr httpd 8
> are provided in
> .Pa /etc/examples/acme-client.conf
> 
> I talked with tj@ about this as well, he suggested another route would be to
> add full examples in the lacking pages. IMO both approaches would probably be
> beneficial but I think directing more attention to /etc/examples is a good
> start.
> 
> Anyone else have any thoughts?
> 

hi.

i forget the logic, but i think the aim was to have a potential config
somewhere helpful, without clogging the man pages. to that end, i'm not
sure it'd make sense to effectively move the files back into the man
pages.

the best thing is probably for everyone to know there is such a thing as
/etc/examples. i accept that's maybe unlikely.

if we do reference these config files from the man pages, i guess that
should be correctly done from a FILES section, since EXAMPLES is really
showing how to use the tool, rather than how to configure it. it is a
fine line though.

i wouldn;t be against adding to FILES - it'd be very brief, make sense,
and provide the reminder being asked for.

jmc



Re: Document that openlog's first paramater must continue to point to valid data

2020-02-03 Thread Jason McIntyre
On Mon, Feb 03, 2020 at 09:53:39PM +, Stuart Henderson wrote:
> On 2020/02/03 21:40, Jason McIntyre wrote:
> > On Mon, Feb 03, 2020 at 09:28:15PM +0100, Ingo Schwarze wrote:
> > > Hi,
> > > 
> > > since our manual page doesn't explain the details of how openlog(3)
> > > uses *ident, it seems reasonable for users to conclude that it is
> > > safest to neither free nor modify it.
> > > 
> > > Then again, given that in our implementation, freeing it may even
> > > pose a security hazard, i might seem friendly to give more details.
> > > 
> > > POSIX has the same wording as our manual page (and so do 4.4BSD-Lite2,
> > > FreeBSD, NetBSD, and Oracle Solaris 11).  As far as i understand,
> > > the wording being in POSIX implies behaviour is unspecified if the
> > > memory becomes invalid or if its content is changed.  That's also
> > > how the Linux man-pages project documents it.  I don't think
> > > researching history is needed for this; knowing that it's unspecified
> > > feels sufficient.
> > > 
> > > Given that our implementation chooses to use-after-free (as it is
> > > permitted to) if the memory becomes invalid, i prefer the Theo's
> > > strong wording "must persist" to the possibly less discouraging
> > > "unspecified" - foremost, we are documenting *our* implementation.
> > > 
> > > Regarding changes of the content, i consider it friendly to mention
> > > that it is unspecified - otherwise, people might mistakenly assume
> > > that our behaviour were required by POSIX.
> > > 
> > > While here, add the missing pointer to POSIX, correct HISTORY,
> > > drop redundant verbiage from RETURN VALUES, and garbage collect .Tn.
> > > Admittedly, that's more than one change in one patch, but all of
> > > it is fairly standard, so why waste time splitting it.
> > > (Still, feel free to OK only parts, of course.)
> > > 
> > > OK?
> > >   Ingo
> > > 
> > 
> > hi.
> > 
> > it reads ok, but i can't say a great deal more than that.
> > 
> > i don;t want to quibble about the wording, but i'll say it anyway:
> > 
> > - "must" reads badly. i understand this may be the exact word you want,
> >   but i'm not a fan
> > 
> > - the sentence structure is slighly unbalanced. i'll explain inline:
> > 
> > > 
> > > Index: syslog.3
> > > ===
> > > RCS file: /cvs/src/lib/libc/gen/syslog.3,v
> > > retrieving revision 1.35
> > > diff -u -r1.35 syslog.3
> > > --- syslog.3  30 Aug 2019 20:27:25 -  1.35
> > > +++ syslog.3  3 Feb 2020 20:16:39 -
> > > @@ -216,12 +216,17 @@
> > >  .Fn vsyslog .
> > >  The parameter
> > >  .Fa ident
> > > -is a string that will be prepended to every message.
> > > +points to a string that will be prepended to every message;
> > > +its storage must persist until
> > > +.Fn closelog
> > > +or the corresponding
> > > +.Fn closelog_r .
> > > +If the content of the string is changed, behaviour is unspecified.
> > 
> > 
> > so it's like this now:
> > 
> > This is what ident is;
> > here i append some info about not changing it.
> > Now i start a new sentence to add more info about not changing it.
> > 
> > i guess i would write it sth like:
> > 
> > The parameter
> > .Fa ident
> > points to a string that is prepended to every message.
> > It should not be changed until either
> > .Fn closelog
> > or
> > .Fn closelog_r
> > are called,
> > otherwise the behaviour is unspecified.
> > 
> > well, you get the gist.
> > jmc
> 
> The "unspecified behaviour" relates to changing the contents of the
> string after calling openlog.
> 
> If the storage of the string does not persist (i.e. if it is freed)
> then it will definitely fail, in a bad way.
> 
> My attempt at changing your wording to add this information back results
> in it turning into pretty much the same as Ingo's (but with slightly
> worse choice of words).
> 

heh, i see. when i said:
> > it reads ok, but i can't say a great deal more than that.

i was referring to my lack of knowledge about the issue!

so i guess i'm fine with ingo's text.

jmc



Re: Document that openlog's first paramater must continue to point to valid data

2020-02-03 Thread Jason McIntyre
On Mon, Feb 03, 2020 at 09:28:15PM +0100, Ingo Schwarze wrote:
> Hi,
> 
> since our manual page doesn't explain the details of how openlog(3)
> uses *ident, it seems reasonable for users to conclude that it is
> safest to neither free nor modify it.
> 
> Then again, given that in our implementation, freeing it may even
> pose a security hazard, i might seem friendly to give more details.
> 
> POSIX has the same wording as our manual page (and so do 4.4BSD-Lite2,
> FreeBSD, NetBSD, and Oracle Solaris 11).  As far as i understand,
> the wording being in POSIX implies behaviour is unspecified if the
> memory becomes invalid or if its content is changed.  That's also
> how the Linux man-pages project documents it.  I don't think
> researching history is needed for this; knowing that it's unspecified
> feels sufficient.
> 
> Given that our implementation chooses to use-after-free (as it is
> permitted to) if the memory becomes invalid, i prefer the Theo's
> strong wording "must persist" to the possibly less discouraging
> "unspecified" - foremost, we are documenting *our* implementation.
> 
> Regarding changes of the content, i consider it friendly to mention
> that it is unspecified - otherwise, people might mistakenly assume
> that our behaviour were required by POSIX.
> 
> While here, add the missing pointer to POSIX, correct HISTORY,
> drop redundant verbiage from RETURN VALUES, and garbage collect .Tn.
> Admittedly, that's more than one change in one patch, but all of
> it is fairly standard, so why waste time splitting it.
> (Still, feel free to OK only parts, of course.)
> 
> OK?
>   Ingo
> 

hi.

it reads ok, but i can't say a great deal more than that.

i don;t want to quibble about the wording, but i'll say it anyway:

- "must" reads badly. i understand this may be the exact word you want,
  but i'm not a fan

- the sentence structure is slighly unbalanced. i'll explain inline:

> 
> Index: syslog.3
> ===
> RCS file: /cvs/src/lib/libc/gen/syslog.3,v
> retrieving revision 1.35
> diff -u -r1.35 syslog.3
> --- syslog.3  30 Aug 2019 20:27:25 -  1.35
> +++ syslog.3  3 Feb 2020 20:16:39 -
> @@ -216,12 +216,17 @@
>  .Fn vsyslog .
>  The parameter
>  .Fa ident
> -is a string that will be prepended to every message.
> +points to a string that will be prepended to every message;
> +its storage must persist until
> +.Fn closelog
> +or the corresponding
> +.Fn closelog_r .
> +If the content of the string is changed, behaviour is unspecified.


so it's like this now:

This is what ident is;
here i append some info about not changing it.
Now i start a new sentence to add more info about not changing it.

i guess i would write it sth like:

The parameter
.Fa ident
points to a string that is prepended to every message.
It should not be changed until either
.Fn closelog
or
.Fn closelog_r
are called,
otherwise the behaviour is unspecified.

well, you get the gist.
jmc

> +.Pp
>  The
>  .Fa logopt
>  argument
> -is a bit field specifying logging options, which is formed by
> -.Tn OR Ns 'ing
> +is a bit field specifying logging options, which is formed by OR'ing
>  one or more of the following values:
>  .Bl -tag -width LOG_AUTHPRIV
>  .It Dv LOG_CONS
> @@ -310,18 +315,6 @@
>  .Fa syslog_data
>  structure.
>  .Sh RETURN VALUES
> -The
> -.Fn closelog ,
> -.Fn closelog_r ,
> -.Fn openlog ,
> -.Fn openlog_r ,
> -.Fn syslog ,
> -.Fn syslog_r ,
> -.Fn vsyslog ,
> -and
> -.Fn vsyslog_r
> -functions return no value.
> -.Pp
>  The routines
>  .Fn setlogmask
>  and
> @@ -349,11 +342,58 @@
>  .Sh SEE ALSO
>  .Xr logger 1 ,
>  .Xr syslogd 8
> +.Sh STANDARDS
> +The functions
> +.Fn syslog ,
> +.Fn openlog ,
> +.Fn closelog ,
> +and
> +.Fn setlogmask
> +conform to the X/Open Systems Interfaces option of
> +.St -p1003.1-2008 .
> +.Pp
> +The facilities
> +.Dv LOG_AUTHPRIV ,
> +.Dv LOG_FTP ,
> +and
> +.Dv LOG_SYSLOG ,
> +the option
> +.Dv LOG_PERROR ,
> +and the macro
> +.Fn LOG_UPTO
> +are extensions to that standard.
> +.Pp
> +The standard option
> +.Dv LOG_NOWAIT
> +is deprecated in
> +.Ox
> +and has no effect.
>  .Sh HISTORY
> -These
> -functions appeared in
> -.Bx 4.2 .
> -The reentrant functions appeared in
> +The functions
> +.Fn syslog ,
> +.Fn openlog ,
> +and
> +.Fn closelog
> +appeared in
> +.Bx 4.2 ,
> +.Fn setlogmask
> +in
> +.Bx 4.3 ,
> +and
> +.Fn vsyslog
> +in
> +.Bx 4.3 Net/1 .
> +.Pp
> +The functions
> +.Fn syslog_r ,
> +.Fn vsyslog_r ,
> +.Fn openlog_r ,
> +.Fn closelog_r ,
> +and
> +.Fn setlogmask_r
> +appeared in
> +.Bx 386 0.1
> +and have been available since
>  .Ox 3.1 .
>  .Sh CAVEATS
>  It is important never to pass a string with user-supplied data as a



Re: Teach du(1) the -m flag, disk usage in megabytes

2020-01-29 Thread Jason McIntyre
On Wed, Jan 29, 2020 at 05:48:44PM +0100, Ingo Schwarze wrote:
> Hi Jason,
> 
> Jason McIntyre wrote on Wed, Jan 29, 2020 at 04:26:42PM +:
> 
> > i don;t think it would be such a bad thing for du to have an example or
> > two, so i'm ok with this.
> > 
> >   so sth like:
> > 
> > Display a summary of files and folders in the current directory,
> > sorted by size:
> > 
> > $ blah
> 
> That wording seems very nice to me, see below for a patch.
> 
> I also included .??* because having large hidden directories around
> and desperately searching for the waste of disk space elsewhere
> seems like a common trap to me.
> 
> > - i guess if you have a lot of stuff it makes sense to have the biggest
> >   files displayed at the end of the list. but generally wouldn;t you
> >   want your biggest files listed first? we could add -r to sort.
> 
> Actually, i consider it more versatile without the -r.
> You are right, it really matters for directories with lots of entries.
> But even with few entries, what's wrong with having the most relevant
> entries closest to the subsequent shell prompt?
> Everything is visible on the screen in that case either way.
> 
> Feel free to commit something like this (with or without the .??*,
> with ot without the -r) based on OK schwarze@, or send an OK to me.
> 
> Yours,
>   Ingo
> 

hi ingo. ok me.
jmc

> 
> Index: du.1
> ===
> RCS file: /cvs/src/usr.bin/du/du.1,v
> retrieving revision 1.35
> diff -u -r1.35 du.1
> --- du.1  2 Sep 2019 21:18:41 -   1.35
> +++ du.1  29 Jan 2020 16:40:13 -
> @@ -147,6 +147,11 @@
>  .El
>  .Sh EXIT STATUS
>  .Ex -std du
> +.Sh EXAMPLES
> +Display a summary of files and folders in the current directory,
> +sorted by size:
> +.Pp
> +.Dl du -sh * .??* | sort -h
>  .Sh SEE ALSO
>  .Xr df 1 ,
>  .Xr fts_open 3 ,
> 



Re: Teach du(1) the -m flag, disk usage in megabytes

2020-01-29 Thread Jason McIntyre
On Wed, Jan 29, 2020 at 10:46:28AM -0600, Scott Cheloha wrote:
> > On Jan 29, 2020, at 10:26 AM, Jason McIntyre  wrote:
> > 
> > On Wed, Jan 29, 2020 at 11:12:56AM -0500, David Goerger wrote:
> >> Monday, 20200127 18:29-0500, Daniel Jakots wrote:
> >>> Can't you achieve what you want with `du -sh * | sort -h`? du(1)'s 
> >>> -h options will automatically select the best suffix and sort(1)'s 
> >>> -h will sort first using the suffix then the numerical value.
> >> 
> >> Thanks! I didn't know about "sort -h". That indeed does what I want, 
> >> and is a bit more readable (e.g. 8G instead of the quick mental math 
> >> in evaluating 8192M). Like Todd said, old habits die hard. And at 
> >> least in my case, I'm pleasantly surprised any time a tool features 
> >> smart extensions and I don't have to manipulate arrays of raw 
> >> integers. :)
> >> 
> >> Actually, I think you've convinced me that using "sort -h" is better. 
> >> In particular, I like that it future-proofs us up to and including 
> >> yottabytes. What about something like this, to highlight this common 
> >> use case?
> >> 
> >> ---
> >> Index: du.1
> >> ===
> >> RCS file: /cvs/src/usr.bin/du/du.1,v
> >> retrieving revision 1.35
> >> diff -u -p -r1.35 du.1
> >> --- du.12 Sep 2019 21:18:41 -   1.35
> >> +++ du.129 Jan 2020 16:02:45 -
> >> @@ -147,6 +147,16 @@ option is specified.
> >> .El
> >> .Sh EXIT STATUS
> >> .Ex -std du
> >> +.Sh EXAMPLES
> >> +To sort human-readable output by size, one might use the human-readable
> >> +extension to
> >> +.Xr sort 1 ,
> >> +for example:
> >> +.Pp
> >> +.Dl du -sh * | sort -h
> >> +.Pp
> >> +This is useful to quickly identify large files and folders consuming
> >> +disk space.
> >> .Sh SEE ALSO
> >> .Xr df 1 ,
> >> .Xr fts_open 3 ,
> >> 
> > 
> > [...]
> > 
> > - i guess if you have a lot of stuff it makes sense to have the biggest
> >  files displayed at the end of the list. but generally wouldn;t you
> >  want your biggest files listed first? we could add -r to sort.
> 
> Our sort(1) has an '-r' flag for "reverse".
> 

yes, that's what i meant by "add -r to sort".
jmc



Re: Teach du(1) the -m flag, disk usage in megabytes

2020-01-29 Thread Jason McIntyre
On Wed, Jan 29, 2020 at 11:12:56AM -0500, David Goerger wrote:
> Monday, 20200127 18:29-0500, Daniel Jakots wrote:
> > Can't you achieve what you want with `du -sh * | sort -h`? du(1)'s 
> > -h options will automatically select the best suffix and sort(1)'s 
> > -h will sort first using the suffix then the numerical value.
> 
> Thanks! I didn't know about "sort -h". That indeed does what I want, 
> and is a bit more readable (e.g. 8G instead of the quick mental math 
> in evaluating 8192M). Like Todd said, old habits die hard. And at 
> least in my case, I'm pleasantly surprised any time a tool features 
> smart extensions and I don't have to manipulate arrays of raw 
> integers. :)
> 
> Actually, I think you've convinced me that using "sort -h" is better. 
> In particular, I like that it future-proofs us up to and including 
> yottabytes. What about something like this, to highlight this common 
> use case?
> 
> ---
> Index: du.1
> ===
> RCS file: /cvs/src/usr.bin/du/du.1,v
> retrieving revision 1.35
> diff -u -p -r1.35 du.1
> --- du.12 Sep 2019 21:18:41 -   1.35
> +++ du.129 Jan 2020 16:02:45 -
> @@ -147,6 +147,16 @@ option is specified.
>  .El
>  .Sh EXIT STATUS
>  .Ex -std du
> +.Sh EXAMPLES
> +To sort human-readable output by size, one might use the human-readable
> +extension to
> +.Xr sort 1 ,
> +for example:
> +.Pp
> +.Dl du -sh * | sort -h
> +.Pp
> +This is useful to quickly identify large files and folders consuming
> +disk space.
>  .Sh SEE ALSO
>  .Xr df 1 ,
>  .Xr fts_open 3 ,
> 

hi.

i don;t think it would be such a bad thing for du to have an example or
two, so i'm ok with this.

couple of points:

- the description is way too wordy. it is definitely better to try and
  avoid this structure for simple cases:

1st part of description:

$ blah

2nd part of description.

  so sth like:

Display a summary of files and folders in the current directory,
sorted by size:

$ blah

- i guess if you have a lot of stuff it makes sense to have the biggest
  files displayed at the end of the list. but generally wouldn;t you
  want your biggest files listed first? we could add -r to sort.

jmc



Re: man afterboot / inc. of wsconsctl

2020-01-28 Thread Jason McIntyre
On Tue, Jan 28, 2020 at 12:38:52PM +0100, su.root wrote:
> Hi,
> would like to suggest inc. / reference of wsconsctl in the afterboot man 
> page. Might
> be particularly useful for further fine tuning of respective variables
> pertaining to devices / laptops.
> 

hi.

i don;t think we should just drop an Xr in. if there was something
concrete to be said, that might be different. remember, you're expected
to poke a bit anyway, and there's a very good faq that can help with
some of the peripherals.

if there's some concrete advice missing i guess you could submit a diff.

jmc



Re: apmd poll every minute

2020-01-24 Thread Jason McIntyre
On Fri, Jan 24, 2020 at 11:53:27PM -0500, Ted Unangst wrote:
> Sometimes (particuarly if you are using apmd -z) the default polling interval
> of 10 minutes is a bit lazy and we fail to respond to low battery situations
> before they become no battery situations.
> 
> Perhaps something smarter could be done, but the simplest change is to reduce
> the default polling interval to one minute. This is still rather slow, so as
> to not introduce unnecessary load on the system, but should make it more
> responsive to changing conditions.
> 
> 
> Index: apmd.8
> ===
> RCS file: /home/cvs/src/usr.sbin/apmd/apmd.8,v
> retrieving revision 1.50
> diff -u -p -r1.50 apmd.8
> --- apmd.84 Dec 2018 18:00:57 -   1.50
> +++ apmd.825 Jan 2020 04:50:09 -
> @@ -111,7 +111,7 @@ periodically polls the APM driver for th
>  If the battery charge level changes substantially or the external power
>  status changes, the new status is logged.
>  The polling rate defaults to
> -once per 10 minutes, but may be specified using the
> +once per 1 minute, but may be specified using the

hi. a more natural way to say this would be "once per minute".
jmc

>  .Fl t
>  command-line flag.
>  .It Fl Z Ar percent
> Index: apmd.c
> ===
> RCS file: /home/cvs/src/usr.sbin/apmd/apmd.c,v
> retrieving revision 1.91
> diff -u -p -r1.91 apmd.c
> --- apmd.c2 Nov 2019 00:41:36 -   1.91
> +++ apmd.c25 Jan 2020 04:49:54 -
> @@ -366,7 +366,7 @@ resumed(int ctl_fd)
>   power_status(ctl_fd, 1, NULL);
>  }
>  
> -#define TIMO (10*60) /* 10 minutes */
> +#define TIMO (1*60)  /* 1 minute */
>  
>  int
>  main(int argc, char *argv[])
> 



Re: "usually" is usually spelled "usually"

2019-12-19 Thread Jason McIntyre
On Thu, Dec 19, 2019 at 11:59:20AM -0800, Bryan Stenson wrote:
> Hi all -
> 
> Just a doc/typo patch (inlined):
> 
> Bryan Stenson
> 
> ---

as theo noted, 3rd party fixes like this should go upstream (generally
stuff in /usr/src/gnu). i committed the last three fixes though.

jmc

> 
> diff --git gnu/gcc/gcc/unwind.inc gnu/gcc/gcc/unwind.inc
> index b533eb58873..d55f49cab79 100644
> --- gnu/gcc/gcc/unwind.inc
> +++ gnu/gcc/gcc/unwind.inc
> @@ -107,7 +107,7 @@ _Unwind_RaiseException(struct _Unwind_Exception *exc)
>   return _URC_END_OF_STACK;
> 
>if (code != _URC_NO_REASON)
> - /* Some error encountered.  Ususally the unwinder doesn't
> + /* Some error encountered.  Usually the unwinder doesn't
>  diagnose these and merely crashes.  */
>   return _URC_FATAL_PHASE1_ERROR;
> 
> diff --git gnu/usr.bin/gcc/gcc/unwind.inc gnu/usr.bin/gcc/gcc/unwind.inc
> index 0938d501f5f..394073aa9e8 100644
> --- gnu/usr.bin/gcc/gcc/unwind.inc
> +++ gnu/usr.bin/gcc/gcc/unwind.inc
> @@ -99,7 +99,7 @@ _Unwind_RaiseException(struct _Unwind_Exception *exc)
>   return _URC_END_OF_STACK;
> 
>if (code != _URC_NO_REASON)
> - /* Some error encountered.  Ususally the unwinder doesn't
> + /* Some error encountered.  Usually the unwinder doesn't
>  diagnose these and merely crashes.  */
>   return _URC_FATAL_PHASE1_ERROR;
> 
> diff --git gnu/usr.bin/perl/Porting/Glossary gnu/usr.bin/perl/Porting/Glossary
> index e9adc57685c..c44e5b76797 100644
> --- gnu/usr.bin/perl/Porting/Glossary
> +++ gnu/usr.bin/perl/Porting/Glossary
> @@ -2098,7 +2098,7 @@ d_random_r (d_random_r.U):
>  d_re_comp (d_regcmp.U):
>   This variable conditionally defines the HAS_RECOMP symbol, which
>   indicates to the C program that the re_comp() routine is available
> - for regular patern matching (usally on BSD). If so, it is likely that
> + for regular patern matching (usually on BSD). If so, it is likely that
>   re_exec() exists.
> 
>  d_readdir (d_readdir.U):
> @@ -2131,12 +2131,12 @@ d_recvmsg (d_recvmsg.U):
>  d_regcmp (d_regcmp.U):
>   This variable conditionally defines the HAS_REGCMP symbol, which
>   indicates to the C program that the regcmp() routine is available
> - for regular patern matching (usally on System V).
> + for regular patern matching (usually on System V).
> 
>  d_regcomp (d_regcmp.U):
>   This variable conditionally defines the HAS_REGCOMP symbol, which
>   indicates to the C program that the regcomp() routine is available
> - for regular patern matching (usally on POSIX.2 conforming systems).
> + for regular patern matching (usually on POSIX.2 conforming systems).
> 
>  d_remainder (d_remainder.U):
>   This variable conditionally defines the HAS_REMAINDER symbol, which
> diff --git lib/libssl/man/SSL_CTX_set_cipher_list.3
> lib/libssl/man/SSL_CTX_set_cipher_list.3
> index fa5d9809137..b2739840c28 100644
> --- lib/libssl/man/SSL_CTX_set_cipher_list.3
> +++ lib/libssl/man/SSL_CTX_set_cipher_list.3
> @@ -137,7 +137,7 @@ It can only be used as the first word.
>  .It Cm @STRENGTH
>  Sort the list by decreasing encryption strength,
>  preserving the order of cipher suites that have the same strength.
> -It is usally given as the last word.
> +It is usually given as the last word.
>  .El
>  .Pp
>  The following words can be used to select groups of cipher suites,
> diff --git regress/sbin/ifconfig/ifaddr.c regress/sbin/ifconfig/ifaddr.c
> index 07cfbf6261b..e0aa471100c 100644
> --- regress/sbin/ifconfig/ifaddr.c
> +++ regress/sbin/ifconfig/ifaddr.c
> @@ -3,7 +3,7 @@
>  /*
>   * This file has been copied from ifconfig and adapted to test
>   * SIOCSIFADDR, SIOCSIFNETMASK, SIOCSIFDSTADDR, SIOCSIFBRDADDR
> - * ioctls.  Ususally ifconfig uses SIOCAIFADDR and SIOCDIFADDR, but
> + * ioctls.  Usually ifconfig uses SIOCAIFADDR and SIOCDIFADDR, but
>   * the old kernel interface has to be tested, too.
>   */
> 
> diff --git sys/dev/isa/if_ie.c sys/dev/isa/if_ie.c
> index 7f39c1d9877..47e37ed08d1 100644
> --- sys/dev/isa/if_ie.c
> +++ sys/dev/isa/if_ie.c
> @@ -416,7 +416,7 @@ sl_probe(sc, ia)
>   }
> 
>   /*
> - * Divine memory size on-board the card.  Ususally 16k.
> + * Divine memory size on-board the card.  Usually 16k.
>   */
>   sc->sc_maddr = ISA_HOLE_VADDR(ia->ia_maddr);
>   ie_find_mem_size(sc);
> 



  1   2   3   4   5   6   7   8   9   10   >