GNU bug report logs - #73928
"who" should support wtmpdb

Previous Next

Package: coreutils;

Reported by: Vincent Lefevre <vincent <at> vinc17.net>

Date: Mon, 21 Oct 2024 11:17:02 UTC

Severity: normal

Merged with 76346, 76347

Done: Chris Hofstaedtler <zeha <at> debian.org>

Bug is archived. No further changes may be made.

Full log


Message #96 received at 73928 <at> debbugs.gnu.org (full text, mbox):

From: Chris Hofstaedtler <zeha <at> debian.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: bug-gnulib <at> gnu.org, 1080330 <at> bugs.debian.org, Bruno Haible <bruno <at> clisp.org>,
 Thorsten Kukuk <kukuk <at> suse.com>, Vincent Lefevre <vincent <at> vinc17.net>,
 Michael Stone <mstone <at> debian.org>,
 Arsen Arsenović <arsen <at> aarsen.me>, 73928 <at> debbugs.gnu.org
Subject: Re: bug#73928: Bug#1080330: coreutils: who no longer works
Date: Wed, 19 Feb 2025 22:41:29 +0100
* Paul Eggert <eggert <at> cs.ucla.edu> [250219 21:47]:
> On 2/19/25 09:41, Arsen Arsenović wrote:
> > they (gdm) are a user and they have a session.
> > Adding additional filtration can only confuse admins who compare 'who'
> > and other tools.
> 
> It is exactly that confusion that I'm trying to prevent.
> 
> The man page for "who" says "who - show who is logged on", but gdm is not
> logged on.
> 
> The POSIX spec for "who" says that "who" optionally reports the login time,
> but there is no login time here because nobody has logged in. The POSIX spec
> also says that "who -l" should list only lines where the system is waiting
> for someone to login - which is what's happening with the gdm display - and
> yet who with libsystemd doesn't do that.
> 
> It's a stretch to say that gdm is a "user" in the sense that most people
> understand "who". By default, "who" is supposed to list users who have
> logged in, not random UIDs like daemon or systemd-resolve or gdm that cannot
> log in.

I don't really know my way around the sd-logind API, but it looks
like filtering on the session class (returned by sd_session_get_class)
might be fruitful.

pam_systemd(8) has an explanation on the classes.

I would probably filter out these: greeter, lock-screen, manager,
manager-early. Looking at the "pam_issue" implementation, it only
counts sessions with a class matching user* as logged in users.

Chris





This bug report was last modified 92 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.