Hi Valentin,

On Thu, Nov 13, 2025 at 11:11:19AM +0100, Valentin Haudiquet wrote:
> 
> It seems that utmpdump is not built on Debian / Ubuntu since December 2024.
> 
> > util-linux (2.40.2-12) unstable; urgency=medium
> >
> >   * Stop building utmpdump, should not be necessary on wtmpdb systems
> >   * Stop marking mkfds-socketpair test as failing
> >   * Skip tmpfs-sensitive tests if fstype cannot be determined
> >   * Amend NEWS entry to hint updating /root/.profile (Closes: #1088009)
> >
> >  -- Chris Hofstaedtler <[email protected]> Fri, 06 Dec 2024 13:35:11 +0100
> 
> I can try to compile that from source, but I wonder if the output will
> be relevant then, given that they decided to stop building it. I'm not
> familiar with "wtmp" as well, so this gives me something more to read
> on !

wtmpdb is new for me, too.  Anyway, I'd hope that the new "wtmpdb"
provides compatibility for applications using utmp, such as syslogd.
But "utmpdump" reads a file in utmp format, not in wtmpdb format, so it
seems plausible that "utmpdump" won't work with a wtmpdb system.

Perhaps you could test the attached patch that should make syslogd skip
all utmp entries that are not of type USER_PROCESS.  It does not change
anything for me, but if the non-TTY entries were of a different type,
e.g., LOGIN_PROCESS ('Session leader process for user login'), then this
should skip them.  This might fix the syslogd test failures you see.

Depending on which code is used for reading utmp entries, it could already
apply such a filter, but it seems to me as if the code path selected on
my system does not do that.

I have no idea if this patch breaks compatibility with non-GNU/Linux
systems.  I consider it more of a debug patch than an attempt to fix
the problem.

Thanks,
Erik
diff --git a/src/syslogd.c b/src/syslogd.c
index 55a8ccec..949e7a64 100644
--- a/src/syslogd.c
+++ b/src/syslogd.c
@@ -1645,6 +1645,8 @@ wallmsg (struct filed *f, struct iovec *iov)
   for (utp = utmpbuf; utp < utmpbuf + utmp_count; utp++)
 #endif /* UTMP_NAME_FUNCTION || !HAVE_GETUTXENT */
     {
+      if (utp->ut_type != USER_PROCESS)
+	continue;
       strncpy (line, utp->ut_line, sizeof (utp->ut_line));
       line[sizeof (utp->ut_line)] = '\0';
       if (f->f_type == F_WALL)
  • Re: Inetuti... Valentin Haudiquet
    • Re: In... Erik Auerswald
    • Re: In... Valentin Haudiquet
      • Re... Valentin Haudiquet
        • ... Erik Auerswald
      • Re... Erik Auerswald
        • ... Valentin Haudiquet
        • ... Erik Auerswald
    • Re: In... Erik Auerswald
      • Re... Valentin Haudiquet
        • ... Erik Auerswald
        • ... Valentin Haudiquet
    • Re: In... Erik Auerswald
      • Re... Valentin Haudiquet
        • ... Valentin Haudiquet
        • ... Erik Auerswald
        • ... Erik Auerswald
        • ... Valentin Haudiquet
        • ... Valentin Haudiquet
        • ... Erik Auerswald
        • ... Simon Josefsson via Bug reports for the GNU Internet utilities

Reply via email to