logind-dbus: count user-early sessions in verify_shutdown_creds too
authorMike Yuan <me@yhndnzj.com>
Thu, 7 Mar 2024 14:22:30 +0000 (22:22 +0800)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 7 Mar 2024 22:56:40 +0000 (22:56 +0000)
Follow-up for 59afe07c217c73e3c7c19fb06aef2ff7bf609fd2

src/login/logind-dbus.c

index 4886895ee65531b583a05ab20c9d90cb9958ed2d..7290616252c6420c7edbd4c9f0d409659e80cf21 100644 (file)
@@ -1671,7 +1671,7 @@ static int have_multiple_sessions(
         /* Check for other users' sessions. Greeter sessions do not
          * count, and non-login sessions do not count either. */
         HASHMAP_FOREACH(session, m->sessions)
-                if (session->class == SESSION_USER &&
+                if (IN_SET(session->class, SESSION_USER, SESSION_USER_EARLY) &&
                     session->user->user_record->uid != uid)
                         return true;