summaryrefslogtreecommitdiff
path: root/src/login/logind-session-dbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/logind-session-dbus.c')
-rw-r--r--src/login/logind-session-dbus.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c
index 26c853e4ee..ef73cd434a 100644
--- a/src/login/logind-session-dbus.c
+++ b/src/login/logind-session-dbus.c
@@ -570,3 +570,21 @@ int session_send_lock(Session *s, bool lock) {
return 0;
}
+
+int session_send_lock_all(Manager *m, bool lock) {
+ Session *session;
+ Iterator i;
+ int r = 0;
+
+ assert(m);
+
+ HASHMAP_FOREACH(session, m->sessions, i) {
+ int k;
+
+ k = session_send_lock(session, lock);
+ if (k < 0)
+ r = k;
+ }
+
+ return r;
+}