From 056f9f43982aa6737c7f644e536a74fb955e1f0c Mon Sep 17 00:00:00 2001 From: Eric Allman Date: Mon, 5 Dec 1994 23:17:28 -0800 Subject: [PATCH] allow the case where a host name isn't know to gethostbyname -- 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 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/usr/src/usr.sbin/sendmail/src/daemon.c b/usr/src/usr.sbin/sendmail/src/daemon.c index 07c96bce7c..2cb68aa691 100644 --- a/usr/src/usr.sbin/sendmail/src/daemon.c +++ b/usr/src/usr.sbin/sendmail/src/daemon.c @@ -12,9 +12,9 @@ #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 -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 */ @@ -508,9 +508,7 @@ myhostname(hostbuf, size) } 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); -- 2.20.1