Re: net/isc-dhcpd: avoid uncontrolled grow of lease db

2024-03-03 Thread Kirill A . Korinsky
On Sun, 03 Mar 2024 19:12:30 +0100, Stuart Henderson wrote: > > The port doesn't really handle running v6 mode anyway (it would want a > second rc.d script with -6 in flags and a separate config file, it can't > run 4+6 in the same process) so I think talking about v6 will just add > to

Re: net/isc-dhcpd: avoid uncontrolled grow of lease db

2024-03-03 Thread Stuart Henderson
On 2024/03/03 18:32, Kirill A. Korinsky wrote: > > +-my @LEASES = ('/var/db/dhcpd.leases', '/var/lib/dhcp/dhcpd.leases', > > '/var/lib/dhcp3/dhcpd.leases'); > > ++my @LEASES = ('/var/db/dhcpd/dhcpd.leases'); > > The patch need to be updates as well. Here should be two path which you > defined in

Re: net/isc-dhcpd: avoid uncontrolled grow of lease db

2024-03-03 Thread Kirill A . Korinsky
On Sun, 03 Mar 2024 18:07:17 +0100, Stuart Henderson wrote: > > I don't think there's a good way to automate the move, so probably > best to just warn people and allow startup to fail if the file is not > present (i.e. remove the "touch" from rc script). At least if dhcpd > fails to start it's

Re: net/isc-dhcpd: avoid uncontrolled grow of lease db

2024-03-03 Thread Stuart Henderson
On 2024/03/03 16:17, Kirill A. Korinsky wrote: > On Wed, 10 Jan 2024 21:21:22 +0100, > Stuart Henderson wrote: > > > > hrmmm, that doesn't make sense, if it can't write to /var/db/dhcpd.leases > > due to permissions, it shouldn't be able to write to /var/db/dhcpd.leases~ > > either.. > > > >

Re: net/isc-dhcpd: avoid uncontrolled grow of lease db

2024-03-03 Thread Kirill A . Korinsky
On Wed, 10 Jan 2024 21:21:22 +0100, Stuart Henderson wrote: > > hrmmm, that doesn't make sense, if it can't write to /var/db/dhcpd.leases > due to permissions, it shouldn't be able to write to /var/db/dhcpd.leases~ > either.. > > I'll try and find some time to do a test install and figure out

Re: net/isc-dhcpd: avoid uncontrolled grow of lease db

2024-01-17 Thread Kirill Korinsky
On Wed, 10 Jan 2024 21:21:22 +0100, Stuart Henderson wrote: > hrmmm, that doesn't make sense, if it can't write to /var/db/dhcpd.leases > due to permissions, it shouldn't be able to write to /var/db/dhcpd.leases~ > either.. > > I'll try and find some time to do a test install and figure out

Re: net/isc-dhcpd: avoid uncontrolled grow of lease db

2024-01-11 Thread Kirill A . Korinsky
Greetings, On Thu, 11 Jan 2024 08:23:49 +0100, Janne Johansson wrote: > > > The first thing that dhcpd.leases~ is backup of dhcpd.leases. > > > > Also, it seems that the service opens files before drop users, > > that explains why it works. > > > > Also, without empty dhcpd.leases it won't start

Re: net/isc-dhcpd: avoid uncontrolled grow of lease db

2024-01-10 Thread Janne Johansson
> The first thing that dhcpd.leases~ is backup of dhcpd.leases. > > Also, it seems that the service opens files before drop users, > that explains why it works. > > Also, without empty dhcpd.leases it won't start => touch here. Perhaps use "install" to copy /dev/null to the file and set

Re: net/isc-dhcpd: avoid uncontrolled grow of lease db

2024-01-10 Thread Kirill A. Korinsky
> On 10. Jan 2024, at 21:21, Stuart Henderson wrote: > > On 2024/01/10 18:49, Kirill A. Korinsky wrote: > >> or add readme / note which suggest to move that file by hand >> before services is started with wording like this: >> >> The previous version of ISC-DHCPD contained a bug that caused

Re: net/isc-dhcpd: avoid uncontrolled grow of lease db

2024-01-10 Thread Stuart Henderson
On 2024/01/10 18:49, Kirill A. Korinsky wrote: > > On 10. Jan 2024, at 12:55, Stuart Henderson wrote: > > > > I think we'll need to warn users about the change some way or other > > otherwise they'll lose their existing lease db and could end up issuing > > conflicting leases. Though I wonder

Re: net/isc-dhcpd: avoid uncontrolled grow of lease db

2024-01-10 Thread Kirill A. Korinsky
> On 10. Jan 2024, at 12:55, Stuart Henderson wrote: > > I think we'll need to warn users about the change some way or other > otherwise they'll lose their existing lease db and could end up issuing > conflicting leases. Though I wonder how this works at all t the moment > because there's a

Re: net/isc-dhcpd: avoid uncontrolled grow of lease db

2024-01-10 Thread Kirill A. Korinsky
> On 10. Jan 2024, at 16:54, Kirill A. Korinsky wrote: > >> On 10. Jan 2024, at 16:08, Kirill A. Korinsky wrote: >> >> rc_pre() { >> -touch /var/db/dhcpd.leases >> +touch /var/db/dhcpd/dhcpd.leases >> +chown _isc-dhcp:_isc-dhcp /var/db/dhcpd/dhcpd.leases >> } > > > To make clean

Re: net/isc-dhcpd: avoid uncontrolled grow of lease db

2024-01-10 Thread Kirill A. Korinsky
> On 10. Jan 2024, at 16:08, Kirill A. Korinsky wrote: > > rc_pre() { > -touch /var/db/dhcpd.leases > +touch /var/db/dhcpd/dhcpd.leases > +chown _isc-dhcp:_isc-dhcp /var/db/dhcpd/dhcpd.leases > } To make clean experiment I've simplified everything to rc_pre() { touch

Re: net/isc-dhcpd: avoid uncontrolled grow of lease db

2024-01-10 Thread Kirill A. Korinsky
On 10.01.24 12:55, Stuart Henderson wrote: Missing attachment. It was added as attechment, which apparently was removed. Instead inlined it. I think we'll need to warn users about the change some way or other otherwise they'll lose their existing lease db and could end up issuing

Re: net/isc-dhcpd: avoid uncontrolled grow of lease db

2024-01-10 Thread Stuart Henderson
On 2024/01/10 04:01, Kirill A. Korinsky wrote: > Greetings, > > I've noticed inside /var/log/messages > > Jan 8 21:38:49 island dhcpd: Can't create new lease file: Permission denied > Jan 8 22:42:41 island dhcpd: Can't create new lease file: Permission denied > Jan 8 23:42:42 island dhcpd:

net/isc-dhcpd: avoid uncontrolled grow of lease db

2024-01-09 Thread Kirill A. Korinsky
isc-dhcp.patch Description: Binary data