sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ak...@apache.org
Subject sentry git commit: SENTRY-1624: DefaultSentryValidator doesn't correctly construct SentryOnFailureHookContextImpl (Alex Kolbasov, Reviewed by: Nachiket Vaidya)
Date Wed, 08 Feb 2017 07:30:19 GMT
Repository: sentry
Updated Branches:
  refs/heads/sentry-ha-redesign 3ada8a36e -> 183af2c9b


SENTRY-1624: DefaultSentryValidator doesn't correctly construct SentryOnFailureHookContextImpl
(Alex Kolbasov, Reviewed by: Nachiket Vaidya)


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

Branch: refs/heads/sentry-ha-redesign
Commit: 183af2c9bc56a77ea3b718e3f7e3b0f767119303
Parents: 3ada8a3
Author: Alexander Kolbasov <akolb@cloudera.com>
Authored: Tue Feb 7 23:27:48 2017 -0800
Committer: Alexander Kolbasov <akolb@cloudera.com>
Committed: Tue Feb 7 23:27:48 2017 -0800

----------------------------------------------------------------------
 .../binding/hive/v2/authorizer/DefaultSentryValidator.java    | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/183af2c9/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryValidator.java
----------------------------------------------------------------------
diff --git a/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryValidator.java
b/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryValidator.java
index c9da3ab..6c2410b 100644
--- a/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryValidator.java
+++ b/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryValidator.java
@@ -18,6 +18,7 @@ import static org.apache.hadoop.hive.metastore.MetaStoreUtils.DEFAULT_DATABASE_N
 
 import java.security.CodeSource;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.EnumSet;
 import java.util.List;
 import java.util.Set;
@@ -186,8 +187,6 @@ public class DefaultSentryValidator extends SentryHiveAuthorizationValidator
{
     } catch (AuthorizationException e) {
       Database db = null;
       Table tab = null;
-      AccessURI udfURI = null;
-      AccessURI partitionURI = null;
       if (outputHObjs != null) {
         for (HivePrivilegeObject obj : outputHObjs) {
           switch (obj.getType()) {
@@ -209,8 +208,8 @@ public class DefaultSentryValidator extends SentryHiveAuthorizationValidator
{
       String permsRequired = "";
       SentryOnFailureHookContext hookCtx =
           new SentryOnFailureHookContextImpl(context.getCommandString(), null, null, hiveOp,
db,
-              tab, udfURI, partitionURI, authenticator.getUserName(), context.getIpAddress(),
e,
-              authzConf);
+              tab, Collections.<AccessURI>emptyList(), null,
+                  authenticator.getUserName(), context.getIpAddress(), e, authzConf);
       SentryAuthorizerUtil.executeOnFailureHooks(hookCtx, authzConf);
       for (String perm : hiveAuthzBinding.getLastQueryPrivilegeErrors()) {
         permsRequired += perm + ";";


Mime
View raw message