Skip to content

uptime: Fix uptime return 0 user when systemd-pam is not installed

Chao Liu requested to merge SuperSix/procps:SuperSix-master-patch-07783 into master

When systemd-pam is not installed, systemd won't create files in /run/systemd/sessions/ and sd_get_sessions will return 0. However, the actual number of users is not 0. When sd_get_sessions return 0, uptime should use getutxent for statistics.

Merge request reports