]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
logind: also check session class in session_get_idle_hint() 34861/head
authorLennart Poettering <lennart@poettering.net>
Tue, 22 Oct 2024 16:12:20 +0000 (18:12 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 22 Oct 2024 16:44:05 +0000 (18:44 +0200)
src/login/logind-session.c

index 81c8b80dfdfd87fdff42e35eacc2816926b98bb2..66b4eadf61fc02cd88ff221055168380d7d66b5e 100644 (file)
@@ -1098,6 +1098,9 @@ int session_get_idle_hint(Session *s, dual_timestamp *t) {
 
         assert(s);
 
+        if (!SESSION_CLASS_CAN_IDLE(s->class))
+                return false;
+
         /* Graphical sessions have an explicit idle hint */
         if (SESSION_TYPE_IS_GRAPHICAL(s->type)) {
                 if (t)