summaryrefslogtreecommitdiff
path: root/usr.sbin/rbootd/rbootd.c
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2016-05-29 02:19:03 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2016-05-29 02:19:03 +0000
commit094a195998845eafe6706858aa02b3fb7d0c45e5 (patch)
tree16e7904def58671522dc191d76a062f15147df52 /usr.sbin/rbootd/rbootd.c
parent3d87b184ce5b9a7782f4cb309aed4424030d5206 (diff)
Delete blocking/unblocking of signals, as the handlers now just set flags
that are tested by the main loop. ok jca@ deraadt@
Diffstat (limited to 'usr.sbin/rbootd/rbootd.c')
-rw-r--r--usr.sbin/rbootd/rbootd.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/usr.sbin/rbootd/rbootd.c b/usr.sbin/rbootd/rbootd.c
index 1c7d1d78aa1..5c1dbee3edc 100644
--- a/usr.sbin/rbootd/rbootd.c
+++ b/usr.sbin/rbootd/rbootd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rbootd.c,v 1.30 2016/03/16 15:41:11 krw Exp $ */
+/* $OpenBSD: rbootd.c,v 1.31 2016/05/29 02:19:02 guenther Exp $ */
/* $NetBSD: rbootd.c,v 1.5 1995/10/06 05:12:17 thorpej Exp $ */
/*
@@ -45,10 +45,8 @@
#include <sys/time.h>
-#include <ctype.h>
#include <err.h>
#include <errno.h>
-#include <fcntl.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
@@ -83,7 +81,6 @@ int
main(int argc, char *argv[])
{
int c, fd;
- sigset_t hmask, omask;
struct passwd *pw;
struct pollfd pfd[1];
@@ -170,9 +167,6 @@ main(int argc, char *argv[])
/*
* Initial configuration.
*/
- sigemptyset(&hmask);
- sigaddset(&hmask, SIGHUP);
- sigprocmask(SIG_BLOCK, &hmask, &omask); /* prevent reconfig's */
if (GetBootFiles() == 0) /* get list of boot files */
DoExit();
if (ParseConfig() == 0) /* parse config file */
@@ -194,8 +188,6 @@ main(int argc, char *argv[])
}
endpwent();
- sigprocmask(SIG_SETMASK, &omask, NULL); /* allow reconfig's */
-
/*
* Main loop: receive a packet, determine where it came from,
* and if we service this host, call routine to handle request.
@@ -244,8 +236,6 @@ main(int argc, char *argv[])
if (DbgFp != NULL) /* display packet */
DispPkt(&rconn,DIR_RCVD);
- sigprocmask(SIG_BLOCK, &hmask, &omask);
-
/*
* If we do not restrict service, set the
* client to NULL (ProcessPacket() handles
@@ -259,13 +249,10 @@ main(int argc, char *argv[])
syslog(LOG_INFO,
"%s: boot packet ignored",
EnetStr(&rconn));
- sigprocmask(SIG_SETMASK, &omask, NULL);
continue;
}
ProcessPacket(&rconn,client);
-
- sigprocmask(SIG_SETMASK, &omask, NULL);
}
}
}