summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2003-01-20 19:51:36 +0000
committerderaadt <deraadt@openbsd.org>2003-01-20 19:51:36 +0000
commitb1afbf540c9128bc67245869d329eddc321df9ef (patch)
tree50630981e30258ea30f0862c4e7528d498a707f3
parentremove libc_r mention in comment (diff)
downloadwireguard-openbsd-b1afbf540c9128bc67245869d329eddc321df9ef.tar.xz
wireguard-openbsd-b1afbf540c9128bc67245869d329eddc321df9ef.zip
use LOG_NDELAY in chroot() using daemons
-rw-r--r--libexec/rpc.rstatd/rstatd.c8
-rw-r--r--libexec/rpc.rusersd/rusersd.c8
-rw-r--r--usr.sbin/portmap/portmap.c6
3 files changed, 11 insertions, 11 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.");
diff --git a/libexec/rpc.rusersd/rusersd.c b/libexec/rpc.rusersd/rusersd.c
index 299aa40e182..2151ab5b142 100644
--- a/libexec/rpc.rusersd/rusersd.c
+++ b/libexec/rpc.rusersd/rusersd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rusersd.c,v 1.11 2002/09/06 19:43:54 deraadt Exp $ */
+/* $OpenBSD: rusersd.c,v 1.12 2003/01/20 19:51:36 deraadt Exp $ */
/*-
* Copyright (c) 1993 John Brezak
@@ -29,7 +29,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: rusersd.c,v 1.11 2002/09/06 19:43:54 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: rusersd.c,v 1.12 2003/01/20 19:51:36 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -75,6 +75,8 @@ main(int argc, char *argv[])
exit(1);
}
+ openlog("rpc.rusersd", LOG_NDELAY|LOG_CONS|LOG_PID, LOG_DAEMON);
+
pw = getpwnam("_rusersd");
if (!pw)
pw = getpwnam("nobody");
@@ -114,8 +116,6 @@ main(int argc, char *argv[])
(void) signal(SIGHUP, cleanup);
}
- openlog("rpc.rusersd", LOG_CONS|LOG_PID, LOG_DAEMON);
-
transp = svcudp_create(sock);
if (transp == NULL) {
syslog(LOG_ERR, "cannot create udp service.");
diff --git a/usr.sbin/portmap/portmap.c b/usr.sbin/portmap/portmap.c
index afd0892bd98..38c12819a8e 100644
--- a/usr.sbin/portmap/portmap.c
+++ b/usr.sbin/portmap/portmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: portmap.c,v 1.26 2002/08/26 03:03:27 pvalchev Exp $ */
+/* $OpenBSD: portmap.c,v 1.27 2003/01/20 19:51:36 deraadt Exp $ */
/*-
* Copyright (c) 1996, 1997 Theo de Raadt (OpenBSD). All rights reserved.
@@ -44,7 +44,7 @@ char copyright[] =
#if 0
static char sccsid[] = "from: @(#)portmap.c 5.4 (Berkeley) 4/19/91";
#else
-static char rcsid[] = "$OpenBSD: portmap.c,v 1.26 2002/08/26 03:03:27 pvalchev Exp $";
+static char rcsid[] = "$OpenBSD: portmap.c,v 1.27 2003/01/20 19:51:36 deraadt Exp $";
#endif
#endif /* not lint */
@@ -142,7 +142,7 @@ main(int argc, char *argv[])
exit(1);
}
- openlog("portmap", debugging ? LOG_PID | LOG_PERROR : LOG_PID,
+ openlog("portmap", LOG_NDELAY | (debugging ? LOG_PID | LOG_PERROR : LOG_PID),
LOG_DAEMON);
bzero((char *)&addr, sizeof addr);