summaryrefslogtreecommitdiff
path: root/src/login/pam_systemd.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-02 13:41:31 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-02 13:41:31 +0200
commitfecc80c1ba2eed9dadb9a10c15508c356bcc5fc1 (patch)
tree8db82ae690416827c910683432c9746f365acf2e /src/login/pam_systemd.c
parent9a00f57a5ba7ed431e6bac8d8b36518708503b4e (diff)
util: generalize is_localhost() and use it everywhere where applicable
Diffstat (limited to 'src/login/pam_systemd.c')
-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 */