summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/krb/walktree-tests
blob: 17f6eae115c37ec6dfac3da31fccbc6fdd3bf664 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/sh

# Test the walk_rtree.c code.
#

#error: wanted
#got tgt list:
check='echo Running walk_rtree test $1 $2 ... ; ans=`./t_walk_rtree $1 $2 | sed -e s,krbtgt/,,g`; ans=`echo $ans`; echo Got TGT list: "$ans" ; if test "$3" != "$ans" ; then err=1; echo ERROR: wanted "$3"; fi; echo ""'

err=0

set ATHENA.MIT.EDU HACK.EXAMPLE.COM "ATHENA.MIT.EDU@ATHENA.MIT.EDU MIT.EDU@ATHENA.MIT.EDU EDU@MIT.EDU COM@EDU EXAMPLE.COM@COM HACK.EXAMPLE.COM@EXAMPLE.COM"
eval $check

set ATHENA.MIT.EDU CSAIL.MIT.EDU "ATHENA.MIT.EDU@ATHENA.MIT.EDU MIT.EDU@ATHENA.MIT.EDU CSAIL.MIT.EDU@MIT.EDU"
eval $check

set FOO.EXAMPLE.COM BAR.EXAMPLE.COM "FOO.EXAMPLE.COM@FOO.EXAMPLE.COM EXAMPLE.COM@FOO.EXAMPLE.COM BAR.EXAMPLE.COM@EXAMPLE.COM"
eval $check

set FOZ.EXAMPLE.COM BAZ.EXAMPLE.COM "FOZ.EXAMPLE.COM@FOZ.EXAMPLE.COM EXAMPLE.COM@FOZ.EXAMPLE.COM BAZ.EXAMPLE.COM@EXAMPLE.COM"
eval $check

set FOZ.EXAMPLE.COM BOZ.EXAMPLE.COM "FOZ.EXAMPLE.COM@FOZ.EXAMPLE.COM EXAMPLE.COM@FOZ.EXAMPLE.COM BOZ.EXAMPLE.COM@EXAMPLE.COM"
eval $check

set FOZ.EXAMPLE.COM OZ.EXAMPLE.COM "FOZ.EXAMPLE.COM@FOZ.EXAMPLE.COM EXAMPLE.COM@FOZ.EXAMPLE.COM OZ.EXAMPLE.COM@EXAMPLE.COM"
eval $check

set OZ.EXAMPLE.COM FOZ.EXAMPLE.COM "OZ.EXAMPLE.COM@OZ.EXAMPLE.COM EXAMPLE.COM@OZ.EXAMPLE.COM FOZ.EXAMPLE.COM@EXAMPLE.COM"
eval $check

set A.FOZ.EXAMPLE.COM A.OZ.EXAMPLE.COM "A.FOZ.EXAMPLE.COM@A.FOZ.EXAMPLE.COM FOZ.EXAMPLE.COM@A.FOZ.EXAMPLE.COM EXAMPLE.COM@FOZ.EXAMPLE.COM OZ.EXAMPLE.COM@EXAMPLE.COM A.OZ.EXAMPLE.COM@OZ.EXAMPLE.COM"
eval $check

set A.OZ.EXAMPLE.COM A.FOZ.EXAMPLE.COM "A.OZ.EXAMPLE.COM@A.OZ.EXAMPLE.COM OZ.EXAMPLE.COM@A.OZ.EXAMPLE.COM EXAMPLE.COM@OZ.EXAMPLE.COM FOZ.EXAMPLE.COM@EXAMPLE.COM A.FOZ.EXAMPLE.COM@FOZ.EXAMPLE.COM"
eval $check

set A.FOZ.EXAMPLE.COM A.BOZ.EXAMPLE.COM "A.FOZ.EXAMPLE.COM@A.FOZ.EXAMPLE.COM FOZ.EXAMPLE.COM@A.FOZ.EXAMPLE.COM EXAMPLE.COM@FOZ.EXAMPLE.COM BOZ.EXAMPLE.COM@EXAMPLE.COM A.BOZ.EXAMPLE.COM@BOZ.EXAMPLE.COM"
eval $check

set A.BOZ.EXAMPLE.COM A.FOZ.EXAMPLE.COM "A.BOZ.EXAMPLE.COM@A.BOZ.EXAMPLE.COM BOZ.EXAMPLE.COM@A.BOZ.EXAMPLE.COM EXAMPLE.COM@BOZ.EXAMPLE.COM FOZ.EXAMPLE.COM@EXAMPLE.COM A.FOZ.EXAMPLE.COM@FOZ.EXAMPLE.COM"
eval $check

set A.FOZ.EXAMPLE.COM OZ.EXAMPLE.COM "A.FOZ.EXAMPLE.COM@A.FOZ.EXAMPLE.COM FOZ.EXAMPLE.COM@A.FOZ.EXAMPLE.COM EXAMPLE.COM@FOZ.EXAMPLE.COM OZ.EXAMPLE.COM@EXAMPLE.COM"
eval $check

set OZ.EXAMPLE.COM A.FOZ.EXAMPLE.COM "OZ.EXAMPLE.COM@OZ.EXAMPLE.COM EXAMPLE.COM@OZ.EXAMPLE.COM FOZ.EXAMPLE.COM@EXAMPLE.COM A.FOZ.EXAMPLE.COM@FOZ.EXAMPLE.COM"
eval $check

#set EXAMPLE.COM EXAMPLE.COM "EXAMPLE.COM@EXAMPLE.COM"
set EXAMPLE.COM EXAMPLE.COM ""
echo Next test should return a cannot-find-ticket error...
eval $check

set A.B B.B "A.B@A.B B@A.B B.B@B"
eval $check

set AB.B B.B "AB.B@AB.B B@AB.B B.B@B"
eval $check

set A.B BA.B "A.B@A.B B@A.B BA.B@B"
eval $check

set EXAMPLE.COM A.EXAMPLE.COM "EXAMPLE.COM@EXAMPLE.COM A.EXAMPLE.COM@EXAMPLE.COM"
eval $check

set A.EXAMPLE.COM EXAMPLE.COM "A.EXAMPLE.COM@A.EXAMPLE.COM EXAMPLE.COM@A.EXAMPLE.COM"
eval $check

echo CAPATH test
set ATHENA.MIT.EDU KERBEROS.COM "ATHENA.MIT.EDU@ATHENA.MIT.EDU KERBEROS.COM@ATHENA.MIT.EDU"
eval $check

echo CAPATH test
set LCS.MIT.EDU KABLOOEY.KERBEROS.COM "LCS.MIT.EDU@LCS.MIT.EDU ATHENA.MIT.EDU@LCS.MIT.EDU KERBEROS.COM@ATHENA.MIT.EDU KABLOOEY.KERBEROS.COM@KERBEROS.COM"
eval $check

exit $err