From a696b9f5bcdd67185cbd0426afcebff847551b61 Mon Sep 17 00:00:00 2001 From: Dave Olson Date: Wed, 23 Nov 2016 15:44:14 -0800 Subject: Missed handling a secret/server ordering secret=key1 secret=key2 server=server1 server=server2 Should result in pairing server1/key1 server2/key2. That case didn't work --- nss_tacplus.c | 4 ++-- 1 file 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++; } -- cgit v1.2.3