summaryrefslogtreecommitdiff
path: root/src/login/logind-dbus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-04-22 02:30:13 +0200
committerLennart Poettering <lennart@poettering.net>2012-04-22 02:41:18 +0200
commitd1122ad5e3222cc17bfb556c23273598a5fb60fa (patch)
tree0deb6b39eb1130939d2ea27c06f02b878dd5e339 /src/login/logind-dbus.c
parent337eebb936be1da1215535e866965ce54c82d755 (diff)
login: assing /dev/console logins to seat0
Diffstat (limited to 'src/login/logind-dbus.c')
-rw-r--r--src/login/logind-dbus.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index b8143b6179..3fe6c872b7 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -351,16 +351,25 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message, DBusMess
vtnr = (uint32_t) v;
else if (vtnr != (uint32_t) v)
return -EINVAL;
+ } else if (tty_is_console(tty)) {
+
+ if (!s)
+ s = m->vtconsole;
+ else if (s != m->vtconsole)
+ return -EINVAL;
+
+ if (vtnr != 0)
+ return -EINVAL;
} else if (!isempty(tty) && s && seat_is_vtconsole(s))
return -EINVAL;
if (s) {
if (seat_can_multi_session(s)) {
- if (vtnr <= 0 || vtnr > 63)
+ if (vtnr > 63)
return -EINVAL;
} else {
- if (vtnr > 0)
+ if (vtnr != 0)
return -EINVAL;
}
}