HDFS-6582. Merging change r1617366 from trunk
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1617369 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bee0c9b615
commit
afa125ccfd
|
@ -724,6 +724,10 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
||||||
FSDataInputStream fis = clientCache.getDfsInputStream(userName,
|
FSDataInputStream fis = clientCache.getDfsInputStream(userName,
|
||||||
Nfs3Utils.getFileIdPath(handle));
|
Nfs3Utils.getFileIdPath(handle));
|
||||||
|
|
||||||
|
if (fis == null) {
|
||||||
|
return new READ3Response(Nfs3Status.NFS3ERR_ACCES);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
readCount = fis.read(offset, readbuffer, 0, count);
|
readCount = fis.read(offset, readbuffer, 0, count);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
|
@ -278,13 +278,11 @@ public class TestRpcProgramNfs3 {
|
||||||
readReq.serialize(xdr_req);
|
readReq.serialize(xdr_req);
|
||||||
|
|
||||||
// Attempt by an unpriviledged user should fail.
|
// Attempt by an unpriviledged user should fail.
|
||||||
/* Hits HDFS-6582. It needs to be fixed first.
|
|
||||||
READ3Response response1 = nfsd.read(xdr_req.asReadOnlyWrap(),
|
READ3Response response1 = nfsd.read(xdr_req.asReadOnlyWrap(),
|
||||||
securityHandlerUnpriviledged,
|
securityHandlerUnpriviledged,
|
||||||
new InetSocketAddress("localhost", 1234));
|
new InetSocketAddress("localhost", 1234));
|
||||||
assertEquals("Incorrect return code:", Nfs3Status.NFS3ERR_ACCES,
|
assertEquals("Incorrect return code:", Nfs3Status.NFS3ERR_ACCES,
|
||||||
response1.getStatus());
|
response1.getStatus());
|
||||||
*/
|
|
||||||
|
|
||||||
// Attempt by a priviledged user should pass.
|
// Attempt by a priviledged user should pass.
|
||||||
READ3Response response2 = nfsd.read(xdr_req.asReadOnlyWrap(),
|
READ3Response response2 = nfsd.read(xdr_req.asReadOnlyWrap(),
|
||||||
|
|
|
@ -233,6 +233,9 @@ Release 2.6.0 - UNRELEASED
|
||||||
HDFS-6791. A block could remain under replicated if all of its replicas are on
|
HDFS-6791. A block could remain under replicated if all of its replicas are on
|
||||||
decommissioned nodes. (Ming Ma via jing9)
|
decommissioned nodes. (Ming Ma via jing9)
|
||||||
|
|
||||||
|
HDFS-6582. Missing null check in RpcProgramNfs3#read(XDR, SecurityHandler)
|
||||||
|
(Abhiraj Butala via brandonli)
|
||||||
|
|
||||||
Release 2.5.0 - UNRELEASED
|
Release 2.5.0 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
Loading…
Reference in New Issue