summaryrefslogtreecommitdiffstats
path: root/src/tests/dejagnu
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2011-09-01 22:02:32 +0000
committerGreg Hudson <ghudson@mit.edu>2011-09-01 22:02:32 +0000
commitff00b9eceef3c389aebb954142ff01e03e1fd941 (patch)
tree5e748d007fa2b29e18413c292ffd56f43c401688 /src/tests/dejagnu
parente8972c5914e58520b2f0a873e1a63e370866b7a6 (diff)
downloadkrb5-ff00b9eceef3c389aebb954142ff01e03e1fd941.tar.gz
krb5-ff00b9eceef3c389aebb954142ff01e03e1fd941.tar.xz
krb5-ff00b9eceef3c389aebb954142ff01e03e1fd941.zip
Make dejagnu tests work with non-FQDN hostname
By making an entry for $hostname in [domain_realm], we can relax the requirement that the canonicalized local hostname must have a parent domain. This makes the test suite work more easily on Fedora. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25124 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/tests/dejagnu')
-rw-r--r--src/tests/dejagnu/config/default.exp15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/tests/dejagnu/config/default.exp b/src/tests/dejagnu/config/default.exp
index 3a997e58d3..796ea3716f 100644
--- a/src/tests/dejagnu/config/default.exp
+++ b/src/tests/dejagnu/config/default.exp
@@ -668,14 +668,13 @@ proc setup_runtime_env { } {
}
# get_hostname
-# This procedure will get the local hostname. It sets the global
-# variables hostname (the full name) and domain (all but the first
-# part of the name). Returns 1 on success, 0 on failure.
+# This procedure sets the global variale hostname to the local
+# hostname as seen by krb5_sname_to_principal. Returns 1 on success,
+# 0 on failure.
proc get_hostname { } {
global RESOLVE
global hostname
- global domain
global tmppwd
if {[info exists hostname]} {
@@ -698,11 +697,8 @@ proc get_hostname { } {
}
close $file
file delete $tmppwd/hostname
- regexp "^\[^.\]*\\.(.*)$" $hostname foo domain
set hostname [string tolower $hostname]
- set domain [string tolower $domain]
- verbose "hostname: $hostname; domain: $domain"
return 1
}
@@ -764,7 +760,6 @@ set ulog 0
proc setup_kerberos_files { } {
global REALMNAME
global hostname
- global domain
global tmppwd
global supported_enctypes
global last_passname_conf
@@ -907,7 +902,6 @@ proc reset_kerberos_files { } {
proc setup_krb5_conf { {type client} } {
global tmppwd
global hostname
- global domain
global REALMNAME
global last_passname_conf
global multipass_name
@@ -971,8 +965,7 @@ proc setup_krb5_conf { {type client} } {
puts $conffile " \}"
puts $conffile ""
puts $conffile "\[domain_realm\]"
- puts $conffile " .$domain = $REALMNAME"
- puts $conffile " $domain = $REALMNAME"
+ puts $conffile " $hostname = $REALMNAME"
puts $conffile ""
puts $conffile "\[logging\]"
puts $conffile " admin_server = FILE:$tmppwd/kadmind5.log"