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 -0000       1.12
> +++ accton.8  2 Nov 2020 14:19:43 -0000
> @@ -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 ,
> 

Reply via email to