Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101950
b: refs/heads/master
c: 6738b25
h: refs/heads/master
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Jul 9, 2008
1 parent c08b31f commit 70467ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dd07c94750cb1ee4449fb0db06623e1865b3e26e
refs/heads/master: 6738b2512bdf93ffbefe108b38a9165d5a718c3f
22 changes: 6 additions & 16 deletions trunk/fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2125,6 +2125,8 @@ static int nfs4_validate_mount_data(void *options,
args->acdirmin = NFS_DEF_ACDIRMIN;
args->acdirmax = NFS_DEF_ACDIRMAX;
args->nfs_server.port = NFS_PORT; /* 2049 unless user set port= */
args->auth_flavors[0] = RPC_AUTH_UNIX;
args->auth_flavor_len = 0;

switch (data->version) {
case 1:
Expand All @@ -2140,18 +2142,13 @@ static int nfs4_validate_mount_data(void *options,
&args->nfs_server.address))
goto out_no_address;

switch (data->auth_flavourlen) {
case 0:
args->auth_flavors[0] = RPC_AUTH_UNIX;
break;
case 1:
if (data->auth_flavourlen) {
if (data->auth_flavourlen > 1)
goto out_inval_auth;
if (copy_from_user(&args->auth_flavors[0],
data->auth_flavours,
sizeof(args->auth_flavors[0])))
return -EFAULT;
break;
default:
goto out_inval_auth;
}

c = strndup_user(data->hostname.data, NFS4_MAXNAMLEN);
Expand Down Expand Up @@ -2203,15 +2200,8 @@ static int nfs4_validate_mount_data(void *options,

nfs_validate_transport_protocol(args);

switch (args->auth_flavor_len) {
case 0:
args->auth_flavors[0] = RPC_AUTH_UNIX;
break;
case 1:
break;
default:
if (args->auth_flavor_len > 1)
goto out_inval_auth;
}

if (args->client_address == NULL)
goto out_no_client_address;
Expand Down

0 comments on commit 70467ce

Please sign in to comment.