X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogin%2Fpam_systemd.c;h=0c71177deb96c48354e495d13d3f2f4559edf6db;hb=13f493dc9ace9861c1f27c4d37e8cd6d52fe6a32;hp=262621d43fd3631eaa14b5d033d7be0f58217ac4;hpb=dfb0c6cc3b1b5d2250b76b052d9536995e0cdd16;p=elogind.git diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c index 262621d43..0c71177de 100644 --- a/src/login/pam_systemd.c +++ b/src/login/pam_systemd.c @@ -213,7 +213,7 @@ _public_ PAM_EXTERN int pam_sm_open_session( *seat = NULL, *type = NULL, *class = NULL, *class_pam = NULL, *type_pam = NULL, *cvtnr = NULL, *desktop = NULL; - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int session_fd = -1, existing, r; bool debug = false, remote; struct passwd *pw; @@ -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 */ @@ -498,7 +496,7 @@ _public_ PAM_EXTERN int pam_sm_close_session( int argc, const char **argv) { _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; const void *existing = NULL; const char *id; int r;