You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sentry.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2017/04/25 10:29:04 UTC
[jira] [Commented] (SENTRY-1540)
SentryStore.isMultiActionsSupported() is always true
[ https://issues.apache.org/jira/browse/SENTRY-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15982684#comment-15982684 ]
Hadoop QA commented on SENTRY-1540:
-----------------------------------
Here are the results of testing the latest attachment
https://issues.apache.org/jira/secure/attachment/12846408/SENTRY-1540.v2.patch against master.
{color:red}Overall:{color} -1 due to 2 errors
{color:red}ERROR:{color} mvn test exited 1
{color:red}ERROR:{color} Failed: org.apache.sentry.provider.db.service.thrift.TestSentryWebServerWithSSL
Console output: https://builds.apache.org/job/PreCommit-SENTRY-Build/2562/console
This message is automatically generated.
> SentryStore.isMultiActionsSupported() is always true
> ----------------------------------------------------
>
> Key: SENTRY-1540
> URL: https://issues.apache.org/jira/browse/SENTRY-1540
> Project: Sentry
> Issue Type: Improvement
> Components: Sentry
> Affects Versions: 1.8.0
> Reporter: Alexander Kolbasov
> Assignee: Vamsee Yarlagadda
> Priority: Minor
> Labels: bite-sized
> Attachments: SENTRY-1540.v1.patch, SENTRY-1540.v2.patch
>
>
> The SentryStore.isMultiActionsSupported() function:
> {code}
> // Currently INSERT/SELECT/ALL are supported for Table and DB level privileges
> private boolean isMultiActionsSupported(TSentryPrivilege tPrivilege) {
> return tPrivilege.getDbName() != null;
> }
> {code}
> It is called in two places - in drop_privileges():
> {code}
> TSentryPrivilege tPrivilege = toSentryPrivilege(tAuthorizable);
> try {
> if (isMultiActionsSupported(tPrivilege)) {
> ...
> {code}
> The toSentryPrivilege() function:
> {code}
> private TSentryPrivilege toSentryPrivilege(TSentryAuthorizable tAuthorizable)
> throws SentryInvalidInputException {
> TSentryPrivilege tSentryPrivilege = new TSentryPrivilege();
> tSentryPrivilege.setDbName(fromNULLCol(tAuthorizable.getDb()));
> tSentryPrivilege.setServerName(fromNULLCol(tAuthorizable.getServer()));
> tSentryPrivilege.setTableName(fromNULLCol(tAuthorizable.getTable()));
> tSentryPrivilege.setColumnName(fromNULLCol(tAuthorizable.getColumn()));
> tSentryPrivilege.setURI(fromNULLCol(tAuthorizable.getUri()));
> ...
> {code}
> So all fields are initialized to an emoty string which means that isMultiActionsSupported is always true.
> The same is true for the second usage in renamePrivilege().
> So currently the function is meaningless. So it should be either removed or changed to verify that dbName is non-empty and not "__NULL__".
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)