allow the case where a host name isn't know to gethostbyname --
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Tue, 6 Dec 1994 07:17:28 +0000 (23:17 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Tue, 6 Dec 1994 07:17:28 +0000 (23:17 -0800)
as might happen if you were uucp-only (common for Linux, apparently)

SCCS-vsn: usr.sbin/sendmail/src/daemon.c 8.63

usr/src/usr.sbin/sendmail/src/daemon.c

index 07c96bc..2cb68aa 100644 (file)
@@ -12,9 +12,9 @@
 
 #ifndef lint
 #ifdef DAEMON
 
 #ifndef lint
 #ifdef DAEMON
-static char sccsid[] = "@(#)daemon.c   8.62 (Berkeley) %G% (with daemon mode)";
+static char sccsid[] = "@(#)daemon.c   8.63 (Berkeley) %G% (with daemon mode)";
 #else
 #else
-static char sccsid[] = "@(#)daemon.c   8.62 (Berkeley) %G% (without daemon mode)";
+static char sccsid[] = "@(#)daemon.c   8.63 (Berkeley) %G% (without daemon mode)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -508,9 +508,7 @@ myhostname(hostbuf, size)
        }
        hp = gethostbyname(hostbuf);
        if (hp == NULL)
        }
        hp = gethostbyname(hostbuf);
        if (hp == NULL)
-       {
-               syserr("!My host name (%s) does not seem to exist!", hostbuf);
-       }
+               return NULL;
        if (strchr(hp->h_name, '.') != NULL || strchr(hostbuf, '.') == NULL)
        {
                (void) strncpy(hostbuf, hp->h_name, size - 1);
        if (strchr(hp->h_name, '.') != NULL || strchr(hostbuf, '.') == NULL)
        {
                (void) strncpy(hostbuf, hp->h_name, size - 1);