hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gif...@apache.org
Subject [17/20] hadoop git commit: HADOOP-15307. NFS: flavor AUTH_SYS should use VerifierNone. Contributed by Gabor Bota.
Date Tue, 12 Jun 2018 20:07:21 GMT
HADOOP-15307. NFS: flavor AUTH_SYS should use VerifierNone. Contributed by Gabor Bota.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/a16623df
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/a16623df
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/a16623df

Branch: refs/heads/HADOOP-15461
Commit: a16623df2148e59e1b7dcf98939b03cb7440d143
Parents: c354815
Author: Xiao Chen <xiao@apache.org>
Authored: Tue Jun 12 11:14:33 2018 -0700
Committer: Xiao Chen <xiao@apache.org>
Committed: Tue Jun 12 11:16:24 2018 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/oncrpc/security/Verifier.java     | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/a16623df/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/Verifier.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/Verifier.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/Verifier.java
index f3202a1..3c0e5fe 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/Verifier.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/Verifier.java
@@ -41,12 +41,18 @@ public abstract class Verifier extends RpcAuthInfo {
   public static Verifier readFlavorAndVerifier(XDR xdr) {
     AuthFlavor flavor = AuthFlavor.fromValue(xdr.readInt());
     final Verifier verifer;
-    if(flavor == AuthFlavor.AUTH_NONE) {
+    if (flavor == AuthFlavor.AUTH_NONE) {
       verifer = new VerifierNone();
-    } else if(flavor == AuthFlavor.RPCSEC_GSS) {
+    } 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) {
       verifer = new VerifierGSS();
     } else {
-      throw new UnsupportedOperationException("Unsupported verifier flavor"
+      throw new UnsupportedOperationException("Unsupported verifier flavor: "
           + flavor);
     }
     verifer.read(xdr);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message