Hi,

On Tue, Nov 18, 2025 at 02:09:40PM +0100, Valentin Haudiquet wrote:
> [...]
> However, I recall from our previous conversations that you would not
> want to implement such a filter because of possible breaks on non-GNU
> systems, right?

I do not want to break the currently working functionality for systems
with a /var/run/utmp file.  I do not like the idea of suppressing a
legitimate error message on those systems just because a newer system
introduces them as a side effect of normal operation.  As such I'd prefer
to filter entries without an existing TTY from the results returned from
this new system, but not from the existing one.

Using "configure --enable-systemd" looks like an easy way for GNU
Inetutils to support user messaging on the newer systems.  It would be
great if that just worked, but it doesn't.

The Gnulib code already filters utmp entries when building the result
of read_utmp().  It may be possible to add a file existence check for
the reported TTY device file there.  All old-style utmp entries I have
seen have an existing TTY device file.  All entries observed in your
test failure reports do not.  Such a filter would only affect code paths
using the Gnulib function, and I think a different code path is used on
my Ubuntu 22.04 system.  I think that approach looks safe and feasible.
I have no idea if and when I might find the time to work on it.  I would
probably try a local change first to verify if it actually works, and
then approach the Gnulib project.

Cheers,
Erik

Reply via email to