From 96444b4156cbc5d0364ac45a7b3288ae28dfbb58 Mon Sep 17 00:00:00 2001
From: Benjamin Berg <bberg@redhat.com>
Date: Tue, 13 Aug 2019 14:16:11 +0200
Subject: [PATCH] pam: Fix rhost string length check
---
pam/pam_fprintd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pam/pam_fprintd.c b/pam/pam_fprintd.c
index 408b74c..b2eee4d 100644
--- a/pam/pam_fprintd.c
+++ b/pam/pam_fprintd.c
@@ -481,7 +481,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc,
* "localhost" if the host is local.
* We want to not run for known remote hosts */
if (rhost != NULL &&
- rhost != '\0' &&
+ *rhost != '\0' &&
strcmp (rhost, "localhost") != 0) {
return PAM_AUTHINFO_UNAVAIL;
}
--
2.21.0