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:
parent
20e1bd9d1b
commit
9209d5121d
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user