summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
Diffstat (limited to 'src/login')
-rw-r--r--src/login/pam_systemd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c
index 262621d43f..f522d6ec4f 100644
--- a/src/login/pam_systemd.c
+++ b/src/login/pam_systemd.c
@@ -357,9 +357,7 @@ _public_ PAM_EXTERN int pam_sm_open_session(
if (isempty(class))
class = streq(type, "unspecified") ? "background" : "user";
- remote = !isempty(remote_host) &&
- !streq_ptr(remote_host, "localhost") &&
- !streq_ptr(remote_host, "localhost.localdomain");
+ remote = !isempty(remote_host) && !is_localhost(remote_host);
/* Talk to logind over the message bus */