chiark / gitweb /
logind: require VTs on seat0 and forbid elsewhere
[elogind.git] / src / login / logind-seat.c
index eac5a5f..b1a5ec3 100644 (file)
@@ -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);