# Clear away any files left over from a previous run.
# We can't use them now because we don't know the right KEY.
# krb5.conf might change if running tests on another host
-catch "exec rm -f $tmppwd/db.ok $tmppwd/srvtab $tmppwd/krb5.conf $tmppwd/kdc.conf $tmppwd/cpw_srvtab $tmppwd/krb.realms $tmppwd/krb.conf"
+file delete $tmppwd/db.ok $tmppwd/srvtab $tmppwd/krb5.conf $tmppwd/kdc.conf $tmppwd/cpw_srvtab $tmppwd/krb.realms $tmppwd/krb.conf
# Put the installed kerberos directories on PATH.
# This needs to be fixed for V5.
return 0
}
close $file
- catch "exec rm -f $tmppwd/hostname" exec_output
+ file delete $tmppwd/hostname
regexp "^(\[^.\]*)\\.(.*)$" $hostname foo localhostname domain
set hostname [string tolower $hostname]
return 1
}
- catch "exec rm -f [glob -nocomplain $tmppwd/db* $tmppwd/adb*]"
+ catch "file delete [glob -nocomplain $tmppwd/db* $tmppwd/adb*]"
# Creating a new database means we need a new srvtab.
- catch "exec rm -f $tmppwd/srvtab"
+ file delete $tmppwd/srvtab
envstack_push
if { ![setup_kerberos_files] || ![setup_kerberos_env kdc] } {
if $standalone {
fail $test
} else {
- catch "exec rm -f $tmppwd/db.ok $tmppwd/adb.db"
+ file delete $tmppwd/db.ok $tmppwd/adb.db
}
} else {
if $standalone {
if $standalone {
fail $test
} else {
- catch "exec rm -f $tmppwd/db.ok $tmppwd/adb.db"
+ file delete $tmppwd/db.ok $tmppwd/adb.db
}
} else {
if $standalone {
if $standalone {
fail $test
} else {
- catch "exec rm -f $tmppwd/db.ok $tmppwd/adb.db"
+ file delete $tmppwd/db.ok $tmppwd/adb.db
}
} else {
if $standalone {
if $standalone {
fail $test
} else {
- catch "exec rm -f $tmppwd/db.ok $tmppwd/adb.db"
+ file delete $tmppwd/db.ok $tmppwd/adb.db
}
} else {
if $standalone {
}
if {$standalone} {
- catch "exec rm -f $tmppwd/krb.log"
- catch "exec rm -f $tmppwd/kadmind.log"
- catch "exec rm -f $tmppwd/krb5kdc_rcache"
+ file delete $tmppwd/krb.log $tmppwd/kadmind.log $tmppwd/krb5kdc_rcache
}
# Start up the kerberos daemon
return 1
}
- catch "exec rm -f $tmppwd/srvtab $tmppwd/srvtab.old"
+ file delete $tmppwd/srvtab $tmppwd/srvtab.old
if ![get_hostname] {
return 0
}
- catch "exec rm -f $hostname-new-srvtab"
+ file delete $hostname-new-srvtab
envstack_push
setup_kerberos_env kdc
-re "(.*)\r\nkadmin.local: " {
fail "kadmin.local srvtab (unmatched output: $expect_out(1,string))"
if {!$standalone} {
- catch "exec rm -f $tmppwd/srvtab"
+ file delete $tmppwd/srvtab
}
catch "expect_after"
return 0
timeout {
fail "kadmin.local srvtab"
if {!$standalone} {
- catch "exec rm -f $tmppwd/srvtab"
+ file delete $tmppwd/srvtab
}
catch "expect_after"
return 0
eof {
fail "kadmin.local srvtab"
if {!$standalone} {
- catch "exec rm -f $tmppwd/srvtab"
+ file delete $tmppwd/srvtab
}
catch "expect_after"
return 0
if {$standalone} {
fail "kadmin.local srvtab"
} else {
- catch "exec rm -f $tmppwd/srvtab"
+ file delete $tmppwd/srvtab
}
catch expect_after
return 0
catch expect_after
if ![check_exit_status "kadmin.local srvtab"] {
if {!$standalone} {
- catch "exec rm -f $tmppwd/srvtab"
+ file delete $tmppwd/srvtab"
}
return 0
}
global krb5_init_vars
# We will start with a BINSH script
- catch "exec rm -f $file"
+ file delete $file
set f [open $file "w" 0777]
puts $f "#!$BINSH"