[25634] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

svn rev #25124: trunk/src/tests/ dejagnu/config/ resolve/

daemon@ATHENA.MIT.EDU (ghudson@mit.edu)
Thu Sep 1 18:02:39 2011

Date: Thu, 1 Sep 2011 18:02:32 -0400
From: ghudson@mit.edu
Message-Id: <201109012202.p81M2W1l010610@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

http://src.mit.edu/fisheye/changelog/krb5/?cs=25124
Commit By: ghudson
Log Message:
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.


Changed Files:
U   trunk/src/tests/dejagnu/config/default.exp
U   trunk/src/tests/resolve/resolve.c
Modified: trunk/src/tests/dejagnu/config/default.exp
===================================================================
--- trunk/src/tests/dejagnu/config/default.exp	2011-09-01 19:18:59 UTC (rev 25123)
+++ trunk/src/tests/dejagnu/config/default.exp	2011-09-01 22:02:32 UTC (rev 25124)
@@ -668,14 +668,13 @@
 }
 
 # 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 @@
     }
     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 @@
 proc setup_kerberos_files { } {
     global REALMNAME
     global hostname
-    global domain
     global tmppwd
     global supported_enctypes
     global last_passname_conf
@@ -907,7 +902,6 @@
 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 @@
 	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"

Modified: trunk/src/tests/resolve/resolve.c
===================================================================
--- trunk/src/tests/resolve/resolve.c	2011-09-01 19:18:59 UTC (rev 25123)
+++ trunk/src/tests/resolve/resolve.c	2011-09-01 22:02:32 UTC (rev 25124)
@@ -152,29 +152,6 @@
     else
         printf("FQDN: %s\n", fqdn);
 
-    /*
-     * The host name must have at least one '.' in the name, and
-     * if there is only one '.', it must not be at the end of the
-     * string.  (i.e., "foo." is not a FQDN)
-     */
-    ptr = strchr(fqdn, '.');
-    if (ptr == NULL || ptr[1] == '\0') {
-        fprintf(stderr,
-                "\nResolve library did not return a "
-                "fully qualified domain name.\n\n"
-                "If you are using /etc/hosts before DNS, "
-                "e.g. \"files\" is listed first\n"
-                "for \"hosts:\" in nsswitch.conf, ensure that "
-                "you have listed the FQDN\n"
-                "as the first name for the local host.\n\n"
-                "If this does not correct the problem, "
-                "you may have to reconfigure the kerberos\n"
-                "distribution to select a "
-                "different set of libraries using \n"
-                "--with-netlib[=libs]\n");
-        exit(3);
-    }
-
     if (!quiet)
         printf("Resolve library appears to have passed the test\n");
 

_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post