1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-08 08:58:27 +03:00

logind: fix session_activate(vtnr = 0)

VT numbers start with 1. If a session has vtnr == 0, we must not assume it
is running on a VT.
Note that this could trigger the assert() below as CreateSession() sets
vtnr to 0, not <0.
This commit is contained in:
David Herrmann 2013-09-17 17:40:01 +02:00 committed by Lennart Poettering
parent 20e1bd9d1b
commit 9209d5121d

View File

@ -363,7 +363,7 @@ int session_activate(Session *s) {
assert(s);
assert(s->user);
if (s->vtnr < 0)
if (s->vtnr <= 0)
return -ENOTSUP;
if (!s->seat)