diff --git a/coreutils-9.5-readutmp-web-session.patch b/coreutils-9.5-readutmp-web-session.patch new file mode 100644 index 0000000..32a87fe --- /dev/null +++ b/coreutils-9.5-readutmp-web-session.patch @@ -0,0 +1,39 @@ +From 43f7f428a1665950233557bd97611bd5e996b5cb Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Tue, 27 Aug 2024 11:46:33 +0200 +Subject: readutmp: In systemd mode, show sessions of type "web". + +Reported by Allison Karlitskaya in +. + +* lib/readutmp.c (read_utmp_from_systemd): For a systemd session of type +"web", add a single USER_PROCESS entry. + +Upstream-commit: 43f7f428a1665950233557bd97611bd5e996b5cb +Cherry-picked-by: Lukáš Zaoral +--- + lib/readutmp.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/lib/readutmp.c b/lib/readutmp.c +index 10d79d1..3c4f97b 100644 +--- a/lib/readutmp.c ++++ b/lib/readutmp.c +@@ -867,6 +867,14 @@ read_utmp_from_systemd (idx_t *n_entries, STRUCT_UTMP **utmp_buf, int options) + else if (pty != NULL) + tty = pty; + } ++ else if (strcmp (type, "web") == 0) ++ { ++ char *service; ++ if (sd_session_get_service (session, &service) < 0) ++ service = NULL; ++ ++ tty = service; ++ } + } + + /* Create up to two USER_PROCESS entries: one for the seat, +-- +cgit v1.1 + diff --git a/coreutils.spec b/coreutils.spec index db0bd0d..e4c3cb4 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils Version: 9.5 -Release: 8%{?dist} +Release: 9%{?dist} # some used parts of gnulib are under various variants of LGPL License: GPL-3.0-or-later AND GFDL-1.3-no-invariants-or-later AND LGPL-2.1-or-later AND LGPL-3.0-or-later Url: https://www.gnu.org/software/coreutils/ @@ -32,6 +32,10 @@ Patch103: coreutils-python3.patch # df --direct Patch104: coreutils-df-direct.patch +# coreutils no longer lists Cockpit logins in `who` (rhbz#2307847) +# https://git.savannah.gnu.org/cgit/gnulib.git/patch/?id=43f7f428a1665950233557bd97611bd5e996b5cb +Patch105: coreutils-9.5-readutmp-web-session.patch + # (sb) lin18nux/lsb compliance - multibyte functionality patch Patch800: coreutils-i18n.patch @@ -274,6 +278,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir %license COPYING %changelog +* Tue Aug 27 2024 Lukáš Zaoral - 9.5-9 +- show web sessions in who output (rhbz#2307847) + * Wed Aug 21 2024 Lukáš Zaoral - 9.5-8 - add missing systemd-devel buildrequires