svn rev #23580: trunk/src/tests/dejagnu/ config/ krb-standalone/

hartmans@MIT.EDU hartmans at MIT.EDU
Mon Jan 4 14:59:13 EST 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=23580
Commit By: hartmans
Log Message:
Test FAST authentication during each pass

Because a new principal is added to the database, the iprop test
expected output is updated.


Changed Files:
U   trunk/src/tests/dejagnu/config/default.exp
U   trunk/src/tests/dejagnu/krb-standalone/iprop.exp
U   trunk/src/tests/dejagnu/krb-standalone/standalone.exp
Modified: trunk/src/tests/dejagnu/config/default.exp
===================================================================
--- trunk/src/tests/dejagnu/config/default.exp	2010-01-04 19:59:03 UTC (rev 23579)
+++ trunk/src/tests/dejagnu/config/default.exp	2010-01-04 19:59:12 UTC (rev 23580)
@@ -1339,6 +1339,16 @@
 	    "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
@@ -2189,7 +2199,42 @@
 
     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
     global KINIT

Modified: trunk/src/tests/dejagnu/krb-standalone/iprop.exp
===================================================================
--- trunk/src/tests/dejagnu/krb-standalone/iprop.exp	2010-01-04 19:59:03 UTC (rev 23579)
+++ trunk/src/tests/dejagnu/krb-standalone/iprop.exp	2010-01-04 19:59:12 UTC (rev 23580)
@@ -106,28 +106,28 @@
 	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 at KRBTEST.COM"

Modified: trunk/src/tests/dejagnu/krb-standalone/standalone.exp
===================================================================
--- trunk/src/tests/dejagnu/krb-standalone/standalone.exp	2010-01-04 19:59:03 UTC (rev 23579)
+++ trunk/src/tests/dejagnu/krb-standalone/standalone.exp	2010-01-04 19:59:12 UTC (rev 23580)
@@ -204,6 +204,16 @@
 	return
     }
 
+# Get a ticket to later use with FAST
+    if ![kinit krbtest/fast adminpass$KEY 1] {
+	return
+    }
+
+    # Use fast to get a ticket
+    if ![kinit_fast krbtest/fast adminpass$KEY 1] {
+	return
+    }
+
     # Destroy the ticket.
     spawn $KDESTROY -5
     if ![check_exit_status "kdestroy"] {




More information about the cvs-krb5 mailing list