Commit 96444b41 authored by Benjamin Berg's avatar Benjamin Berg
Browse files

pam: Fix rhost string length check

parent c0ba475f
...@@ -481,7 +481,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, ...@@ -481,7 +481,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc,
* "localhost" if the host is local. * "localhost" if the host is local.
* We want to not run for known remote hosts */ * We want to not run for known remote hosts */
if (rhost != NULL && if (rhost != NULL &&
rhost != '\0' && *rhost != '\0' &&
strcmp (rhost, "localhost") != 0) { strcmp (rhost, "localhost") != 0) {
return PAM_AUTHINFO_UNAVAIL; return PAM_AUTHINFO_UNAVAIL;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment