Author: thejas
Date: Wed Apr  9 20:03:49 2014
New Revision: 1586118

URL: http://svn.apache.org/r1586118
Log:
HIVE-6863 : HiveServer2 binary mode throws exception with PAM (Vaibhav Gumashta 
via Thejas Nair)

Modified:
    
hive/trunk/service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java

Modified: 
hive/trunk/service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java
URL: 
http://svn.apache.org/viewvc/hive/trunk/service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java?rev=1586118&r1=1586117&r2=1586118&view=diff
==============================================================================
--- 
hive/trunk/service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java 
(original)
+++ 
hive/trunk/service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java 
Wed Apr  9 20:03:49 2014
@@ -53,7 +53,8 @@ public class HiveAuthFactory {
     NONE("NONE"),
     LDAP("LDAP"),
     KERBEROS("KERBEROS"),
-    CUSTOM("CUSTOM");
+    CUSTOM("CUSTOM"),
+    PAM("PAM");
 
     private String authType;
 
@@ -126,9 +127,7 @@ public class HiveAuthFactory {
   }
 
   public TTransportFactory getAuthTransFactory() throws LoginException {
-
     TTransportFactory transportFactory;
-
     if (authTypeStr.equalsIgnoreCase(AuthTypes.KERBEROS.getAuthName())) {
       try {
         transportFactory = 
saslServer.createTransportFactory(getSaslProperties());
@@ -139,6 +138,8 @@ public class HiveAuthFactory {
       transportFactory = PlainSaslHelper.getPlainTransportFactory(authTypeStr);
     } else if (authTypeStr.equalsIgnoreCase(AuthTypes.LDAP.getAuthName())) {
       transportFactory = PlainSaslHelper.getPlainTransportFactory(authTypeStr);
+    } else if (authTypeStr.equalsIgnoreCase(AuthTypes.PAM.getAuthName())) {
+      transportFactory = PlainSaslHelper.getPlainTransportFactory(authTypeStr);
     } else if (authTypeStr.equalsIgnoreCase(AuthTypes.NOSASL.getAuthName())) {
       transportFactory = new TTransportFactory();
     } else if (authTypeStr.equalsIgnoreCase(AuthTypes.CUSTOM.getAuthName())) {


Reply via email to