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