resolve.c (main): Make the test for a FQDN be a bit more stringent
authorTheodore Tso <tytso@mit.edu>
Mon, 24 Feb 1997 23:45:17 +0000 (23:45 +0000)
committerTheodore Tso <tytso@mit.edu>
Mon, 24 Feb 1997 23:45:17 +0000 (23:45 +0000)
Makefile.in (resolve): The resolve program doesn't need to be linked
against the Kerberos library.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9967 dc483132-0cff-0310-8789-dd5450dbe970

src/tests/resolve/ChangeLog
src/tests/resolve/Makefile.in
src/tests/resolve/resolve.c

index b8a9be080fcb25155eca4baf659f45707e81ffec..1a9020c21233808db760d9bbc16c8d1c923f89d5 100644 (file)
@@ -1,3 +1,11 @@
+Sat Feb 22 20:28:32 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * resolve.c (main): Make the test for a FQDN be a bit more
+               stringent.
+
+       * Makefile.in (resolve): The resolve program doesn't need to be
+               linked against the Kerberos library.
+
 Sun Feb  9 01:48:01 1997  Tom Yu  <tlyu@mit.edu>
 
        * Makefile.in:
index 193f128e8fd10fbccbd48080d002f7802706a647..faf59c2dba22bdc98c1f267b9805e2574a4fa0f9 100644 (file)
@@ -8,8 +8,8 @@ SRCS=$(srcdir)/resolve.c
 
 all:: resolve
 
-resolve: $(OBJS) $(KRB5_BASE_DEPLIBS)
-       $(CC_LINK) -o resolve $(OBJS) $(KRB5_BASE_LIBS)
+resolve: $(OBJS)
+       $(CC_LINK) -o resolve $(OBJS) 
 
 check:: resolve
        $(RUN_SETUP) ./resolve
index 90cf1d256b688612e62488a86ae330299a739c7c..dec26ed81ef3742238a2f2806d9808300d7a323d 100644 (file)
@@ -124,7 +124,13 @@ main(argc, argv)
        else
            printf("FQDN: %s\n", host->h_name);
        
-       if(strchr(host->h_name, '.') == NULL) {
+       /*
+        * 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(host->h_name, '.');
+       if (ptr == NULL || ptr[1] == '\0') {
                fprintf(stderr, "\nResolve library did not return a fully qualified domain name\n");
                fprintf(stderr, "You may have to reconfigure the kerberos distribution to select a\ndifferent set of libraries using --with-netlib[=libs]\n");
                exit(3);