diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2013-09-17 17:40:01 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-09-17 13:48:41 -0500 |
commit | 9209d5121dfb3049cbf280139c4cc40c2038edcc (patch) | |
tree | e7a00fba89db767a5311da916afd62b42012f299 /src | |
parent | 20e1bd9d1b289761a1b0010d778bdaf924f317b3 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/login/logind-session.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login/logind-session.c b/src/login/logind-session.c index 407429c48a..ab1c79cfa2 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -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) |