diff options
author | Russ Allbery <rra@stanford.edu> | 2007-09-15 00:48:20 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2007-09-15 00:48:20 +0000 |
commit | b2285aff21d379b680cabb1259d31e5bf5b57a69 (patch) | |
tree | 9cdfe75dadb3106b69ea3aef246da4135bf8a2e0 /tests/data | |
parent | 4c4cb52999c9f4d7bbd31b958decfbf8a5012cbc (diff) |
Add a test suite for keytab-backend.
Diffstat (limited to 'tests/data')
-rw-r--r-- | tests/data/allow-extract | 8 | ||||
-rwxr-xr-x | tests/data/fake-kadmin | 20 |
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/data/allow-extract b/tests/data/allow-extract new file mode 100644 index 0000000..abfe816 --- /dev/null +++ b/tests/data/allow-extract @@ -0,0 +1,8 @@ +# List of principal regexes that may be extracted. + # this is still a comment + +^service/foo@EXAMPLE\.ORG$ +.*/bar@EXAMPLE.NET$ +^host/example.org@EXAMPLE\.ORG$ +#.* +^error@EXAMPLE.ORG$ diff --git a/tests/data/fake-kadmin b/tests/data/fake-kadmin new file mode 100755 index 0000000..e1e1892 --- /dev/null +++ b/tests/data/fake-kadmin @@ -0,0 +1,20 @@ +#!/usr/bin/perl -w +# $Id$ +# +# fake-kadmin -- Fake kadmin.local used to test the keytab backend. + +unless ($ARGV[0] eq '-q' && @ARGV == 2) { + die "invalid arguments\n"; +} +my @command = split (' ', $ARGV[1]); +unless ("@command[0..3]" eq 'ktadd -q -norandkey -k') { + die "invalid command @command\n"; +} +if ($command[5] eq 'error@EXAMPLE.ORG') { + warn "Some bad stuff\n"; + exit 1; +} +open (OUT, '>', $command[4]) or die "cannot create $command[4]: $!\n"; +print OUT $command[5], "\n"; +close OUT; +exit 0; |