diff options
author | Russ Allbery <rra@stanford.edu> | 2008-02-07 00:46:54 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2008-02-07 00:46:54 +0000 |
commit | e733132938bc4fc74584b9a7c0f5441eb640e617 (patch) | |
tree | 7c2cd522c55d6a2f1e37f75081368529f9d5b8a3 /tests/client | |
parent | f9e41d036aebc03adc2a03a956f219fc827e2cdd (diff) |
When creating a srvtab based on a just-downloaded keytab, extract the
srvtab key before merging the keytab into an existing file.
Otherwise, if the new keys had a lower kvno than the old keys
(possible after deleting and recreating the object), the wrong key
would be extracted for the srvtab.
Diffstat (limited to 'tests/client')
-rw-r--r-- | tests/client/basic-t.in | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/tests/client/basic-t.in b/tests/client/basic-t.in index d983786..807d9e9 100644 --- a/tests/client/basic-t.in +++ b/tests/client/basic-t.in @@ -12,7 +12,7 @@ . "@abs_top_srcdir@/tests/libtest.sh" # Print the number of tests. -total=27 +total=30 count=1 echo "$total" @@ -82,7 +82,7 @@ rm -f output output.bak keytab keytab.bak srvtab srvtab.bak sync-kaserver # Now, we can finally run our tests. First, basic operations. runsuccess "" "$wallet" -k "$principal" -p 14373 -s localhost -c fake-wallet \ - get file -f output fake-test + -f output get file fake-test if cmp output data/fake-data >/dev/null 2>&1 ; then printcount "ok" else @@ -94,7 +94,7 @@ else printcount "ok" fi runsuccess "" "$wallet" -k "$principal" -p 14373 -s localhost -c fake-wallet \ - get file -f output fake-test + -f output get file fake-test if cmp output data/fake-data >/dev/null 2>&1 ; then printcount "ok" else @@ -127,7 +127,7 @@ fi rm -f output output.bak # Test keytab support. -runsuccess "" "$wallet" get -f keytab keytab service/fake-srvtab +runsuccess "" "$wallet" -f keytab get keytab service/fake-srvtab if cmp keytab data/fake-keytab >/dev/null 2>&1 ; then printcount "ok" rm keytab @@ -141,7 +141,7 @@ else fi # Test srvtab support. -runsuccess "" "$wallet" get keytab -f keytab -S srvtab service/fake-srvtab +runsuccess "" "$wallet" -f keytab -S srvtab get keytab service/fake-srvtab if cmp keytab data/fake-keytab >/dev/null 2>&1 ; then printcount "ok" else @@ -153,7 +153,7 @@ if [ -f sync-kaserver ] ; then else printcount "not ok" fi -runsuccess "" "$wallet" get keytab -f keytab -S srvtab service/fake-srvtab +runsuccess "" "$wallet" -f keytab -S srvtab get keytab service/fake-srvtab if cmp keytab data/fake-keytab >/dev/null 2>&1 ; then printcount "ok" else @@ -188,6 +188,22 @@ else printcount "not ok" fi +# Test srvtab download into a merged keytab with an older version. +cp data/fake-keytab-old keytab +runsuccess "" "$wallet" -f keytab -S srvtab get keytab service/fake-srvtab +if [ -f sync-kaserver ] ; then + printcount "ok" + rm sync-kaserver +else + printcount "not ok" +fi +if cmp srvtab data/fake-srvtab >/dev/null 2>&1 ; then + printcount "ok" +else + printcount "not ok" +fi +rm -f keytab srvtab + # Test various other client functions and errors. runsuccess "This is a fake keytab." "$wallet" get keytab service/fake-output runsuccess "Some stuff about file fake-test" \ |