From c17ddef341a68239aa26c6da938410d894b60c7f Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 29 Aug 2007 21:00:42 +0000 Subject: Fix the remctld flags for the latest version. Fix the kinit invocation for stock MIT Kerberos. Add an additional test of the expires command, which isn't special-cased in the wallet client. --- tests/client/basic-t.in | 11 ++++++----- tests/data/cmd-fake | 8 ++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/client/basic-t.in b/tests/client/basic-t.in index cb7619f..68fcd60 100644 --- a/tests/client/basic-t.in +++ b/tests/client/basic-t.in @@ -65,7 +65,7 @@ else fi fi if [ ! -f data/test.keytab ] || [ -z "@REMCTLD@" ] ; then - for n in 1 2 3 4 5 6 ; do + for n in 1 2 3 4 5 6 7 ; do echo ok $n \# skip -- no Kerberos configuration done exit 0 @@ -78,11 +78,10 @@ fi # Start the remctld daemon and wait for it to start. rm -f data/pid -KRB5_KTNAME=data/test.keytab; export KRB5_KTNAME ( @REMCTLD@ -m -p 14444 -s `cat data/test.principal` -P data/pid \ - -f data/wallet.conf &) + -f data/wallet.conf -d -S -F -k data/test.keytab &) KRB5CCNAME=data/test.cache; export KRB5CCNAME -kinit -t -k data/test.keytab `cat data/test.principal` > /dev/null 2>&1 +kinit -k -t data/test.keytab `cat data/test.principal` > /dev/null 2>&1 if [ $? != 0 ] ; then kinit -t data/test.keytab `cat data/test.principal` > /dev/null 2>&1 fi @@ -100,7 +99,7 @@ if [ ! -f data/pid ] ; then fi # Now, we can finally run our tests. -runsuccess "" -c fake-wallet get keytab service/fake-test +runsuccess "" -c fake-wallet get keytab -f data/fake-keytab service/fake-test if cmp keytab data/fake-keytab >/dev/null 2>&1 ; then printcount "ok" rm keytab @@ -115,6 +114,8 @@ runfailure 1 "Unknown keytab service/unknown" \ -c fake-wallet show keytab service/unknown runfailure 1 "Unknown keytab service/unknown" \ -c fake-wallet get keytab service/unknown +runsuccess "Expiration date of service/fake-test" \ + -c fake-wallet expires keytab service/fake-test # Clean up. rm -f data/test.cache diff --git a/tests/data/cmd-fake b/tests/data/cmd-fake index 4093320..83e3e0a 100755 --- a/tests/data/cmd-fake +++ b/tests/data/cmd-fake @@ -12,6 +12,10 @@ if [ "$1" != "keytab" ] ; then exit 1 fi shift +if [ -n "$2" ] ; then + echo "Too many arguments" >&2 + exit 1 +fi case "$command" in get) @@ -32,6 +36,10 @@ show) exit 1 fi ;; +expires) + echo "Expiration date of $1" + exit 0 + ;; *) echo "Unknown command $command" >&2 exit 1 -- cgit v1.2.3