hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xu...@apache.org
Subject hive git commit: HIVE-11029: hadoop.proxyuser.mapr.groups does not work to restrict the groups that can be impersonated (Na via Xuefu)
Date Tue, 30 Jun 2015 05:10:21 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-1 e71fd213c -> a51ebd818


HIVE-11029: hadoop.proxyuser.mapr.groups does not work to restrict the groups that can be
impersonated (Na via Xuefu)


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

Branch: refs/heads/branch-1
Commit: a51ebd8180cf32afa76d1c7bce6edd335e66fb4f
Parents: e71fd21
Author: Xuefu Zhang <xzhang@Cloudera.com>
Authored: Mon Jun 29 22:10:13 2015 -0700
Committer: Xuefu Zhang <xzhang@Cloudera.com>
Committed: Mon Jun 29 22:10:13 2015 -0700

----------------------------------------------------------------------
 .../service/cli/session/HiveSessionImplwithUGI.java   | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/a51ebd81/service/src/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java
----------------------------------------------------------------------
diff --git a/service/src/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java
b/service/src/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java
index 2b5f645..cd3c3f9 100644
--- a/service/src/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java
+++ b/service/src/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java
@@ -59,15 +59,11 @@ public class HiveSessionImplwithUGI extends HiveSessionImpl {
     if (owner == null) {
       throw new HiveSQLException("No username provided for impersonation");
     }
-    if (UserGroupInformation.isSecurityEnabled()) {
-      try {
-        sessionUgi = UserGroupInformation.createProxyUser(
-            owner, UserGroupInformation.getLoginUser());
-      } catch (IOException e) {
-        throw new HiveSQLException("Couldn't setup proxy user", e);
-      }
-    } else {
-      sessionUgi = UserGroupInformation.createRemoteUser(owner);
+    try {
+      sessionUgi = UserGroupInformation.createProxyUser(
+          owner, UserGroupInformation.getLoginUser());
+    } catch (IOException e) {
+      throw new HiveSQLException("Couldn't setup proxy user", e);
     }
   }
 


Mime
View raw message