util: move logind_running() to login-util.[ch]
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -617,10 +617,6 @@ static inline unsigned log2u_round_up(unsigned x) {
|
||||
return log2u(x - 1) + 1;
|
||||
}
|
||||
|
||||
static inline bool logind_running(void) {
|
||||
return access("/run/systemd/seats/", F_OK) >= 0;
|
||||
}
|
||||
|
||||
#define DECIMAL_STR_WIDTH(x) \
|
||||
({ \
|
||||
typeof(x) _x_ = (x); \
|
||||
|
||||
+12
-12
@@ -19,31 +19,31 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <endian.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/file.h>
|
||||
#include <pwd.h>
|
||||
#include <endian.h>
|
||||
|
||||
#include <security/pam_modules.h>
|
||||
#include <security/_pam_macros.h>
|
||||
#include <security/pam_modutil.h>
|
||||
#include <security/pam_ext.h>
|
||||
#include <security/pam_misc.h>
|
||||
#include <security/pam_modules.h>
|
||||
#include <security/pam_modutil.h>
|
||||
#include <sys/file.h>
|
||||
|
||||
#include "bus-common-errors.h"
|
||||
#include "util.h"
|
||||
#include "audit.h"
|
||||
#include "macro.h"
|
||||
#include "strv.h"
|
||||
#include "bus-common-errors.h"
|
||||
#include "bus-error.h"
|
||||
#include "bus-util.h"
|
||||
#include "def.h"
|
||||
#include "socket-util.h"
|
||||
#include "fileio.h"
|
||||
#include "bus-error.h"
|
||||
#include "formats-util.h"
|
||||
#include "terminal-util.h"
|
||||
#include "hostname-util.h"
|
||||
#include "login-util.h"
|
||||
#include "macro.h"
|
||||
#include "socket-util.h"
|
||||
#include "strv.h"
|
||||
#include "terminal-util.h"
|
||||
#include "util.h"
|
||||
|
||||
static int parse_argv(
|
||||
pam_handle_t *handle,
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "systemd/sd-login.h"
|
||||
#include "sd-login.h"
|
||||
|
||||
#include "login-util.h"
|
||||
#include "logind-acl.h"
|
||||
#include "udev.h"
|
||||
#include "util.h"
|
||||
|
||||
Reference in New Issue
Block a user