summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rpc.rusersd/rusers_proc.c22
-rw-r--r--libexec/rpc.rusersd/rusersd.c18
2 files changed, 23 insertions, 17 deletions
diff --git a/libexec/rpc.rusersd/rusers_proc.c b/libexec/rpc.rusersd/rusers_proc.c
index 928c8a471c2..0bfabdcb893 100644
--- a/libexec/rpc.rusersd/rusers_proc.c
+++ b/libexec/rpc.rusersd/rusers_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rusers_proc.c,v 1.14 2002/05/22 06:35:44 deraadt Exp $ */
+/* $OpenBSD: rusers_proc.c,v 1.15 2002/06/09 04:06:42 deraadt Exp $ */
/*-
* Copyright (c) 1993 John Brezak
@@ -29,7 +29,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: rusers_proc.c,v 1.14 2002/05/22 06:35:44 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: rusers_proc.c,v 1.15 2002/06/09 04:06:42 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -372,7 +372,7 @@ rusers_service(rqstp, transp)
case RUSERSVERS_IDLE:
case RUSERSVERS_ORIG:
local = (char *(*)(void *, struct svc_req *))
- rusers_num_svc;
+ rusers_num_svc;
break;
default:
svcerr_progvers(transp, RUSERSVERS_IDLE, RUSERSVERS_3);
@@ -387,19 +387,19 @@ rusers_service(rqstp, transp)
switch (rqstp->rq_vers) {
case RUSERSVERS_3:
local = (char *(*)(void *, struct svc_req *))
- rusersproc_names_3_svc;
+ rusersproc_names_3_svc;
break;
case RUSERSVERS_IDLE:
xdr_result = (xdrproc_t)xdr_utmpidlearr;
local = (char *(*)(void *, struct svc_req *))
- rusersproc_names_2_svc;
+ rusersproc_names_2_svc;
break;
case RUSERSVERS_ORIG:
xdr_result = (xdrproc_t)xdr_utmpidlearr;
local = (char *(*)(void *, struct svc_req *))
- rusersproc_names_1_svc;
+ rusersproc_names_1_svc;
break;
default:
@@ -415,19 +415,19 @@ rusers_service(rqstp, transp)
switch (rqstp->rq_vers) {
case RUSERSVERS_3:
local = (char *(*)(void *, struct svc_req *))
- rusersproc_allnames_3_svc;
+ rusersproc_allnames_3_svc;
break;
case RUSERSVERS_IDLE:
xdr_result = (xdrproc_t)xdr_utmpidlearr;
local = (char *(*)(void *, struct svc_req *))
- rusersproc_allnames_2_svc;
+ rusersproc_allnames_2_svc;
break;
case RUSERSVERS_ORIG:
xdr_result = (xdrproc_t)xdr_utmpidlearr;
local = (char *(*)(void *, struct svc_req *))
- rusersproc_allnames_1_svc;
+ rusersproc_allnames_1_svc;
break;
default:
@@ -447,9 +447,9 @@ rusers_service(rqstp, transp)
goto leave;
}
result = (*local)(&argument, rqstp);
- if (result != NULL && !svc_sendreply(transp, xdr_result, result)) {
+ if (result != NULL && !svc_sendreply(transp, xdr_result, result))
svcerr_systemerr(transp);
- }
+
if (!svc_freeargs(transp, xdr_argument, (caddr_t)&argument)) {
syslog(LOG_ERR, "unable to free arguments");
exit(1);
diff --git a/libexec/rpc.rusersd/rusersd.c b/libexec/rpc.rusersd/rusersd.c
index 2b3b7d653e7..559d83f0d09 100644
--- a/libexec/rpc.rusersd/rusersd.c
+++ b/libexec/rpc.rusersd/rusersd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rusersd.c,v 1.5 2001/01/28 19:34:32 niklas Exp $ */
+/* $OpenBSD: rusersd.c,v 1.6 2002/06/09 04:06:42 deraadt Exp $ */
/*-
* Copyright (c) 1993 John Brezak
@@ -29,7 +29,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: rusersd.c,v 1.5 2001/01/28 19:34:32 niklas Exp $";
+static char rcsid[] = "$OpenBSD: rusersd.c,v 1.6 2002/06/09 04:06:42 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -44,7 +44,7 @@ static char rcsid[] = "$OpenBSD: rusersd.c,v 1.5 2001/01/28 19:34:32 niklas Exp
#include <rpcsvc/rnusers.h> /* Old version */
#include <rpc/pmap_clnt.h>
-extern void rusers_service();
+extern void rusers_service(struct svc_req *, SVCXPRT *);
int from_inetd = 1;
@@ -98,15 +98,21 @@ main(argc, argv)
exit(1);
}
if (!svc_register(transp, RUSERSPROG, RUSERSVERS_3, rusers_service, proto)) {
- syslog(LOG_ERR, "unable to register (RUSERSPROG, RUSERSVERS_3, %s).", proto?"udp":"(inetd)");
+ syslog(LOG_ERR,
+ "unable to register (RUSERSPROG, RUSERSVERS_3, %s).",
+ proto ? "udp" : "(inetd)");
exit(1);
}
if (!svc_register(transp, RUSERSPROG, RUSERSVERS_IDLE, rusers_service, proto)) {
- syslog(LOG_ERR, "unable to register (RUSERSPROG, RUSERSVERS_IDLE, %s).", proto?"udp":"(inetd)");
+ syslog(LOG_ERR,
+ "unable to register (RUSERSPROG, RUSERSVERS_IDLE, %s).",
+ proto ? "udp" : "(inetd)");
exit(1);
}
if (!svc_register(transp, RUSERSPROG, RUSERSVERS_ORIG, rusers_service, proto)) {
- syslog(LOG_ERR, "unable to register (RUSERSPROG, RUSERSVERS_ORIG, %s).", proto?"udp":"(inetd)");
+ syslog(LOG_ERR,
+ "unable to register (RUSERSPROG, RUSERSVERS_ORIG, %s).",
+ proto ? "udp" : "(inetd)");
exit(1);
}