clone 1068904 -1 retitle -1 w reports error getting sessions on non-systemd hosts found -1 2:4.0.4-8 notfound 1068904 2:4.0.4-8 thankyou
On Fri, 20 Jun 2025 at 00:17, <alexandre.ferri...@orange.com> wrote: > > I do confirm "w" is still broken in a way that is related to systemd, > though not exactly in the same way as initially mentioned here. > It's a different way, different version, attached to the same bug number which is problematic. > w: error getting sessions: Operation not permitted > > And strace shows that this error is the result of the absence of > /run/systemd/system > > faccessat2(AT_FDCWD, "/run/systemd/system/", F_OK, > AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory) > It seems odd that the systemd library gets an ENOENT but returns an EPERM. Their man page is silent on what it should be. The relevant code is: sessions = sd_get_sessions (&sessions_list); if (sessions < 0 && sessions != -ENOENT) error(EXIT_FAILURE, -sessions, _("error getting sessions")); The fix would be to check for negative sessions and it was either -ENOENT or -EPERM. I'll have to wait for the Debian bug system to generate the new bug ID. The changelog already has 1068904 fixed because that one is. I'll see if it can make Trixie, that's up to someone else. - Craig