Return-Path: X-Original-To: apmail-hive-commits-archive@www.apache.org Delivered-To: apmail-hive-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3586F10755 for ; Wed, 2 Apr 2014 19:46:17 +0000 (UTC) Received: (qmail 41728 invoked by uid 500); 2 Apr 2014 19:46:16 -0000 Delivered-To: apmail-hive-commits-archive@hive.apache.org Received: (qmail 41545 invoked by uid 500); 2 Apr 2014 19:46:14 -0000 Mailing-List: contact commits-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hive.apache.org Delivered-To: mailing list commits@hive.apache.org Received: (qmail 41525 invoked by uid 99); 2 Apr 2014 19:46:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Apr 2014 19:46:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Apr 2014 19:46:09 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 51F2F238883D; Wed, 2 Apr 2014 19:45:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1584145 - in /hive/branches/branch-0.13/ql/src/test: queries/clientnegative/authorization_grant_table_dup.q results/clientnegative/authorization_grant_table_dup.q.out Date: Wed, 02 Apr 2014 19:45:46 -0000 To: commits@hive.apache.org From: thejas@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140402194546.51F2F238883D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: thejas Date: Wed Apr 2 19:45:45 2014 New Revision: 1584145 URL: http://svn.apache.org/r1584145 Log: HIVE-6804 - adding files missed in earlier commit Added: hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_grant_table_dup.q hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_grant_table_dup.q.out Added: hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_grant_table_dup.q URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_grant_table_dup.q?rev=1584145&view=auto ============================================================================== --- hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_grant_table_dup.q (added) +++ hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_grant_table_dup.q Wed Apr 2 19:45:45 2014 @@ -0,0 +1,16 @@ +set hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory; +set hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateConfigUserAuthenticator; + +set user.name=user1; +-- current user has been set (comment line before the set cmd is resulting in parse error!!) + +CREATE TABLE tauth_gdup(i int); + +-- It should be possible to revert owners privileges +revoke SELECT ON tauth_gdup from user user1; + +show grant user user1 on table tauth_gdup; + +-- Owner already has all privileges granted, another grant would become duplicate +-- and result in error +GRANT INSERT ON tauth_gdup TO USER user1; Added: hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_grant_table_dup.q.out URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_grant_table_dup.q.out?rev=1584145&view=auto ============================================================================== --- hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_grant_table_dup.q.out (added) +++ hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_grant_table_dup.q.out Wed Apr 2 19:45:45 2014 @@ -0,0 +1,32 @@ +PREHOOK: query: -- current user has been set (comment line before the set cmd is resulting in parse error!!) + +CREATE TABLE tauth_gdup(i int) +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +POSTHOOK: query: -- current user has been set (comment line before the set cmd is resulting in parse error!!) + +CREATE TABLE tauth_gdup(i int) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@tauth_gdup +#### A masked pattern was here #### +revoke SELECT ON tauth_gdup from user user1 +PREHOOK: type: REVOKE_PRIVILEGE +PREHOOK: Output: default@tauth_gdup +#### A masked pattern was here #### +revoke SELECT ON tauth_gdup from user user1 +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Output: default@tauth_gdup +PREHOOK: query: show grant user user1 on table tauth_gdup +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user user1 on table tauth_gdup +POSTHOOK: type: SHOW_GRANT +default tauth_gdup user1 USER DELETE true -1 user1 +default tauth_gdup user1 USER INSERT true -1 user1 +default tauth_gdup user1 USER UPDATE true -1 user1 +#### A masked pattern was here #### +-- and result in error +GRANT INSERT ON tauth_gdup TO USER user1 +PREHOOK: type: GRANT_PRIVILEGE +PREHOOK: Output: default@tauth_gdup +FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Error granting privileges: InvalidObjectException(message:INSERT is already granted on table [default,tauth_gdup] by user1)