From dbd33500b645f9caaa6dbb7d18a3f4932b53847a Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Fri, 5 Oct 2007 02:58:47 +0000 Subject: The wallet client now automatically sets the sync attribute on a keytab object when get is called with the -S flag. --- tests/data/cmd-fake | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'tests/data') diff --git a/tests/data/cmd-fake b/tests/data/cmd-fake index 16d4b3a..e363651 100755 --- a/tests/data/cmd-fake +++ b/tests/data/cmd-fake @@ -12,12 +12,43 @@ if [ "$1" != "keytab" ] ; then exit 1 fi shift -if [ -n "$2" ] ; then +if [ "$command" = "attr" ] ; then + if [ -n "$4" ] ; then + echo "Too many arguments" >&2 + exit 1 + fi + if [ "$2" != sync ] ; then + echo "Unknown attribute $2" >&2 + exit 1 + fi +fi +if [ "$command" != "attr" ] && [ -n "$2" ] ; then echo "Too many arguments" >&2 exit 1 fi case "$command" in +attr) + case "$1" in + service/fake-srvtab) + if [ -n "$3" ] ; then + if [ "$3" != "kaserver" ] ; then + echo "Invalid attribute value $3" >&2 + exit 1 + fi + touch sync-kaserver + else + if [ -f sync-kaserver ] ; then + echo "kaserver" + fi + fi + ;; + *) + echo "Looking at sync attribute of wrong keytab" >&2 + exit 1 + ;; + esac + ;; get) case "$1" in service/fake-test) -- cgit v1.2.3