diff options
Diffstat (limited to 'src/basic/login-util.h')
-rw-r--r-- | src/basic/login-util.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/basic/login-util.h b/src/basic/login-util.h new file mode 100644 index 0000000..e1e62e1 --- /dev/null +++ b/src/basic/login-util.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ +#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; +} |