summaryrefslogtreecommitdiff
path: root/libexec/rpc.yppasswdd/rpc.yppasswdd.c
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/rpc.yppasswdd/rpc.yppasswdd.c')
-rw-r--r--libexec/rpc.yppasswdd/rpc.yppasswdd.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/libexec/rpc.yppasswdd/rpc.yppasswdd.c b/libexec/rpc.yppasswdd/rpc.yppasswdd.c
index 4434b5e8271..33a80bec1c7 100644
--- a/libexec/rpc.yppasswdd/rpc.yppasswdd.c
+++ b/libexec/rpc.yppasswdd/rpc.yppasswdd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rpc.yppasswdd.c,v 1.10 2001/11/27 01:02:48 millert Exp $ */
+/* $OpenBSD: rpc.yppasswdd.c,v 1.11 2001/12/09 14:58:30 miod Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
@@ -32,7 +32,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: rpc.yppasswdd.c,v 1.10 2001/11/27 01:02:48 millert Exp $";
+static char rcsid[] = "$OpenBSD: rpc.yppasswdd.c,v 1.11 2001/12/09 14:58:30 miod Exp $";
#endif
#include <sys/types.h>
@@ -46,6 +46,7 @@ static char rcsid[] = "$OpenBSD: rpc.yppasswdd.c,v 1.10 2001/11/27 01:02:48 mill
#include <string.h>
#include <pwd.h>
#include <util.h>
+#include <syslog.h>
#include <rpc/rpc.h>
#include <rpc/pmap_clnt.h>
@@ -116,37 +117,32 @@ main(argc, argv)
(void) daemon(0, 0);
chdir("/etc");
-/*
- freopen("/dev/null", "r", stdin);
- freopen("/var/yp/stderr", "w", stderr);
- freopen("/var/yp/stdout", "w", stdout);
-*/
(void) pmap_unset(YPPASSWDPROG, YPPASSWDVERS);
(void) signal(SIGCHLD, sig_child);
transp = svcudp_create(RPC_ANYSOCK);
if (transp == NULL) {
- (void) fprintf(stderr, "cannot create udp service.\n");
+ syslog(LOG_ERR, "cannot create udp service");
exit(1);
}
if (!svc_register(transp, YPPASSWDPROG, YPPASSWDVERS, yppasswddprog_1,
IPPROTO_UDP)) {
- fprintf(stderr, "unable to register YPPASSWDPROG, YPPASSWDVERS, udp\n");
+ syslog(LOG_ERR, "unable to register YPPASSWDPROG, YPPASSWDVERS, udp");
exit(1);
}
transp = svctcp_create(RPC_ANYSOCK, 0, 0);
if (transp == NULL) {
- (void) fprintf(stderr, "cannot create tcp service.\n");
+ syslog(LOG_ERR, "cannot create tcp service");
exit(1);
}
if (!svc_register(transp, YPPASSWDPROG, YPPASSWDVERS, yppasswddprog_1,
IPPROTO_TCP)) {
- fprintf(stderr, "unable to register YPPASSWDPROG, YPPASSWDVERS, tcp\n");
+ syslog(LOG_ERR, "unable to register YPPASSWDPROG, YPPASSWDVERS, tcp");
exit(1);
}
svc_run();
- (void) fprintf(stderr, "svc_run returned\n");
+ syslog(LOG_ERR, "svc_run returned");
exit(1);
}