diff options
author | Russ Allbery <rra@stanford.edu> | 2007-10-05 02:58:47 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2007-10-05 02:58:47 +0000 |
commit | dbd33500b645f9caaa6dbb7d18a3f4932b53847a (patch) | |
tree | 29ccd775f40db8b862e1a6c9851c503cfa0e503b /tests/data | |
parent | f21fba65f194ff26bf72e23f0db311314529720b (diff) |
The wallet client now automatically sets the sync attribute on a keytab
object when get is called with the -S flag.
Diffstat (limited to 'tests/data')
-rwxr-xr-x | tests/data/cmd-fake | 33 |
1 files changed, 32 insertions, 1 deletions
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) |