mirror of
https://github.com/systemd/systemd.git
synced 2025-02-04 21:47:31 +03:00
util: move display_is_local() to pam_systemd.c, its only user
It's quite specific anyway, hence let's move this where it's used
This commit is contained in:
parent
2b2fec7db0
commit
ecd5f1a9e0
@ -51,15 +51,6 @@ int saved_argc = 0;
|
||||
char **saved_argv = NULL;
|
||||
static int saved_in_initrd = -1;
|
||||
|
||||
bool display_is_local(const char *display) {
|
||||
assert(display);
|
||||
|
||||
return
|
||||
display[0] == ':' &&
|
||||
display[1] >= '0' &&
|
||||
display[1] <= '9';
|
||||
}
|
||||
|
||||
bool kexec_loaded(void) {
|
||||
_cleanup_free_ char *s = NULL;
|
||||
|
||||
|
@ -43,8 +43,6 @@ static inline const char* enable_disable(bool b) {
|
||||
return b ? "enable" : "disable";
|
||||
}
|
||||
|
||||
bool display_is_local(const char *display) _pure_;
|
||||
|
||||
#define NULSTR_FOREACH(i, l) \
|
||||
for ((i) = (l); (i) && *(i); (i) = strchr((i), 0)+1)
|
||||
|
||||
|
@ -115,6 +115,15 @@ static int get_user_data(
|
||||
return PAM_SUCCESS;
|
||||
}
|
||||
|
||||
static bool display_is_local(const char *display) {
|
||||
assert(display);
|
||||
|
||||
return
|
||||
display[0] == ':' &&
|
||||
display[1] >= '0' &&
|
||||
display[1] <= '9';
|
||||
}
|
||||
|
||||
static int socket_from_display(const char *display, char **path) {
|
||||
size_t k;
|
||||
char *f, *c;
|
||||
|
Loading…
x
Reference in New Issue
Block a user