diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2010-01-15 16:02:49 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2010-01-17 16:55:20 -0500 |
commit | 8e710e90bcf937d500445082800503f374560399 (patch) | |
tree | 9df3f6fc32d7a9a1491f29724ed2c3f8e3781b1a /utils | |
parent | 7d81b45faeb9ca652f4076cfecd0da742caa22a8 (diff) | |
download | nfs-utils-8e710e90bcf937d500445082800503f374560399.tar.gz nfs-utils-8e710e90bcf937d500445082800503f374560399.tar.xz nfs-utils-8e710e90bcf937d500445082800503f374560399.zip |
tcpwrapper: Add support for IPv6
Assuming the tcp_wrappers library can actually support IPv6 addresses,
here's a crack at IPv6 support in nfs-utils' TCP wrapper shim.
Some reorganization is done to limit the number of times that @sap
is converted to a presentation address string.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/mountd/mount_dispatch.c | 6 | ||||
-rw-r--r-- | utils/statd/statd.c | 5 | ||||
-rw-r--r-- | utils/statd/statd.man | 3 |
3 files changed, 3 insertions, 11 deletions
diff --git a/utils/mountd/mount_dispatch.c b/utils/mountd/mount_dispatch.c index d2802ef..ba6981d 100644 --- a/utils/mountd/mount_dispatch.c +++ b/utils/mountd/mount_dispatch.c @@ -70,12 +70,10 @@ mount_dispatch(struct svc_req *rqstp, SVCXPRT *transp) { union mountd_arguments argument; union mountd_results result; -#ifdef HAVE_TCP_WRAPPER - struct sockaddr_in *sin = nfs_getrpccaller_in(transp); +#ifdef HAVE_TCP_WRAPPER /* remote host authorization check */ - if (sin->sin_family == AF_INET && - !check_default("mountd", sin, MOUNTPROG)) { + if (!check_default("mountd", nfs_getrpccaller(transp), MOUNTPROG)) { svcerr_auth (transp, AUTH_FAILED); return; } diff --git a/utils/statd/statd.c b/utils/statd/statd.c index fa3c6d5..01fdb41 100644 --- a/utils/statd/statd.c +++ b/utils/statd/statd.c @@ -75,11 +75,8 @@ extern void simulator (int, char **); static void sm_prog_1_wrapper (struct svc_req *rqstp, register SVCXPRT *transp) { - struct sockaddr_in *sin = nfs_getrpccaller_in(transp); - /* remote host authorization check */ - if (sin->sin_family == AF_INET && - !check_default("statd", sin, SM_PROG)) { + if (!check_default("statd", nfs_getrpccaller(transp), SM_PROG)) { svcerr_auth (transp, AUTH_FAILED); return; } diff --git a/utils/statd/statd.man b/utils/statd/statd.man index 4ddb634..ffc5e95 100644 --- a/utils/statd/statd.man +++ b/utils/statd/statd.man @@ -274,9 +274,6 @@ listeners using the .B tcp_wrapper library or .BR iptables (8). -Note that the -.B tcp_wrapper -library supports only IPv4 networking. To use the .B tcp_wrapper library, add the hostnames of peers that should be allowed access to |