From 849f9712703119e7b9924baae9949eeacffacd71 Mon Sep 17 00:00:00 2001 From: Benny Baumann Date: Mon, 13 Nov 2023 14:21:50 +0100 Subject: pam_unix: avoid printing NULL values The value of pp can potentially be NULL. This handles this case when printing debug output. Signed-off-by: Benny Baumann --- modules/pam_unix/passverify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/pam_unix/passverify.c') diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c index 81b10d88..9d4ce232 100644 --- a/modules/pam_unix/passverify.c +++ b/modules/pam_unix/passverify.c @@ -157,7 +157,7 @@ PAMH_ARG_DECL(int verify_pwd_hash, p = NULL; /* no longer needed here */ /* the moment of truth -- do we agree with the password? */ - D(("comparing state of pp[%s] and hash[%s]", pp, hash)); + D(("comparing state of pp[%s] and hash[%s]", pp ? pp : "(null)", hash)); if (pp && strcmp(pp, hash) == 0) { retval = PAM_SUCCESS; -- cgit v1.2.3