From commits-return-3719-apmail-sentry-commits-archive=sentry.apache.org@sentry.incubator.apache.org Sun Oct 5 06:26:43 2014 Return-Path: X-Original-To: apmail-sentry-commits-archive@minotaur.apache.org Delivered-To: apmail-sentry-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 895921787E for ; Sun, 5 Oct 2014 06:26:43 +0000 (UTC) Received: (qmail 20755 invoked by uid 500); 5 Oct 2014 06:26:43 -0000 Delivered-To: apmail-sentry-commits-archive@sentry.apache.org Received: (qmail 20708 invoked by uid 500); 5 Oct 2014 06:26:43 -0000 Mailing-List: contact commits-help@sentry.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sentry.incubator.apache.org Delivered-To: mailing list commits@sentry.incubator.apache.org Received: (qmail 20699 invoked by uid 99); 5 Oct 2014 06:26:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Oct 2014 06:26:43 +0000 X-ASF-Spam-Status: No, hits=-2000.6 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 05 Oct 2014 06:26:21 +0000 Received: (qmail 20613 invoked by uid 99); 5 Oct 2014 06:26:18 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Oct 2014 06:26:18 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 8469A1BBF9; Sun, 5 Oct 2014 06:26:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: prasadm@apache.org To: commits@sentry.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer 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, 5 Oct 2014 06:26:18 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org 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 Authored: Sat Oct 4 23:26:10 2014 -0700 Committer: Prasad Mujumdar 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)");