Bug 2307847 - coreutils-9.5-8.fc41 no longer lists Cockpit logins in `who`
Summary: coreutils-9.5-8.fc41 no longer lists Cockpit logins in `who`
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Lukáš Zaoral
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: CockpitTest
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-08-26 09:16 UTC by Allison Karlitskaya
Modified: 2024-08-27 14:19 UTC (History)
11 users (show)

Fixed In Version: coreutils-9.5-9.fc41 coreutils-9.5-9.fc42
Clone Of:
Environment:
Last Closed: 2024-08-27 14:19:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Allison Karlitskaya 2024-08-26 09:16:20 UTC
The added systemd-devel buildrequires in the latest coreutils package results in the `who` command sourcing its information about active logins from systemd rather than `utmp`.  That's not bad, but this new code path doesn't have support for listing sessions that:
 - aren't seats,
 - don't have an associated terminal device, and
 - aren't listed as "XDG_SESSION_TYPE=tty".

Cockpit doesn't have a XDG seat, doesn't allocate a pseudoterminal, and sets its XDG_SESSION_TYPE to "web" which means that it gets excluded.

The upstream code in question is part of read_utmp_from_systemd() in gnulib: http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/readutmp.c;h=10d79d1d81a5eeb9da7cbfcc72f214430abcfa2c;hb=HEAD#l800 (look at the heuristics under the "Try harder" comment for why this works properly with ssh sessions, even without controlling terminals).

This is a regression in the test suite of Cockpit and definitely a usability regression which will be visible to Fedora users.  We're currently tracking this as a knownissue in our CI: https://github.com/cockpit-project/bots/issues/6789.  I've also filed the bug upstream, but after waiting a while I haven't noticed it appear on the archives page yet (nor have I received a rejection email for it).  When it does appear I'll update our issue with a link to it.

Reproducible: Always

Steps to Reproduce:
1. Install cockpit, login to a session
2. run `who`

Actual Results:  
The 'web console' session is not listed in the output of who.

Expected Results:  
The session should be listed in `who` (as it was with coreutils-9.5-7).

Comment 1 Lukáš Zaoral 2024-08-26 10:19:57 UTC
Thank you for filing this issue and for filing a related bug to the bug-gnulib ML, Allison!  It usually takes a few hours for it to appear.

Is it acceptable for you if I revert the integration with systemd in F41 and leave it enabled in Rawhide?

Regards,
Lukas

Comment 2 Allison Karlitskaya 2024-08-26 10:35:19 UTC
Hi Lukáš, thanks for the reply.  It's definitely your call, but I think reverting the change for Fedora 41 would be prudent at this point.

As for rawhide, I agree that it makes sense to leave it as it is, pending more discussion (and maybe a fix) upstream.

Thanks!

Comment 3 Fedora Update System 2024-08-26 10:54:20 UTC
FEDORA-2024-613877cfd2 (coreutils-9.5-9.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-613877cfd2

Comment 4 Fedora Update System 2024-08-26 14:07:44 UTC
FEDORA-2024-613877cfd2 (coreutils-9.5-9.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Lukáš Zaoral 2024-08-26 14:09:12 UTC
Retargeting to rawhide.

Comment 6 Lukáš Zaoral 2024-08-27 10:13:56 UTC
I'll backport https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=43f7f428a1665950233557bd97611bd5e996b5cb to rawhide as soon as possible to fix this issue.

Comment 7 Fedora Update System 2024-08-27 12:32:07 UTC
FEDORA-2024-17516d6499 (coreutils-9.5-9.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-17516d6499

Comment 8 Allison Karlitskaya 2024-08-27 13:37:34 UTC
Thanks for the backport.  I'll test the package (and report on bodhi) as soon as it's available to install.

Comment 9 Fedora Update System 2024-08-27 14:19:44 UTC
FEDORA-2024-17516d6499 (coreutils-9.5-9.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.