diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2008-12-23 15:21:37 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-12-23 15:21:37 -0500 |
commit | 50a737f86dbf99daf3a8dcbdf778a3be36bb2a39 (patch) | |
tree | 0abbef9c62457660d22e1dc34409513d83ebc59f /fs/nfs/mount_clnt.c | |
parent | d740351bf0960e89ce1aef45cfe00167cb0f9e5b (diff) |
NFS: "[no]resvport" mount option changes mountd client too
If the admin has specified the "noresvport" option for an NFS mount
point, the kernel's NFS client uses an unprivileged source port for
the main NFS transport. The kernel's mountd client should use an
unprivileged port in this case as well.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/mount_clnt.c')
-rw-r--r-- | fs/nfs/mount_clnt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index 7e37113d37e3..ca905a5bb1ba 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c | |||
@@ -50,7 +50,6 @@ int nfs_mount(struct nfs_mount_request *info) | |||
50 | .program = &mnt_program, | 50 | .program = &mnt_program, |
51 | .version = info->version, | 51 | .version = info->version, |
52 | .authflavor = RPC_AUTH_UNIX, | 52 | .authflavor = RPC_AUTH_UNIX, |
53 | .flags = 0, | ||
54 | }; | 53 | }; |
55 | struct rpc_clnt *mnt_clnt; | 54 | struct rpc_clnt *mnt_clnt; |
56 | int status; | 55 | int status; |
@@ -59,6 +58,9 @@ int nfs_mount(struct nfs_mount_request *info) | |||
59 | (info->hostname ? info->hostname : "server"), | 58 | (info->hostname ? info->hostname : "server"), |
60 | info->dirpath); | 59 | info->dirpath); |
61 | 60 | ||
61 | if (info->noresvport) | ||
62 | args.flags |= RPC_CLNT_CREATE_NONPRIVPORT; | ||
63 | |||
62 | mnt_clnt = rpc_create(&args); | 64 | mnt_clnt = rpc_create(&args); |
63 | if (IS_ERR(mnt_clnt)) | 65 | if (IS_ERR(mnt_clnt)) |
64 | goto out_clnt_err; | 66 | goto out_clnt_err; |