Bruno Haible <[email protected]> writes: > Paul Eggert wrote: >> > But, yes, that seems correct to me also. >> >> Thanks for the comments. I installed the attached and plan to propagate >> this into coreutils shortly. > > And what is the "who" output that you get with this patch? > > The patch looks reasonable, but I am not convinced any more that doing > modifications on the coreutils+gnulib side is the only thing we need. > > Basically, we have > - an information broker, systemd-logind, > - several information providers: the login screens and terminal emulators, > - several information consumers: users of the libsystemd library, in > particular, the 'who' program. > > After this infrastructure has been put in place (on our side, in 2023), > it could be that some of the information is partially nonsense: > > $ who > eggert pts/0 2026-04-18 08:41 (47.154.25.11) > gdm-greeter seat0 2026-04-17 17:26 > gdm-greeter tty1 2026-04-17 17:26 > > Were you only remotely logged in? And no one sitting at "seat0"? > > I am now installing Fedora44 with 8 different desktop environments and > trying to see if the "who" output makes sense in all cases. > > If some "who" output does not make sense, generally it is better to > fix the information provider, rather than to have a sanitization pass > in the information consumers. In that case, we should consider filing > bug reports with the information providers.
I don't follow - the broker and provider, as you've termed them, provide a larger set than what 'who' is supposed to report, and provide enough information to distinguish those which are relevant and not relevant to 'who'. Since 'who' is supposed only to report people who are logged in, I don't see how filtering the list of sessions - a broad category - to get only user sessions - precisely what 'who' needs - is something to be fixed in the providers, assuming they do not list themselves wrongly as users? I agree that undue sanitization downstream is in general a worse idea than fixing the information provider, but, ISTM that the information provider here is fine. I didn't see (maybe it was sent but I missed it) the loginctl output corresponding to the 'who' output above but, given that 'greeter' is a class, I'd venture to guess that the class of the "user" sessions on seat0 and tty1 are "greeter", but I don't have a GDM system to check this on. Also, as always, thank you for doing extensive testing :-) -- Arsen Arsenović
signature.asc
Description: PGP signature
