Commit 5d610994 authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

nfs: fix regression introduced in d505b1fb3f6

make use of RpcAuthVerifier in the client code.
calculate correct AUTH_SYS size

Acked-By: Paul
parent 44934daf
......@@ -43,6 +43,7 @@ public class RpcAuthTypeUnix implements RpcAuth, XdrAble {
_gids = gids;
_stamp = stamp;
_machine = machine;
_len = 4 + 4 + _machine.length() + 4 + 4 + 4 + 4*_gids.length;
}
public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException {
......
......@@ -38,7 +38,7 @@ public class RpcReply {
private MismatchInfo _mismatchInfo;
private int _authStatus;
private RpcAuth _verf;
private RpcAuthVerifier _verf;
private final XdrTransport _transport;
public RpcReply(int xid, Xdr xdr, XdrTransport transport) throws RpcException, OncRpcException, IOException {
......@@ -50,19 +50,7 @@ public class RpcReply {
_replyStatus = xdr.xdrDecodeInt();
switch (_replyStatus) {
case RpcReplyStatus.MSG_ACCEPTED:
int authType = xdr.xdrDecodeInt();
_log.log(Level.FINEST, "Auth type: {0}", authType);
switch (authType) {
case RpcAuthType.UNIX:
_verf = new RpcAuthTypeUnix();
break;
case RpcAuthType.NONE:
_verf = new RpcAuthTypeNone();
break;
default:
throw new RpcAuthMissmatch(RpcAuthStat.AUTH_FAILED);
}
_verf.xdrDecode(xdr);
_verf = new RpcAuthVerifier(xdr);
_acceptedStatus = xdr.xdrDecodeInt();
switch (_acceptedStatus) {
case RpcAccepsStatus.PROG_MISMATCH:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment