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
Unified · Split
| @@ -1078,7 +1078,7 @@ static struct nfs4_state *nfs4_try_open_cached(struct nfs4_opendata *opendata) · 1077 unmodified lines | ||
| 1078 | 1078 | struct nfs4_state *state = opendata->state; |
| 1079 | 1079 | struct nfs_inode *nfsi = NFS_I(state->inode); |
| 1080 | 1080 | struct nfs_delegation *delegation; |
| 1081 | − int open_mode = opendata->o_arg.open_flags & (O_EXCL|O_TRUNC); | |
| 1081 | + int open_mode = opendata->o_arg.open_flags; | |
| 1082 | 1082 | fmode_t fmode = opendata->o_arg.fmode; |
| 1083 | 1083 | nfs4_stateid stateid; |
| 1084 | 1084 | int ret = -EAGAIN; |
| @@ -1942,6 +1942,7 @@ static int nfs23_validate_mount_data(void *options, · 1941 unmodified lines | ||
| 1942 | 1942 | args->namlen = data->namlen; |
| 1943 | 1943 | args->bsize = data->bsize; |
| 1944 | 1944 | |
| 1945 | + args->auth_flavors[0] = RPC_AUTH_UNIX; | |
| 1945 | 1946 | if (data->flags & NFS_MOUNT_SECFLAVOUR) |
| 1946 | 1947 | args->auth_flavors[0] = data->pseudoflavor; |
| 1947 | 1948 | if (!args->nfs_server.hostname) |
| @@ -2637,6 +2638,7 @@ static int nfs4_validate_mount_data(void *options, · 689 unmodified lines | ||
| 2637 | 2638 | goto out_no_address; |
| 2638 | 2639 | args->nfs_server.port = ntohs(((struct sockaddr_in *)sap)->sin_port); |
| 2639 | 2640 | |
| 2641 | + args->auth_flavors[0] = RPC_AUTH_UNIX; | |
| 2640 | 2642 | if (data->auth_flavourlen) { |
| 2641 | 2643 | if (data->auth_flavourlen > 1) |
| 2642 | 2644 | goto out_inval_auth; |