HADOOP-15307. NFS: flavor AUTH_SYS should use VerifierNone. Contributed by Gabor Bota.
This commit is contained in:
parent
c35481594f
commit
a16623df21
|
@ -43,10 +43,16 @@ public abstract class Verifier extends RpcAuthInfo {
|
||||||
final Verifier verifer;
|
final Verifier verifer;
|
||||||
if (flavor == AuthFlavor.AUTH_NONE) {
|
if (flavor == AuthFlavor.AUTH_NONE) {
|
||||||
verifer = new VerifierNone();
|
verifer = new VerifierNone();
|
||||||
|
} else if (flavor == AuthFlavor.AUTH_SYS) {
|
||||||
|
// Added in HADOOP-15307 based on HDFS-5085:
|
||||||
|
// When the auth flavor is AUTH_SYS, the corresponding verifier is
|
||||||
|
// AUTH_NONE. I.e., it is impossible to have a verifier with auth
|
||||||
|
// flavor AUTH_SYS.
|
||||||
|
verifer = new VerifierNone();
|
||||||
} else if (flavor == AuthFlavor.RPCSEC_GSS) {
|
} else if (flavor == AuthFlavor.RPCSEC_GSS) {
|
||||||
verifer = new VerifierGSS();
|
verifer = new VerifierGSS();
|
||||||
} else {
|
} else {
|
||||||
throw new UnsupportedOperationException("Unsupported verifier flavor"
|
throw new UnsupportedOperationException("Unsupported verifier flavor: "
|
||||||
+ flavor);
|
+ flavor);
|
||||||
}
|
}
|
||||||
verifer.read(xdr);
|
verifer.read(xdr);
|
||||||
|
|
Loading…
Reference in New Issue