chiark / gitweb /
logind: remove unused session->closing field
[elogind.git] / src / login / logind-dbus.c
index 4239b3788a83bd70b93130a297b7295874071b1e..a4bdf5f28cf9cc8e19e69c471f32c2c4984a48c1 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)
@@ -1252,7 +1252,6 @@ static int have_multiple_sessions(
          * count, and non-login sessions do not count either. */
         HASHMAP_FOREACH(session, m->sessions, i)
                 if (session->class == SESSION_USER &&
-                    !session->closing &&
                     session->user->uid != uid)
                         return true;