[
https://issues.apache.org/jira/browse/HIVE-26055?focusedWorklogId=784727&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-784727
]
ASF GitHub Bot logged work on HIVE-26055:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 24/Jun/22 21:27
Start Date: 24/Jun/22 21:27
Worklog Time Spent: 10m
Work Description: deniskuzZ commented on code in PR #3247:
URL: https://github.com/apache/hive/pull/3247#discussion_r906420448
##########
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/SQLAuthorizationUtils.java:
##########
@@ -211,8 +211,15 @@ static RequiredPrivileges
getPrivilegesFromMetaStore(IMetaStoreClient metastoreC
RequiredPrivileges privs = getRequiredPrivsFromThrift(thrifPrivs);
// add owner privilege if user is owner of the object
- if (isOwner(metastoreClient, userName, curRoles, hivePrivObject)) {
- privs.addPrivilege(SQLPrivTypeGrant.OWNER_PRIV);
+ try {
+ if (metastoreClient.tableExists(hivePrivObject.getDbname(),
hivePrivObject.getObjectName()) &&
Review Comment:
Wait, don't you need to add the privilege when the table DOESN'T exist?
Also won't it hide the problem with the non-existing table for other
operations besides RENAME? Can we check somehow that we are within the rename
operation context?
Issue Time Tracking
-------------------
Worklog Id: (was: 784727)
Time Spent: 3h (was: 2h 50m)
> Fix the HivePrivilegesObjects for Alter table rename command
> ------------------------------------------------------------
>
> Key: HIVE-26055
> URL: https://issues.apache.org/jira/browse/HIVE-26055
> Project: Hive
> Issue Type: Bug
> Components: HiveServer2, Security
> Reporter: Sai Hemanth Gantasala
> Assignee: Sai Hemanth Gantasala
> Priority: Major
> Labels: pull-request-available
> Time Spent: 3h
> Remaining Estimate: 0h
>
> Fix the HivePrivilegeObjects for Alter table rename query in a way that it
> includes source table information in the output objects and destination table
> information in the input objects.
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)