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

2020-11-03 Thread Theo de Raadt
I don't think we should do that. Alexander Bluhm wrote: > On Fri, Oct 30, 2020 at 09:59:09AM -0600, Theo de Raadt wrote: > > 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.

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

2020-11-03 Thread Alexander Bluhm
On Fri, Oct 30, 2020 at 09:59:09AM -0600, Theo de Raadt wrote: > 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? We could do the same as we d

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

2020-11-03 Thread Ingo Schwarze
Hi Jason, Jason McIntyre wrote on Mon, Nov 02, 2020 at 05:29:37PM +: > - adding EXIT STATUS makes sense. i agree. So i added just the .Sh and .Ex lines. All the rest (both regarding "file" and "install") seems controversial and hardly worth have a long discussion, so i dropped all the rest.

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

2020-11-02 Thread Theo de Raadt
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 >

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

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

2020-11-02 Thread Ingo Schwarze
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

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

2020-10-30 Thread Solene Rapenne
Following diff changes accton(8) behavior. If the file given as parameter doesn't exists, accton will create it. Then it will check the ownership and will make it root:wheel if it's different. I added a check to be sure it's run as root because it's has no use if not run as root. I don't often w

accton(8) requires a reboot after being enabled

2020-10-30 Thread Solene Rapenne
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. Index: accton.8 === RCS file:

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

2020-10-30 Thread Theo de Raadt
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

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

2020-10-30 Thread Ingo Schwarze
Hi Solene, Solene Rapenne wrote on Fri, Oct 30, 2020 at 06:34:09PM +0100: > Following diff changes accton(8) behavior. > > If the file given as parameter doesn't exists, accton will create it. > Then it will check the ownership and will make it root:wheel if > it's different. > > I added a chec

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

2020-10-30 Thread Ingo Schwarze
Hi Theo, Theo de Raadt wrote on Fri, Oct 30, 2020 at 09:59:09AM -0600: > With a careful reading of the current manual page, everything is there > and it is accurate. > > With an argument naming an existing file > > > Ok so let's create it with touch.

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. > >

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

2020-10-30 Thread Theo de Raadt
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 w

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