chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20e1bd9
)
logind: fix session_activate(vtnr = 0)
author
David Herrmann
<dh.herrmann@gmail.com>
Tue, 17 Sep 2013 15:40:01 +0000
(17:40 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 17 Sep 2013 18:48:41 +0000
(13:48 -0500)
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.
src/login/logind-session.c
patch
|
blob
|
history
diff --git
a/src/login/logind-session.c
b/src/login/logind-session.c
index 407429c48a11766ead16037c987eac55aa3056f7..ab1c79cfa226557493325f2ae1c553472e1e8aa8 100644
(file)
--- 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)