From: Rob H. <for...@us...> - 2002-06-24 20:28:37
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv2537/bin Modified Files: sandweb-expect Log Message: added error checking for invalid vcs or system username/password Index: sandweb-expect =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb-expect,v retrieving revision 1.6 retrieving revision 1.7 diff -U2 -r1.6 -r1.7 --- sandweb-expect 5 Jun 2002 06:32:17 -0000 1.6 +++ sandweb-expect 24 Jun 2002 20:28:32 -0000 1.7 @@ -22,11 +22,21 @@ expect { "Password:" { send "$system_password\r" } - eof { send_user "Unexpected EOF\r\n" } + eof { + send_user "Unexpected EOF\r\n" + exit 3 + } } expect { "password:" { send "$vcs_password\r" } + "Sorry." { + send "Invalid system username/password\r" + exit 1 + } "Are you sure" { send "yes\r" } - eof { send_user "Unexpected EOF\r\n" } + eof { + send_user "Unexpected EOF\r\n" + exit 3 + } } @@ -42,5 +52,15 @@ expect { "Password:" { send "$system_password\r" } - eof { send_user "Unexpected EOF\r\n" } + eof { + send_user "Unexpected EOF\r\n" + exit 3 + } + } + + expect { + "Sorry." { + send "Invalid system username/password\r" + exit 1 + } } } @@ -55,5 +75,19 @@ "password:" { send "$vcs_password\r" } "Are you sure" { send "yes\r" } - eof { send_user "Unexpected EOF\r\n" } + eof { + send_user "Unexpected EOF\r\n" + exit 3 + } + } + expect { + "Are you sure" { send "yes\r" } + "Permission denied" { + send "Invalid VCS username/password\r" + exit 2 + } + eof { + send_user "Unexpected EOF\r\n" + exit 3 + } } } |