diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-01-20 19:51:37 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-01-20 19:51:37 +0000 |
commit | 5071b316f1866495582b4347a2fa2b465031d71c (patch) | |
tree | ec734a8a39b0cc42bf317a65fd9948b2436d7b33 /libexec | |
parent | 81b6eba3f023b3c347e4bd8d79104abe6c5d9257 (diff) |
use LOG_NDELAY in chroot() using daemons
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/rpc.rstatd/rstatd.c | 8 | ||||
-rw-r--r-- | libexec/rpc.rusersd/rusersd.c | 8 |
2 files changed, 8 insertions, 8 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."); |