diff options
Diffstat (limited to 'src/basic/login-util.h')
-rw-r--r-- | src/basic/login-util.h | 5 |
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; +} |