Commit f8cb2791 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'nfs-for-3.10-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull two NFS client fixes from Trond Myklebust:
 - Fix a regression that broke NFS mounting using klibc and busybox
 - Stable fix to check access modes correctly on NFSv4 delegated open()

* tag 'nfs-for-3.10-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFS: Fix security flavor negotiation with legacy binary mounts
  NFSv4: Fix a thinko in nfs4_try_open_cached
parents 1d822d60 eb54d437
...@@ -1078,7 +1078,7 @@ static struct nfs4_state *nfs4_try_open_cached(struct nfs4_opendata *opendata) ...@@ -1078,7 +1078,7 @@ static struct nfs4_state *nfs4_try_open_cached(struct nfs4_opendata *opendata)
struct nfs4_state *state = opendata->state; struct nfs4_state *state = opendata->state;
struct nfs_inode *nfsi = NFS_I(state->inode); struct nfs_inode *nfsi = NFS_I(state->inode);
struct nfs_delegation *delegation; struct nfs_delegation *delegation;
int open_mode = opendata->o_arg.open_flags & (O_EXCL|O_TRUNC); int open_mode = opendata->o_arg.open_flags;
fmode_t fmode = opendata->o_arg.fmode; fmode_t fmode = opendata->o_arg.fmode;
nfs4_stateid stateid; nfs4_stateid stateid;
int ret = -EAGAIN; int ret = -EAGAIN;
......
...@@ -1942,6 +1942,7 @@ static int nfs23_validate_mount_data(void *options, ...@@ -1942,6 +1942,7 @@ static int nfs23_validate_mount_data(void *options,
args->namlen = data->namlen; args->namlen = data->namlen;
args->bsize = data->bsize; args->bsize = data->bsize;
args->auth_flavors[0] = RPC_AUTH_UNIX;
if (data->flags & NFS_MOUNT_SECFLAVOUR) if (data->flags & NFS_MOUNT_SECFLAVOUR)
args->auth_flavors[0] = data->pseudoflavor; args->auth_flavors[0] = data->pseudoflavor;
if (!args->nfs_server.hostname) if (!args->nfs_server.hostname)
...@@ -2637,6 +2638,7 @@ static int nfs4_validate_mount_data(void *options, ...@@ -2637,6 +2638,7 @@ static int nfs4_validate_mount_data(void *options,
goto out_no_address; goto out_no_address;
args->nfs_server.port = ntohs(((struct sockaddr_in *)sap)->sin_port); args->nfs_server.port = ntohs(((struct sockaddr_in *)sap)->sin_port);
args->auth_flavors[0] = RPC_AUTH_UNIX;
if (data->auth_flavourlen) { if (data->auth_flavourlen) {
if (data->auth_flavourlen > 1) if (data->auth_flavourlen > 1)
goto out_inval_auth; goto out_inval_auth;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment