diff options
| author | Dave Olson <olson@cumulusnetworks.com> | 2016-11-23 15:44:14 -0800 |
|---|---|---|
| committer | Dave Olson <olson@cumulusnetworks.com> | 2016-11-28 15:15:54 -0800 |
| commit | a696b9f5bcdd67185cbd0426afcebff847551b61 (patch) | |
| tree | 4f2065b0b179f5fdb9c6f60b03834541f90404a5 | |
| parent | c0fa56a885473e8eb2455a8eec47c87e3b68e16a (diff) | |
| download | libnss-tacplus-a696b9f5bcdd67185cbd0426afcebff847551b61.tar.gz libnss-tacplus-a696b9f5bcdd67185cbd0426afcebff847551b61.zip | |
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
| -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++; } |
