chiark / gitweb /
logind: require VTs on seat0 and forbid elsewhere
[elogind.git] / src / login / logind-dbus.c
index 4239b37..9538150 100644 (file)
@@ -514,7 +514,7 @@ static int method_create_session(sd_bus *bus, sd_bus_message *message, void *use
 
         if (seat) {
                 if (seat_has_vts(seat)) {
-                        if (vtnr > 63)
+                        if (!vtnr || vtnr > 63)
                                 return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "VT number out of range");
                 } else {
                         if (vtnr != 0)