diff options
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; |