aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2006-08-22 20:06:21 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-22 23:24:51 -0400
commitff9aa5e56df60cc8565a93cc868fe25ae3f20e49 (patch)
treeae1045652699feacd18aecbc7023edd430c2695e /net/sunrpc/xprtsock.c
parent9e1968c58d72c4b85d8a69bda1e194f9701fb224 (diff)
SUNRPC: Eliminate xprt_create_proto and rpc_create_client
The two function call API for creating a new RPC client is now obsolete. Remove it. Also, remove an unnecessary check to see whether the caller is capable of using privileged network services. The kernel RPC client always uses a privileged ephemeral port by default; callers are responsible for checking the authority of users to make use of any RPC service, or for specifying that a nonprivileged port is acceptable. Test plan: Repeated runs of Connectathon locking suite. Check network trace to ensure correctness of NLM requests and replies. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 17179aa4c207..0b84fab68d7e 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1376,7 +1376,6 @@ int xs_setup_udp(struct rpc_xprt *xprt, struct rpc_timeout *to)
1376 1376
1377 xprt->prot = IPPROTO_UDP; 1377 xprt->prot = IPPROTO_UDP;
1378 xprt->tsh_size = 0; 1378 xprt->tsh_size = 0;
1379 xprt->resvport = capable(CAP_NET_BIND_SERVICE) ? 1 : 0;
1380 /* XXX: header size can vary due to auth type, IPv6, etc. */ 1379 /* XXX: header size can vary due to auth type, IPv6, etc. */
1381 xprt->max_payload = (1U << 16) - (MAX_HEADER << 3); 1380 xprt->max_payload = (1U << 16) - (MAX_HEADER << 3);
1382 1381
@@ -1423,7 +1422,6 @@ int xs_setup_tcp(struct rpc_xprt *xprt, struct rpc_timeout *to)
1423 1422
1424 xprt->prot = IPPROTO_TCP; 1423 xprt->prot = IPPROTO_TCP;
1425 xprt->tsh_size = sizeof(rpc_fraghdr) / sizeof(u32); 1424 xprt->tsh_size = sizeof(rpc_fraghdr) / sizeof(u32);
1426 xprt->resvport = capable(CAP_NET_BIND_SERVICE) ? 1 : 0;
1427 xprt->max_payload = RPC_MAX_FRAGMENT_SIZE; 1425 xprt->max_payload = RPC_MAX_FRAGMENT_SIZE;
1428 1426
1429 INIT_WORK(&xprt->connect_worker, xs_tcp_connect_worker, xprt); 1427 INIT_WORK(&xprt->connect_worker, xs_tcp_connect_worker, xprt);