summaryrefslogtreecommitdiff
path: root/src/login/logind-seat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/logind-seat.c')
-rw-r--r--src/login/logind-seat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c
index eac5a5f26b..b1a5ec30ef 100644
--- a/src/login/logind-seat.c
+++ b/src/login/logind-seat.c
@@ -408,6 +408,9 @@ int seat_attach_session(Seat *s, Session *session) {
assert(session);
assert(!session->seat);
+ if (!seat_has_vts(s) != !session->vtnr)
+ return -EINVAL;
+
session->seat = s;
LIST_PREPEND(sessions_by_seat, s->sessions, session);