chiark / gitweb /
util: generalize is_localhost() and use it everywhere where applicable
[elogind.git] / src / login / pam_systemd.c
index 262621d43fd3631eaa14b5d033d7be0f58217ac4..f522d6ec4f20fa83b8b1ecefa22bc8cbb0019174 100644 (file)
@@ -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 */