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.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/basic/login-util.h b/src/basic/login-util.h
index a79f20c1b1..b01ee25c88 100644
--- a/src/basic/login-util.h
+++ b/src/basic/login-util.h
@@ -1,4 +1,4 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+#pragma once
/***
This file is part of systemd.
@@ -19,8 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#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;
+}