[systemd-bugs] [Bug 62676] systemctl [reboot|shutdown] wronly believes root is still logged in on a tty
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Mar 25 10:42:57 PDT 2013
https://bugs.freedesktop.org/show_bug.cgi?id=62676
--- Comment #4 from Peter Weber <peter.weber at ttyhoney.com> ---
http://cgit.freedesktop.org/systemd/systemd/tree/src/systemd/sd-login.h
// from sd-login.h
/* Get all sessions, store in *sessions. Returns the number of
* sessions. If sessions is NULL only returns number of sessions. */
int sd_get_sessions(char ***sessions);
http://cgit.freedesktop.org/systemd/systemd/tree/src/login/sd-login.c
// from sd-login.c
_public_ int sd_get_sessions(char ***sessions) {
return get_files_in_directory("/run/systemd/sessions/", sessions);
}
This directory contains a ASCII-File and a PIPE, after "root" has logged out
from the TTY the pipe is gone. But the ASCII-File is still there and contains:
# This is private data. Do not parse.
UID=0
USER=root
ACTIVE=0
STATE=closing
REMOTE=0
KILL_PROCESSES=0
TYPE=tty
CLASS=user
SEAT=seat0
TTY=tty2
SERVICE=login
VTNR=2
LEADER=12877
AUDIT=3
Well. This file remains there. It doesn't go away.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20130325/269a1572/attachment.html>
More information about the systemd-bugs
mailing list