summaryrefslogtreecommitdiff
path: root/libexec/rpc.rstatd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-01-20 19:51:37 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-01-20 19:51:37 +0000
commit5071b316f1866495582b4347a2fa2b465031d71c (patch)
treeec734a8a39b0cc42bf317a65fd9948b2436d7b33 /libexec/rpc.rstatd
parent81b6eba3f023b3c347e4bd8d79104abe6c5d9257 (diff)
use LOG_NDELAY in chroot() using daemons
Diffstat (limited to 'libexec/rpc.rstatd')
-rw-r--r--libexec/rpc.rstatd/rstatd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libexec/rpc.rstatd/rstatd.c b/libexec/rpc.rstatd/rstatd.c
index 05efe90a358..9a64083016d 100644
--- a/libexec/rpc.rstatd/rstatd.c
+++ b/libexec/rpc.rstatd/rstatd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rstatd.c,v 1.13 2002/09/06 19:43:54 deraadt Exp $ */
+/* $OpenBSD: rstatd.c,v 1.14 2003/01/20 19:51:36 deraadt Exp $ */
/*-
* Copyright (c) 1993, John Brezak
@@ -34,7 +34,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: rstatd.c,v 1.13 2002/09/06 19:43:54 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: rstatd.c,v 1.14 2003/01/20 19:51:36 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -88,6 +88,8 @@ main(int argc, char *argv[])
struct sockaddr_in from;
SVCXPRT *transp;
+ openlog("rpc.rstatd", LOG_NDELAY|LOG_CONS|LOG_PID, LOG_DAEMON);
+
pw = getpwnam("_rstatd");
if (!pw)
pw = getpwnam("nobody");
@@ -132,8 +134,6 @@ main(int argc, char *argv[])
(void) signal(SIGHUP, getsig);
}
- openlog("rpc.rstatd", LOG_CONS|LOG_PID, LOG_DAEMON);
-
transp = svcudp_create(sock);
if (transp == NULL) {
syslog(LOG_ERR, "cannot create udp service.");