On Sat, Aug 09, 2025 at 08:46:28PM +0100, Andrew Bower wrote:
> On Sat, Aug 09, 2025 at 04:44:19PM +0100, Mark Hindley wrote:
> > On Fri, Aug 08, 2025 at 11:06:30PM +0100, Andrew Bower wrote:
> > > https://git.devuan.org/devuan/util-linux/pulls/1
> >
> > Thanks
> >
> > Isn't
> >
> > - log_utmp(&cxt);
> > + log_utmp(&cxt);
> >
> > no-op?
>
> Yes! My patch is a crude edit of Chris's patch to neutralise this
> removal but it is valid and works.
>
> I think in retrospect that it might be clearer to have another quilt
> patch layered on top of his patch.
I've reworked
https://git.devuan.org/devuan/util-linux/pulls/1 to create
a patch that explicitly restores the utmp writing rather than editing a
debian patch. I think this is clearer now what has happened, if you read
the series:
debian/login-turn-off-btmp-utmp-lastlog-writing.patch
..
devuan/restore-utmp-writing.patch
> > Do we need to restore the lastlog and btmp entries as well?
> >
> > Perhaps we just drop the whole patch?
>
> Lastlog was already written by pam_lastlog.so before trixie and the
> replacement is pam_lastlog2. The tooling to read btmp was removed by
> util-linux.
>
> So I'm not sure there would be any benefit from reversing the rest of
> the patch to be worth the increased delta from Debian. Bear in mind that
> the patch wasn't just about dropping utmp, it was also about taking over
> login from another source package.
>
> An alternative approach I considered was to include code to read the
> systemd-style login records directly in 'w' but that seemed like too
> much for a patch and it would certainly take more time!