summaryrefslogtreecommitdiff
path: root/usr.sbin/syslogd
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/syslogd')
-rw-r--r--usr.sbin/syslogd/syslogd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index 4735b07c0f7..33cc524752e 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -798,6 +798,7 @@ cvthname(f)
struct sockaddr_in *f;
{
struct hostent *hp;
+ sigset_t omask, nmask;
char *p;
dprintf("cvthname(%s)\n", inet_ntoa(f->sin_addr));
@@ -806,8 +807,12 @@ cvthname(f)
dprintf("Malformed from address\n");
return ("???");
}
+ sigemptyset(&nmask);
+ sigaddset(&nmask, SIGHUP);
+ sigprocmask(SIG_BLOCK, &nmask, &omask);
hp = gethostbyaddr((char *)&f->sin_addr,
sizeof(struct in_addr), f->sin_family);
+ sigprocmask(SIG_SETMASK, &omask, NULL);
if (hp == 0) {
dprintf("Host name for your address (%s) unknown\n",
inet_ntoa(f->sin_addr));