summaryrefslogtreecommitdiff
path: root/src/basic/login-util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/login-util.h')
-rw-r--r--src/basic/login-util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/basic/login-util.h b/src/basic/login-util.h
index a79f20c1b1..be5bb64870 100644
--- a/src/basic/login-util.h
+++ b/src/basic/login-util.h
@@ -22,5 +22,10 @@
#pragma once
#include <stdbool.h>
+#include <unistd.h>
bool session_id_valid(const char *id);
+
+static inline bool logind_running(void) {
+ return access("/run/systemd/seats/", F_OK) >= 0;
+}