chiark / gitweb /
tree-wide: get rid of selinux_context_t (#3732)
[elogind.git] / src / basic / login-util.h
index a79f20c1b1e6b1a3f507de8125effeae0ae4e748..b01ee25c884cee292d2d826fc2c7f57a515e5018 100644 (file)
@@ -1,4 +1,4 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+#pragma once
 
 /***
   This file is part of systemd.
   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;
+}