NFS: Ensure NFSv2/v3 mounts respect the NFS_MOUNT_SECFLAVOUR flag
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
@@ -471,12 +471,14 @@ static int nfs_validate_mount_data(struct nfs_mount_data *data,
|
|||||||
data->version);
|
data->version);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
/* Fill in pseudoflavor for mount version < 5 */
|
|
||||||
data->pseudoflavor = RPC_AUTH_UNIX;
|
|
||||||
case 5:
|
case 5:
|
||||||
memset(data->context, 0, sizeof(data->context));
|
memset(data->context, 0, sizeof(data->context));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set the pseudoflavor */
|
||||||
|
if (!(data->flags & NFS_MOUNT_SECFLAVOUR))
|
||||||
|
data->pseudoflavor = RPC_AUTH_UNIX;
|
||||||
|
|
||||||
#ifndef CONFIG_NFS_V3
|
#ifndef CONFIG_NFS_V3
|
||||||
/* If NFSv3 is not compiled in, return -EPROTONOSUPPORT */
|
/* If NFSv3 is not compiled in, return -EPROTONOSUPPORT */
|
||||||
if (data->flags & NFS_MOUNT_VER3) {
|
if (data->flags & NFS_MOUNT_VER3) {
|
||||||
|
Reference in New Issue
Block a user