diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2009-06-17 21:02:13 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-06-17 21:02:13 -0400 |
commit | 8e02f6b9aae9b265064f929c6df15222b9baf256 (patch) | |
tree | b5f018180a6b130731c085ee6ae7c060decfe538 /fs/nfs/nfsroot.c | |
parent | a14017db2852f9393a401a0f64053c331003babf (diff) |
NFS: Update MNT and MNT3 reply decoding functions
Solder xdr_stream-based XDR decoding functions into the in-kernel mountd
client that are more careful about checking data types and watching for
buffer overflows. The new MNT3 decoder includes support for auth-flavor
list decoding.
The "_sz" macro for MNT3 replies was missing the size of the file handle.
I've added this back, and included the size of the auth flavor array.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfsroot.c')
-rw-r--r-- | fs/nfs/nfsroot.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index 24c1b93874c4..8c55b27c0de4 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c | |||
@@ -490,6 +490,7 @@ static int __init root_nfs_get_handle(void) | |||
490 | { | 490 | { |
491 | struct nfs_fh fh; | 491 | struct nfs_fh fh; |
492 | struct sockaddr_in sin; | 492 | struct sockaddr_in sin; |
493 | unsigned int auth_flav_len = 0; | ||
493 | struct nfs_mount_request request = { | 494 | struct nfs_mount_request request = { |
494 | .sap = (struct sockaddr *)&sin, | 495 | .sap = (struct sockaddr *)&sin, |
495 | .salen = sizeof(sin), | 496 | .salen = sizeof(sin), |
@@ -499,6 +500,7 @@ static int __init root_nfs_get_handle(void) | |||
499 | .protocol = (nfs_data.flags & NFS_MOUNT_TCP) ? | 500 | .protocol = (nfs_data.flags & NFS_MOUNT_TCP) ? |
500 | XPRT_TRANSPORT_TCP : XPRT_TRANSPORT_UDP, | 501 | XPRT_TRANSPORT_TCP : XPRT_TRANSPORT_UDP, |
501 | .fh = &fh, | 502 | .fh = &fh, |
503 | .auth_flav_len = &auth_flav_len, | ||
502 | }; | 504 | }; |
503 | int status; | 505 | int status; |
504 | 506 | ||