From c84ff21d21631858034778b099cf76d22e87b75b Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Fri, 8 Jun 2001 17:19:02 +0000 Subject: [PATCH] * v4gssftp.exp: During test, set KRB5CCNAME to a non-existant cache. Restore at end to previous setting. This prevents failures caused when the krb5 cache contains valid information - as in the case of this test being run immediately after the gssftp.exp test. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13313 dc483132-0cff-0310-8789-dd5450dbe970 --- src/tests/dejagnu/krb-standalone/ChangeLog | 7 ++++++ src/tests/dejagnu/krb-standalone/v4gssftp.exp | 24 +++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/tests/dejagnu/krb-standalone/ChangeLog b/src/tests/dejagnu/krb-standalone/ChangeLog index f8ea5751d..e75e4fc65 100644 --- a/src/tests/dejagnu/krb-standalone/ChangeLog +++ b/src/tests/dejagnu/krb-standalone/ChangeLog @@ -1,3 +1,10 @@ +2001-06-08 Ezra Peisach + + * v4gssftp.exp: During test, set KRB5CCNAME to a non-existant + cache. Restore at end to previous setting. This prevents failures + caused when the krb5 cache contains valid information - as in the + case of this test being run immediately after the gssftp.exp test. + 2001-06-08 Mitchell Berger * gssftp.exp: Invocation of ftpd changed to use -U /dev/null and diff --git a/src/tests/dejagnu/krb-standalone/v4gssftp.exp b/src/tests/dejagnu/krb-standalone/v4gssftp.exp index 8d60f3a42..651dbacd3 100644 --- a/src/tests/dejagnu/krb-standalone/v4gssftp.exp +++ b/src/tests/dejagnu/krb-standalone/v4gssftp.exp @@ -118,12 +118,19 @@ proc check_file { filename } { proc ftp_restore_env { } { global env global ftp_save_ktname + global ftp_save_ccname catch "unset env(KRB5_KTNAME)" if [info exists ftp_save_ktname] { set env(KRB5_KTNAME) $ftp_save_ktname unset ftp_save_ktname } + + catch "unset env(KRB5CCNAME)" + if [info exists ftp_save_ccname] { + set env(KRB5CCNAME) $ftp_save_ccname + unset ftp_save_ccname + } } # Wrap the tests in a procedure, so that we can kill the daemons if @@ -141,6 +148,7 @@ proc v4ftp_test { } { global spawn_id global tmppwd global ftp_save_ktname + global ftp_save_ccname # Start up the kerberos and kadmind daemons and get a srvtab and a # ticket file. @@ -165,6 +173,22 @@ proc v4ftp_test { } { set env(KRB5_KTNAME) FILE:$tmppwd/srvtab verbose "KRB5_KTNAME=$env(KRB5_KTNAME)" + # + # Save settings of KRB5CCNAME + # These tests fail if the krb5 cache happens to have a valid credential + # which can result from running the gssftp.exp test immediately + # preceeding these tests. + # + if [info exists env(KRB5CCNAME)] { + set ftp_save_ccname $env(KRB5CCNAME) + } + + # + # set KRB5_KTNAME + # + set env(KRB5CCNAME) FILE:$tmppwd/non-existant-cache + verbose "KRB5CCNAME=$env(KRB5CCNAME)" + # Start the ftp daemon. start_ftp_daemon -- 2.26.2