diff options
author | alfred <alfred@FreeBSD.org> | 2002-07-15 18:51:57 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-07-15 18:51:57 +0000 |
commit | 83a53d0868085db818fddd8cb38eecc0c39cad8d (patch) | |
tree | a7c706e5ad9f636ce740a033b0fa75319465add7 /usr.sbin | |
parent | 08255d70df400237c666515b55e2726296ded480 (diff) | |
download | FreeBSD-src-83a53d0868085db818fddd8cb38eecc0c39cad8d.zip FreeBSD-src-83a53d0868085db818fddd8cb38eecc0c39cad8d.tar.gz |
Port to TI/RPC and/or IPV6.
Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/keyserv/keyserv.c | 6 | ||||
-rw-r--r-- | usr.sbin/rpc.statd/statd.c | 14 |
2 files changed, 6 insertions, 14 deletions
diff --git a/usr.sbin/keyserv/keyserv.c b/usr.sbin/keyserv/keyserv.c index 797549a..c312972 100644 --- a/usr.sbin/keyserv/keyserv.c +++ b/usr.sbin/keyserv/keyserv.c @@ -764,10 +764,10 @@ root_auth(trans, rqstp) struct svc_req *rqstp; { uid_t uid; - struct sockaddr_in *remote; + struct sockaddr *remote; - remote = svc_getcaller(trans); - if (remote->sin_family == AF_INET) { + remote = svc_getrpccaller(trans)->buf; + if (remote->sa_family != AF_UNIX) { if (debugging) fprintf(stderr, "client didn't use AF_UNIX\n"); return (0); diff --git a/usr.sbin/rpc.statd/statd.c b/usr.sbin/rpc.statd/statd.c index b49a428..1a85514 100644 --- a/usr.sbin/rpc.statd/statd.c +++ b/usr.sbin/rpc.statd/statd.c @@ -44,7 +44,6 @@ static const char rcsid[] = #include <stdio.h> #include <stdlib.h> #include <rpc/rpc.h> -#include <rpc/pmap_clnt.h> #include <string.h> #include <syslog.h> #include <sys/types.h> @@ -71,19 +70,12 @@ main(int argc, char **argv) debug = 1; } - (void)pmap_unset(SM_PROG, SM_VERS); + (void)rpcb_unset(SM_PROG, SM_VERS, NULL); - transp = svcudp_create(RPC_ANYSOCK); - if (transp == NULL) + if (!svc_create(sm_prog_1, SM_PROG, SM_VERS, "udp")) errx(1, "cannot create udp service"); - if (!svc_register(transp, SM_PROG, SM_VERS, sm_prog_1, IPPROTO_UDP)) - errx(1, "unable to register (SM_PROG, SM_VERS, udp)"); - - transp = svctcp_create(RPC_ANYSOCK, 0, 0); - if (transp == NULL) + if (!svc_create(sm_prog_1, SM_PROG, SM_VERS, "tcp")) errx(1, "cannot create tcp service"); - if (!svc_register(transp, SM_PROG, SM_VERS, sm_prog_1, IPPROTO_TCP)) - errx(1, "unable to register (SM_PROG, SM_VERS, tcp)"); init_file("/var/db/statd.status"); /* Note that it is NOT sensible to run this program from inetd - the */ |