Skip to content

Commit

Permalink
NFS: Ensure NFSv2/v3 mounts respect the NFS_MOUNT_SECFLAVOUR flag
Browse files Browse the repository at this point in the history
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Sep 23, 2006
1 parent 738a351 commit 36b15c5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,12 +471,14 @@ static int nfs_validate_mount_data(struct nfs_mount_data *data,
data->version);
return -EINVAL;
}
/* Fill in pseudoflavor for mount version < 5 */
data->pseudoflavor = RPC_AUTH_UNIX;
case 5:
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
/* If NFSv3 is not compiled in, return -EPROTONOSUPPORT */
if (data->flags & NFS_MOUNT_VER3) {
Expand Down

0 comments on commit 36b15c5

Please sign in to comment.