diff options
| -rw-r--r-- | nss_tacplus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nss_tacplus.c b/nss_tacplus.c index 5b0766a..0119343 100644 --- a/nss_tacplus.c +++ b/nss_tacplus.c @@ -173,8 +173,8 @@ static int nss_tacplus_config(int *errnop, const char *cfile, int top) tac_srv_no < TAC_PLUS_MAXSERVERS; server = server->ai_next) { tac_srv[tac_srv_no].addr = server; - if(tac_key_no && tac_srv_no != (tac_key_no-1)) - /* use current key if set, and not the same index */ + /* use current key, if our index not yet set */ + if(tac_key_no && !tac_srv[tac_srv_no].key) tac_srv[tac_srv_no].key = tac_srv[tac_key_no-1].key; tac_srv_no++; } |
