diff options
| author | Pawel Krawczyk <pawel.krawczyk@hush.com> | 2014-10-02 11:58:28 +0100 |
|---|---|---|
| committer | Pawel Krawczyk <pawel.krawczyk@hush.com> | 2014-10-02 11:58:28 +0100 |
| commit | dce865312738bdae49865d67efa9e30af16895f8 (patch) | |
| tree | 470d9154bf33e497bee1831fcd7bb0f17993501e | |
| parent | e3fe100e97fc32b34cab7336e2bf061abfa5281e (diff) | |
| download | pam_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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |
