sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pras...@apache.org
Subject git commit: SENTRY-470: When the parameter of hive.sentry.server is uppercase string, the command use default will cause an error in Hive Server2 side (guoquanshen via Prasad Mujumdar)
Date Sun, 05 Oct 2014 06:26:18 GMT
Repository: incubator-sentry
Updated Branches:
  refs/heads/master af221d152 -> bfd7d1072


SENTRY-470: When the parameter of hive.sentry.server is uppercase string, the command use
default will cause an error in Hive Server2 side (guoquanshen via Prasad Mujumdar)


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

Branch: refs/heads/master
Commit: bfd7d10728c1184d3431c26de2f64eb180fb7af3
Parents: af221d1
Author: Prasad Mujumdar <prasadm@cloudera.com>
Authored: Sat Oct 4 23:26:10 2014 -0700
Committer: Prasad Mujumdar <prasadm@cloudera.com>
Committed: Sat Oct 4 23:26:10 2014 -0700

----------------------------------------------------------------------
 .../apache/sentry/provider/db/service/persistent/SentryStore.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/bfd7d107/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
index 85a4947..017cf08 100644
--- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
+++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
@@ -705,7 +705,7 @@ public class SentryStore {
       }
       StringBuilder filters = new StringBuilder("roles.contains(role) "
           + "&& (" + Joiner.on(" || ").join(rolesFiler) + ") ");
-      filters.append("&& serverName == \"" + serverName + "\"");
+      filters.append("&& serverName == \"" + serverName.trim().toLowerCase() + "\"");
       query.setFilter(filters.toString());
       query.setResult("count(this)");
 


Mime
View raw message