@Test(timeout = 60000) public void testReadlink() throws Exception { HdfsFileStatus status = nn.getRpcServer().getFileInfo(testdir); long dirId = status.getFileId(); XDR xdr_req = new XDR(); FileHandle handle = new FileHandle(dirId); SYMLINK3Request req = new SYMLINK3Request(handle, "fubar", new SetAttr3(), "bar"); req.serialize(xdr_req); SYMLINK3Response response = nfsd.symlink(xdr_req.asReadOnlyWrap(), securityHandler, new InetSocketAddress("localhost", 1234)); assertEquals("Incorrect return code:", Nfs3Status.NFS3_OK, response.getStatus()); FileHandle handle2 = response.getObjFileHandle(); XDR xdr_req2 = new XDR(); READLINK3Request req2 = new READLINK3Request(handle2); req2.serialize(xdr_req2); READLINK3Response response1 = nfsd.readlink(xdr_req2.asReadOnlyWrap(), securityHandlerUnpriviledged, new InetSocketAddress("localhost", 1234)); assertEquals("Incorrect return code:", Nfs3Status.NFS3ERR_ACCES, response1.getStatus()); READLINK3Response response2 = nfsd.readlink(xdr_req2.asReadOnlyWrap(), securityHandler, new InetSocketAddress("localhost", 1234)); assertEquals("Incorrect return code:", Nfs3Status.NFS3_OK, response2.getStatus()); }
@Override public READLINK3Response readlink(XDR xdr, RpcInfo info) { return readlink(xdr, getSecurityHandler(info), info.remoteAddress()); }
RpcProgramNfs3 extends RpcProgram implements Nfs3Interface { @Override public READLINK3Response readlink(XDR xdr, RpcInfo info) { return readlink(xdr, getSecurityHandler(info), info.remoteAddress()); } }
RpcProgramNfs3 extends RpcProgram implements Nfs3Interface { @Override public READLINK3Response readlink(XDR xdr, RpcInfo info) { return readlink(xdr, getSecurityHandler(info), info.remoteAddress()); } RpcProgramNfs3(NfsConfiguration config, DatagramSocket registrationSocket,
      boolean allowInsecurePorts); }
RpcProgramNfs3 extends RpcProgram implements Nfs3Interface { @Override public READLINK3Response readlink(XDR xdr, RpcInfo info) { return readlink(xdr, getSecurityHandler(info), info.remoteAddress()); } RpcProgramNfs3(NfsConfiguration config, DatagramSocket registrationSocket,
      boolean allowInsecurePorts); @Override void startDaemons(); @Override void stopDaemons(); @Override NFS3Response nullProcedure(); @Override GETATTR3Response getattr(XDR xdr, RpcInfo info); @Override SETATTR3Response setattr(XDR xdr, RpcInfo info); @Override LOOKUP3Response lookup(XDR xdr, RpcInfo info); @Override ACCESS3Response access(XDR xdr, RpcInfo info); @Override READLINK3Response readlink(XDR xdr, RpcInfo info); @Override READ3Response read(XDR xdr, RpcInfo info); @Override WRITE3Response write(XDR xdr, RpcInfo info); @Override CREATE3Response create(XDR xdr, RpcInfo info); @Override MKDIR3Response mkdir(XDR xdr, RpcInfo info); @Override READDIR3Response mknod(XDR xdr, RpcInfo info); @Override REMOVE3Response remove(XDR xdr, RpcInfo info); @Override RMDIR3Response rmdir(XDR xdr, RpcInfo info); @Override RENAME3Response rename(XDR xdr, RpcInfo info); @Override SYMLINK3Response symlink(XDR xdr, RpcInfo info); @Override READDIR3Response link(XDR xdr, RpcInfo info); @Override READDIR3Response readdir(XDR xdr, RpcInfo info); READDIR3Response readdir(XDR xdr, SecurityHandler securityHandler,
      SocketAddress remoteAddress); @Override READDIRPLUS3Response readdirplus(XDR xdr, RpcInfo info); @Override FSSTAT3Response fsstat(XDR xdr, RpcInfo info); @Override FSINFO3Response fsinfo(XDR xdr, RpcInfo info); @Override PATHCONF3Response pathconf(XDR xdr, RpcInfo info); @Override COMMIT3Response commit(XDR xdr, RpcInfo info); @Override void handleInternal(ChannelHandlerContext ctx, RpcInfo info); }
RpcProgramNfs3 extends RpcProgram implements Nfs3Interface { @Override public READLINK3Response readlink(XDR xdr, RpcInfo info) { return readlink(xdr, getSecurityHandler(info), info.remoteAddress()); } RpcProgramNfs3(NfsConfiguration config, DatagramSocket registrationSocket,
      boolean allowInsecurePorts); @Override void startDaemons(); @Override void stopDaemons(); @Override NFS3Response nullProcedure(); @Override GETATTR3Response getattr(XDR xdr, RpcInfo info); @Override SETATTR3Response setattr(XDR xdr, RpcInfo info); @Override LOOKUP3Response lookup(XDR xdr, RpcInfo info); @Override ACCESS3Response access(XDR xdr, RpcInfo info); @Override READLINK3Response readlink(XDR xdr, RpcInfo info); @Override READ3Response read(XDR xdr, RpcInfo info); @Override WRITE3Response write(XDR xdr, RpcInfo info); @Override CREATE3Response create(XDR xdr, RpcInfo info); @Override MKDIR3Response mkdir(XDR xdr, RpcInfo info); @Override READDIR3Response mknod(XDR xdr, RpcInfo info); @Override REMOVE3Response remove(XDR xdr, RpcInfo info); @Override RMDIR3Response rmdir(XDR xdr, RpcInfo info); @Override RENAME3Response rename(XDR xdr, RpcInfo info); @Override SYMLINK3Response symlink(XDR xdr, RpcInfo info); @Override READDIR3Response link(XDR xdr, RpcInfo info); @Override READDIR3Response readdir(XDR xdr, RpcInfo info); READDIR3Response readdir(XDR xdr, SecurityHandler securityHandler,
      SocketAddress remoteAddress); @Override READDIRPLUS3Response readdirplus(XDR xdr, RpcInfo info); @Override FSSTAT3Response fsstat(XDR xdr, RpcInfo info); @Override FSINFO3Response fsinfo(XDR xdr, RpcInfo info); @Override PATHCONF3Response pathconf(XDR xdr, RpcInfo info); @Override COMMIT3Response commit(XDR xdr, RpcInfo info); @Override void handleInternal(ChannelHandlerContext ctx, RpcInfo info); static final int DEFAULT_UMASK; static final FsPermission umask; }