From e733132938bc4fc74584b9a7c0f5441eb640e617 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Thu, 7 Feb 2008 00:46:54 +0000 Subject: 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. --- tests/data/cmd-fake | 13 +++++++++---- tests/data/fake-keytab-old | Bin 0 -> 334 bytes 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 tests/data/fake-keytab-old (limited to 'tests/data') diff --git a/tests/data/cmd-fake b/tests/data/cmd-fake index 4b97f43..a8d979a 100755 --- a/tests/data/cmd-fake +++ b/tests/data/cmd-fake @@ -50,11 +50,16 @@ setattr) fi case "$1" in service/fake-srvtab) - if [ "$3" != "kaserver" ] ; then - echo "Invalid attribute value $3" >&2 - exit 1 + if [ "$3" = "kaserver" ] ; then + touch sync-kaserver + else + if [ "$3" = "" ] ; then + rm sync-kaserver + else + echo "Invalid attribute value $3" >&2 + exit 1 + fi fi - touch sync-kaserver ;; *) echo "Looking at sync attribute of wrong keytab" >&2 diff --git a/tests/data/fake-keytab-old b/tests/data/fake-keytab-old new file mode 100644 index 0000000..6a13fd6 Binary files /dev/null and b/tests/data/fake-keytab-old differ -- cgit v1.2.3