"Principal or policy already exists while creating*" { }
}
expect "kadmin.local: "
+ send "ank +requires_preauth krbtest/fast@$REALMNAME\r"
+ expect "Enter password for principal \"krbtest/fast@$REALMNAME\":"
+ send "adminpass$KEY\r"
+ expect "Re-enter password for principal \"krbtest/fast@$REALMNAME\":"
+ send "adminpass$KEY\r"
+ expect {
+ "Principal \"krbtest/fast@$REALMNAME\" created" { }
+ "Principal or policy already exists while creating*" { }
+ }
+ expect "kadmin.local: "
send "quit\r"
expect eof
catch expect_after
return 1
}
+# Retrieve a ticket using FAST armor
+proc kinit_fast { name pass standalone } {
+ global REALMNAME
+ global KINIT
+ global spawn_id
+ global env
+
+ # Use kinit to get a ticket.
+ #
+ spawn $KINIT -5 -f -T $env(KRB5CCNAME) $name@$REALMNAME
+ expect {
+ "Password for $name@$REALMNAME:" {
+ verbose "kinit started"
+ }
+ timeout {
+ fail "kinit"
+ return 0
+ }
+ eof {
+ fail "kinit"
+ return 0
+ }
+ }
+ send "$pass\r"
+ expect eof
+ if ![check_exit_status kinit] {
+ return 0
+ }
+
+ if {$standalone} {
+ pass "kinit"
+ }
+
+ return 1
+}
proc kinit_kt { name keytab standalone testname } {
global REALMNAME
expect -re "Update log dump"
expect -re "First serial \# : 1"
if $des3_krbtgt {
- expect -re "Last serial \# : 8"
+ expect -re "Last serial \# : 9"
expect -re "Update Entry"
expect -re "Update serial \# : 1"
expect -re "Attributes changed : 12"
expect -re "Update Entry"
- expect -re "Update serial \# : 2"
+ expect -re "Update serial \# : 3"
expect -re "Attributes changed : 6"
expect -re "Update Entry"
- expect -re "Update serial \# : 3"
+ expect -re "Update serial \# : 5"
expect -re "Attributes changed : 12"
expect -re "Update Entry"
- expect -re "Update serial \# : 4"
+ expect -re "Update serial \# : 5"
} else {
- expect -re "Last serial \# : 7"
+ expect -re "Last serial \# : 8"
expect -re "Update Entry"
expect -re "Update serial \# : 1"
expect -re "Attributes changed : 12"
expect -re "Update Entry"
- expect -re "Update serial \# : 2"
+ expect -re "Update serial \# : 3"
expect -re "Attributes changed : 12"
expect -re "Update Entry"
- expect -re "Update serial \# : 3"
+ expect -re "Update serial \# : 4"
}
expect -re "Update operation : Add"
expect -re "Update principal : wakawaka@KRBTEST.COM"