summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Krawczyk <pawel.krawczyk@hush.com>2014-10-02 11:58:28 +0100
committerPawel Krawczyk <pawel.krawczyk@hush.com>2014-10-02 11:58:28 +0100
commitdce865312738bdae49865d67efa9e30af16895f8 (patch)
tree470d9154bf33e497bee1831fcd7bb0f17993501e
parente3fe100e97fc32b34cab7336e2bf061abfa5281e (diff)
downloadpam_tacplus-dce865312738bdae49865d67efa9e30af16895f8.tar.gz
pam_tacplus-dce865312738bdae49865d67efa9e30af16895f8.zip
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.
-rw-r--r--support.c2
1 files changed, 1 insertions, 1 deletions
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;