In kinit_anonymous, fail out if we receive a password request from
authorGreg Hudson <ghudson@mit.edu>
Tue, 19 Jan 2010 17:20:45 +0000 (17:20 +0000)
committerGreg Hudson <ghudson@mit.edu>
Tue, 19 Jan 2010 17:20:45 +0000 (17:20 +0000)
kinit, instead of hanging.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23661 dc483132-0cff-0310-8789-dd5450dbe970

src/tests/dejagnu/config/default.exp

index 7e18f7a723591f5ba5d8001cb583149562ebdfe2..487a9b4ab33cb1f1c32bc72aeb8370511b486826 100644 (file)
@@ -2270,7 +2270,17 @@ proc kinit_anonymous { name  } {
     # Use kinit to get a ticket.
     #
     spawn $KINIT -5 -f -n $name@$REALMNAME
-    expect eof
+    expect {
+       "Password for $name@$REALMNAME:" {
+           fail "kinit_anonymous (password requested)"
+           return 0
+       }
+       timeout {
+           fail "kinit_anonymous (timeout)"
+           return 0
+       }
+       eof { }
+    }
     if ![check_exit_status kinit] {
        fail "kinit anonymous"
     }