test_win {test1} {D.9: test changed password} test1 newpass test1
mytest "D.22: No policy description was shown" test1 4 {
- -re "Changing password for test1.*\\.$s+Old password:"
+ -re "Changing password for test1.*\\.$s+Old password:\[^\n\]*$"
{ send "test1\n" }
} {
-re "$s+.*$s+.*$s+.*char.*classes.*"
{ myfail "policy description displayed" }
timeout { mypass }
} {
- -re "^$s+New password:"
+ -re "^$s+New password:\[^\n\]*$"
{ send "newpass\n" }
} {
- -re "^$s+New password \\(again\\):"
+ -re "^$s+New password \\(again\\):\[^\n\]*\$"
{ send "ssapwen\n" }
} {
-re "$s+New passwords do not match - password not changed."
4 {New password was used previously. Please choose a different password.}
mytest "D.18: Policy description was shown" pol1 4 {
- -re "Changing password for pol1.*\\.$s+Old password:"
+ -re "Changing password for pol1.*\\.$s+Old password:\[^\n\]*$"
{ send "polAAAAAA\n" }
} {
- -re "$s+.*$s+.*$s+.*8 char.*2 classes.*$s+New password:"
+ -re "$s+.*$s+.*$s+.*8 char.*2 classes.*$s+New password:\[^\n\]*$"
{ send "newpass1234\n" }
} {
- -re "^$s+New password \\(again\\):"
+ -re "^$s+New password \\(again\\):\[^\n\]*$"
{ send "newpass4321\n" }
} {
-re "$s+New passwords do not match - password not changed."
spawn -noecho $KINIT -5 $princ;
expect {
- -re {Password for .*: $}
+ -re "Password for .*:\[^\n\]*$"
{send "$pass\n"}
timeout {puts "Timeout waiting for prompt" ; close }
}
if { $pass2 == "\001\001" } { set pass2 "$pass1" }
mytest "$name" $args 0 {
- -re "Changing password for $princ.*\\.$s+Old password:"
+ -re "Changing password for $princ.*\\.$s+Old password:\[^\n\]*$"
{ send "$pass1\n" }
} {
-re "Old Kerberos password is incorrect. Please try again."
{ close; myfail "Old password incorrect" }
-re "${initerr_regexp}(.+\[^\r\n\t\ \])\r\n"
{ close; myfail "init error: $expect_out(1,string)" }
- -re "^$s+New password:"
+ -re "$s+New password:\[^\n\]*$"
{ send "$pass2\n" }
- -re "^$s+.*$s+.*$s+.*$s+New password:"
+ -re "$s+.*$s+.*$s+.*$s+New password:\[^\n\]*$"
{ send "$pass2\n" }
} {
- -re "^$s+New password \\(again\\):"
+ -re "$s+New password \\(again\\):\[^\n\]*$"
{ send "$pass2\n" }
} {
- -re "^$s+Kerberos password changed."
+ -re "$s+Kerberos password changed."
{ mypass }
- -re "^$s+Password changed."
+ -re "$s+Password changed."
{ close; myfail "Wrong message on success." }
}
}
regsub -all "$s+" $err "$s+" err2
mytest "$name" $args $status {
- -re "Changing password for $princ.*\\.$s+Old password:"
+ -re "Changing password for $princ.*\\.$s+Old password:\[^\n\]*$"
{ send "$pass\n" }
} {
-re "$err2"
regsub -all "$s+" $err "$s+" err2
mytest "$name" $args $status {
- -re "Changing password for $princ.*\\.$s+Old password:"
+ -re "Changing password for $princ.*\\.$s+Old password:\[^\n\]*$"
{ send "$pass1\n" }
} {
-re "Old Kerberos password is incorrect. Please try again."
{ close; myfail "Old password incorrect" }
-re "${initerr_regexp}(.+)\r\n"
{ close; myfail "init error: $expect_out(1,string)" }
- -re "^$s+New password:"
+ -re "$s+New password:\[^\n\]*$"
{ send "$pass2\n" }
- -re "^$s+.*$s+.*$s+.*$s+New password:"
+ -re "$s+.*$s+.*$s+.*$s+New password:\[^\n\]*$"
{ send "$pass2\n" }
} {
- -re "^$s+New password \\(again\\):"
+ -re "$s+New password \\(again\\):\[^\n\]*$"
{ send "$pass3\n" }
} {
-re "$s+$err2"