SCCS-vsn: usr.sbin/sendmail/src/daemon.c 8.18
#ifndef lint
#ifdef DAEMON
#ifndef lint
#ifdef DAEMON
-static char sccsid[] = "@(#)daemon.c 8.17 (Berkeley) %G% (with daemon mode)";
+static char sccsid[] = "@(#)daemon.c 8.18 (Berkeley) %G% (with daemon mode)";
-static char sccsid[] = "@(#)daemon.c 8.17 (Berkeley) %G% (without daemon mode)";
+static char sccsid[] = "@(#)daemon.c 8.18 (Berkeley) %G% (without daemon mode)";
#endif
#endif /* not lint */
#endif
#endif /* not lint */
register char *bp;
register char *ap;
int l;
register char *bp;
register char *ap;
int l;
/* check for null/zero family */
if (sap == NULL)
/* check for null/zero family */
if (sap == NULL)
if (sap->sa.sa_family == 0)
return "0";
if (sap->sa.sa_family == 0)
return "0";
+ switch (sap->sa.sa_family)
+ {
+#ifdef MAYBENEXTRELEASE /*** UNTESTED *** UNTESTED *** UNTESTED ***/
+ case AF_UNIX:
+ if (sap->sun.sun_path[0] != '\0')
+ sprintf(buf, "[UNIX: %.64s]", sap->sun.sun_path);
+ else
+ sprintf(buf, "[UNIX: localhost]");
+ return buf;
+#endif
+
- if (sap->sa.sa_family == AF_INET)
return inet_ntoa(((struct sockaddr_in *) sap)->sin_addr);
#endif
return inet_ntoa(((struct sockaddr_in *) sap)->sin_addr);
#endif
+ default:
+ /* this case is only to ensure syntactic correctness */
+ break;
+ }
+
/* unknown family -- just dump bytes */
(void) sprintf(buf, "Family %d: ", sap->sa.sa_family);
bp = &buf[strlen(buf)];
/* unknown family -- just dump bytes */
(void) sprintf(buf, "Family %d: ", sap->sa.sa_family);
bp = &buf[strlen(buf)];
register SOCKADDR *sap;
{
register struct hostent *hp;
register SOCKADDR *sap;
{
register struct hostent *hp;
/* shorten name server timeout to avoid higher level timeouts */
saveretry = _res.retry;
_res.retry = 3;
/* shorten name server timeout to avoid higher level timeouts */
saveretry = _res.retry;
_res.retry = 3;
+#ifdef MAYBENEXTRELEASE /*** UNTESTED *** UNTESTED *** UNTESTED ***/
+ case AF_UNIX:
+ hp = NULL;
+ break;
+#endif
+
default:
hp = gethostbyaddr(sap->sa.sa_data,
sizeof sap->sa.sa_data,
default:
hp = gethostbyaddr(sap->sa.sa_data,
sizeof sap->sa.sa_data,