mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
NFS: Fix a problem with the legacy binary mount code
commit 872ece86ea upstream.
Apparently, am-utils is still using the legacy binary mountdata interface,
and is having trouble parsing /proc/mounts due to the 'port=' field being
incorrectly set.
The following patch should fix up the regression.
Reported-by: Marius Tolzmann <tolzmann@molgen.mpg.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
839e17b7fb
commit
d351ebe91e
@@ -1815,6 +1815,7 @@ static int nfs_validate_mount_data(void *options,
|
||||
|
||||
memcpy(sap, &data->addr, sizeof(data->addr));
|
||||
args->nfs_server.addrlen = sizeof(data->addr);
|
||||
args->nfs_server.port = ntohs(data->addr.sin_port);
|
||||
if (!nfs_verify_server_address(sap))
|
||||
goto out_no_address;
|
||||
|
||||
@@ -2528,6 +2529,7 @@ static int nfs4_validate_mount_data(void *options,
|
||||
return -EFAULT;
|
||||
if (!nfs_verify_server_address(sap))
|
||||
goto out_no_address;
|
||||
args->nfs_server.port = ntohs(((struct sockaddr_in *)sap)->sin_port);
|
||||
|
||||
if (data->auth_flavourlen) {
|
||||
if (data->auth_flavourlen > 1)
|
||||
|
||||
Reference in New Issue
Block a user