diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-05-18 20:58:23 -0400 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-07-25 09:46:52 +0200 |
commit | 117331cd464206823ab57e24529ee8d3b696e806 (patch) | |
tree | bf131acd95552a9d54332efae26eb152b65bb206 /src | |
parent | c25b9ce75a7b1a440c788154c21353d3d1dbe337 (diff) |
sd-login: read list of uids of sessions from UIDS not ACTIVE_SESSIONS
As described by Luke Shumaker:
sd_seat_get_sessions looks at /run/elogind/seats/${seat_name}:SESSIONS to get
the list of sessions (which I believe is correct), and at
/run/elogind/seats/${seat_name}:ACTIVE_SESSIONS for the list of users (which
I believe is incorrect); I believe that it should look at the UIDS field for
the list of users. As far as I can tell, the ACTIVE_SESSIONS field is never
even present in the seats file. I also believe that this has been broken
since the function was first committed almost 6 years ago.
Fixes #5743.
Diffstat (limited to 'src')
-rw-r--r-- | src/libelogind/sd-login/sd-login.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libelogind/sd-login/sd-login.c b/src/libelogind/sd-login/sd-login.c index c431384b4..4da667cbc 100644 --- a/src/libelogind/sd-login/sd-login.c +++ b/src/libelogind/sd-login/sd-login.c @@ -739,7 +739,7 @@ _public_ int sd_seat_get_sessions(const char *seat, char ***sessions, uid_t **ui r = parse_env_file(p, NEWLINE, "SESSIONS", &s, - "ACTIVE_SESSIONS", &t, + "UIDS", &t, NULL); if (r == -ENOENT) return -ENXIO; |