From 9d5ee8d947433edd542ed441136d19e4f4033af4 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 19 Sep 2007 22:43:15 +0000 Subject: Implement unchanging support in the keytab object backend, which retrieves keytabs via remctl from the KDC. --- perl/t/data/keytab-fake | 29 +++++++++++++++++++++++++++++ perl/t/data/keytab.conf | 10 ++++++++++ 2 files changed, 39 insertions(+) create mode 100755 perl/t/data/keytab-fake create mode 100644 perl/t/data/keytab.conf (limited to 'perl/t/data') diff --git a/perl/t/data/keytab-fake b/perl/t/data/keytab-fake new file mode 100755 index 0000000..df21294 --- /dev/null +++ b/perl/t/data/keytab-fake @@ -0,0 +1,29 @@ +#!/bin/sh +# $Id$ +# +# keytab-fake -- Fake keytab-backend implementation. +# +# This keytab-fake script is meant to be run by remctld during testing of +# the keytab object implementation. It returns a fixed string for +# wallet/one and returns an error for wallet/two. + +set -e + +if [ "$1" != "retrieve" ] ; then + echo "Invalid command $1" >&2 + exit 1 +fi + +case "$2" in +wallet/one@*) + printf 'Keytab for wallet/one' + ;; +wallet/two@*) + echo 'bite me' >&2 + exit 1 + ;; +*) + echo "Unknown principal $2" >&2 + exit 1 + ;; +esac diff --git a/perl/t/data/keytab.conf b/perl/t/data/keytab.conf new file mode 100644 index 0000000..eb105e2 --- /dev/null +++ b/perl/t/data/keytab.conf @@ -0,0 +1,10 @@ +# $Id$ +# +# This is the remctl configuration used for testing the keytab backend's +# ability to retrieve existing keytabs through remctl. Currently the only +# supported and used command is keytab retrieve. The ACL is written on +# the fly by the test program. +# +# Compare to config/keytab. + +keytab retrieve t/data/keytab-fake test-acl -- cgit v1.2.3