+2001-06-22 Tom Yu <tlyu@mit.edu>
+
+ * gssftp.exp: Use $tmppwd rather than hardcoding tmpdir.
+
+ * kadmin.exp: Use $tmppwd rather than hardcoding tmpdir.
+
+ * rcp.exp: Use $tmppwd rather than hardcoding tmpdir.
+
+ * rsh.exp: Rearrange ordering of environment setup slightly.
+
+ * standalone.exp: Use $KLIST -5 -e so as to better debug enctype
+ problems.
+
+ * v4gssftp.exp: Do check_klogin as well as check_k5login. Use
+ $tmppwd rather than hardcoding tmpdir.
+
2001-06-17 Ezra Peisach <epeisach@mit.edu>
* v4krb524d.exp: New tests for the krb524d and k524init programs.
}
# Create a file to use for ftp testing.
-set file [open tmpdir/ftp-test w]
+set file [open $tmppwd/ftp-test w]
puts $file "This file is used for ftp testing."
close $file
set testname "get"
- catch "exec rm -f tmpdir/copy"
+ catch "exec rm -f $tmppwd/copy"
send "get $tmppwd/ftp-test $tmppwd/copy\r"
expect "Opening BINARY mode data connection for $tmppwd/ftp-test"
expect "Transfer complete"
expect -re "\[0-9\]+ bytes received in \[0-9.e-\]+ seconds"
expect "ftp> "
- if [check_file tmpdir/copy] {
+ if [check_file $tmppwd/copy] {
pass $testname
} else {
fail $testname
}
set testname "put"
- catch "exec rm -f tmpdir/copy"
+ catch "exec rm -f $tmppwd/copy"
send "put $tmppwd/ftp-test $tmppwd/copy\r"
expect "Opening BINARY mode data connection for $tmppwd/copy"
expect "Transfer complete"
expect -re "\[0-9\]+ bytes sent in \[0-9.e-\]+ seconds"
expect "ftp> "
- if [check_file tmpdir/copy] {
+ if [check_file $tmppwd/copy] {
pass $testname
} else {
fail $testname
}
set testname "lcd"
- send "lcd tmpdir\r"
+ send "lcd $tmppwd\r"
expect "Local directory now $tmppwd"
expect "ftp> " {
pass $testname
}
set testname "local get"
- catch "exec rm -f tmpdir/copy"
+ catch "exec rm -f $tmppwd/copy"
send "get ftp-test copy\r"
expect "Opening BINARY mode data connection for ftp-test"
expect "Transfer complete"
expect -re "\[0-9\]+ bytes received in \[0-9.e-\]+ seconds"
expect "ftp> "
- if [check_file tmpdir/copy] {
+ if [check_file $tmppwd/copy] {
pass $testname
} else {
fail $testname
}
set testname "encrypted get"
- catch "exec rm -f tmpdir/copy"
+ catch "exec rm -f $tmppwd/copy"
send "get ftp-test copy\r"
expect "Opening BINARY mode data connection for ftp-test"
expect "Transfer complete"
expect -re "\[0-9\]+ bytes received in \[0-9.e-\]+ seconds"
expect "ftp> "
- if [check_file tmpdir/copy] {
+ if [check_file $tmppwd/copy] {
pass $testname
} else {
fail $testname
global KADMIN
global KEY
global spawn_id
+ global tmppwd
- catch "exec rm -f tmpdir/keytab"
+ catch "exec rm -f $tmppwd/keytab"
- spawn $KADMIN -p krbtest/admin@$REALMNAME -q "xst -k tmpdir/keytab $name/$instance"
+ spawn $KADMIN -p krbtest/admin@$REALMNAME -q "xst -k $tmppwd/keytab $name/$instance"
expect_after {
"Cannot contact any KDC" {
fail "kadmin xst $instance $name lost KDC"
expect "Enter password:" {
send "adminpass$KEY\r"
}
-# expect -re "kadmin: Entry for principal $name/$instance with kvno [0-9], encryption type .* added to keytab WRFILE:tmpdir/keytab."
+# expect -re "kadmin: Entry for principal $name/$instance with kvno [0-9], encryption type .* added to keytab WRFILE:$tmppwd/keytab."
expect_after
expect eof
set k_stat [wait -i $spawn_id]
}
# Create a file to use for rcp testing.
-set file [open tmpdir/rcp-test w]
+set file [open $tmppwd/rcp-test w]
puts $file "This file is used for rcp testing."
close $file
global RCP
global tmppwd
- send_log "rm -f tmpdir/copy\n"
- verbose "exec rm -f tmpdir/copy"
- catch "exec rm -f tmpdir/copy"
+ send_log "rm -f $tmppwd/copy\n"
+ verbose "exec rm -f $tmppwd/copy"
+ catch "exec rm -f $tmppwd/copy"
set from [format "%s%s" $frompref $tmppwd/rcp-test]
set to [format "%s%s" $topref $tmppwd/copy]
return 0
}
- if ![check_file tmpdir/copy] {
+ if ![check_file $tmppwd/copy] {
fail $testname
return 0
}
# Set up the kerberos database.
if {![get_hostname] \
|| ![setup_kerberos_files] \
- || ![setup_kerberos_env] \
|| ![setup_kerberos_db 0]} {
return
}
|| ![add_kerberos_key host/$hostname 0] \
|| ![setup_srvtab 0] \
|| ![add_kerberos_key $env(USER) 0] \
+ || ![setup_kerberos_env client] \
|| ![kinit $env(USER) $env(USER)$KEY 0]} {
return
}
}
# Make sure that klist can see the ticket.
- spawn $KLIST -5
+ spawn $KLIST -5 -e
expect {
-re "Ticket cache:\[ \]*(.+:)?$tmppwd/tkt.*Default principal:\[ \]*krbtest/admin@$REALMNAME.*krbtgt/$REALMNAME@$REALMNAME\r\n" {
verbose "klist started"
return
}
+if ![check_klogin ftp] {
+ return
+}
+
# Set up the kerberos database.
if {![get_hostname] \
|| ![setup_kerberos_files] \
}
# Create a file to use for ftp testing.
-set file [open tmpdir/ftp-test w]
+set file [open $tmppwd/ftp-test w]
puts $file "This file is used for ftp testing."
close $file
set testname "get(v4)"
- catch "exec rm -f tmpdir/copy"
+ catch "exec rm -f $tmppwd/copy"
send "get $tmppwd/ftp-test $tmppwd/copy\r"
expect "Opening BINARY mode data connection for $tmppwd/ftp-test"
expect "Transfer complete"
expect -re "\[0-9\]+ bytes received in \[0-9.e-\]+ seconds"
expect "ftp> "
- if [check_file tmpdir/copy] {
+ if [check_file $tmppwd/copy] {
pass $testname
} else {
fail $testname
}
set testname "put(v4)"
- catch "exec rm -f tmpdir/copy"
+ catch "exec rm -f $tmppwd/copy"
send "put $tmppwd/ftp-test $tmppwd/copy\r"
expect "Opening BINARY mode data connection for $tmppwd/copy"
expect "Transfer complete"
expect -re "\[0-9\]+ bytes sent in \[0-9.e-\]+ seconds"
expect "ftp> "
- if [check_file tmpdir/copy] {
+ if [check_file $tmppwd/copy] {
pass $testname
} else {
fail $testname
}
set testname "lcd(v4)"
- send "lcd tmpdir\r"
+ send "lcd $tmppwd\r"
expect "Local directory now $tmppwd"
expect "ftp> " {
pass $testname
}
set testname "local get(v4)"
- catch "exec rm -f tmpdir/copy"
+ catch "exec rm -f $tmppwd/copy"
send "get ftp-test copy\r"
expect "Opening BINARY mode data connection for ftp-test"
expect "Transfer complete"
expect -re "\[0-9\]+ bytes received in \[0-9.e-\]+ seconds"
expect "ftp> "
- if [check_file tmpdir/copy] {
+ if [check_file $tmppwd/copy] {
pass $testname
} else {
fail $testname
}
set testname "encrypted get(v4)"
- catch "exec rm -f tmpdir/copy"
+ catch "exec rm -f $tmppwd/copy"
send "get ftp-test copy\r"
expect "Opening BINARY mode data connection for ftp-test"
expect "Transfer complete"
}
}
expect "ftp> "
- if [check_file tmpdir/copy] {
+ if [check_file $tmppwd/copy] {
pass $testname
} else {
fail $testname