fix MX signature to always have trailing dot so compares work right
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 14 Mar 1993 14:53:02 +0000 (06:53 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 14 Mar 1993 14:53:02 +0000 (06:53 -0800)
SCCS-vsn: usr.sbin/sendmail/src/domain.c 6.12

usr/src/usr.sbin/sendmail/src/domain.c

index 234462f..1ecc7c9 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef NAMED_BIND
 
 #ifndef lint
 #ifdef NAMED_BIND
-static char sccsid[] = "@(#)domain.c   6.11 (Berkeley) %G% (with name server)";
+static char sccsid[] = "@(#)domain.c   6.12 (Berkeley) %G% (with name server)";
 #else
 #else
-static char sccsid[] = "@(#)domain.c   6.11 (Berkeley) %G% (without name server)";
+static char sccsid[] = "@(#)domain.c   6.12 (Berkeley) %G% (without name server)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -162,7 +162,14 @@ getmxrr(host, mxhosts, localhost, rcode)
        }
        if (nmx == 0)
        {
        }
        if (nmx == 0)
        {
-punt:          mxhosts[0] = strcpy(hostbuf, host);
+punt:
+               mxhosts[0] = strcpy(hostbuf, host);
+               bp = &hostbuf[strlen(hostbuf)];
+               if (bp[-1] != '.')
+               {
+                       *bp++ = '.';
+                       *bp = '\0';
+               }
                return (1);
        }
 
                return (1);
        }