+2005-09-07 Ken Raeburn <raeburn@mit.edu>
+
+ * default.exp: Initialize can_get_root to yes.
+ (setup_root_shell): If can_get_root is "no", log a message and
+ return, without making another attempt. On failing attempts, set
+ can_get_root to "no".
+
2005-08-16 Ken Raeburn <raeburn@mit.edu>
* default.exp (setup_kerberos_files): Don't write database_name
# Kerberos must already be installed on this machine. It's a pain,
# but I can't think of a better approach.
+if ![info exists can_get_root] { set can_get_root yes }
+
proc setup_root_shell { testname } {
global BINSH
global ROOT_PROMPT
global tmppwd
global env
global krb5_init_vars
+ global can_get_root
global timeout
+ if [string match $can_get_root no] {
+ note "$testname test requires ability to log in as root"
+ unsupported $testname
+ return 0
+ }
+
# Make sure we are using the original values of the environment
# variables. This means that the caller must call
# setup_kerberos_env after calling this procedure.
}
if ![get_hostname] {
+ set can_get_root no
return 0
}
unsupported "$testname"
set timeout $old_timeout
stop_root_shell
+ set can_get_root no
return 0
}
"Cannot assign requested address" {
unsupported "$testname"
set timeout $old_timeout
stop_root_shell
+ set can_get_root no
return 0
}
-re "usage: rlogin|illegal option -- x|invalid option -- x" {
unsupported "$testname"
set timeout $old_timeout
stop_root_shell
+ set can_get_root no
return 0
}
-re "$ROOT_PROMPT" { }
perror "try running with ROOT_PROMPT=\"regexp\""
set timeout $old_timeout
stop_root_shell
+ set can_get_root no
return 0
}
eof {
stop_root_shell
set timeout $old_timeout
catch "expect_after"
+ set can_get_root no
return 0
}
}
stop_root_shell
set timeout $old_timeout
catch "expect_after"
+ set can_get_root no
return 0
}
eof {
stop_root_shell
set timeout $old_timeout
catch "expect_after"
+ set can_get_root no
return 0
}
}
perror "root shell can not cd to $dir"
set timeout $old_timeout
stop_root_shell
+ set can_get_root no
return 0
}
}