summaryrefslogtreecommitdiff
path: root/src/basic/login-util.h
blob: ed454bd67f1ba5b3d45bef9086e2e3f315a59380 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once

/***
  This file is part of systemd.

  Copyright 2013 Zbigniew Jędrzejewski-Szmek
***/

#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;
}