From dce865312738bdae49865d67efa9e30af16895f8 Mon Sep 17 00:00:00 2001 From: Pawel Krawczyk Date: Thu, 2 Oct 2014 11:58:28 +0100 Subject: Fix always true condition The condition was checking tac_prompt which is a static array, so it will always return some address. Now checking the value of the first element of the array, which can be zero on non-zero. --- support.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support.c b/support.c index cc04070..292a3a9 100644 --- a/support.c +++ b/support.c @@ -131,7 +131,7 @@ int tacacs_get_password (pam_handle_t * pamh, int flags /* set up conversation call */ msg.msg_style = PAM_PROMPT_ECHO_OFF; - if (!tac_prompt) { + if (!tac_prompt[0]) { msg.msg = "Password: "; } else { msg.msg = tac_prompt; -- cgit v1.2.3