Github user linwen commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1074#discussion_r95103903
  
    --- Diff: src/backend/catalog/aclchk.c ---
    @@ -224,16 +224,17 @@ restrict_and_check_grant(bool is_grant, AclMode 
avail_goptions, bool all_privs,
         * If we found no grant options, consider whether to issue a hard error.
         * Per spec, having any privilege at all on the object will get you by
         * here.
    +    * Superusers or on QE bypass all permission checking.
         */
    -   if (avail_goptions == ACL_NO_RIGHTS)
    +   if (avail_goptions == ACL_NO_RIGHTS && GP_ROLE_EXECUTE != Gp_role)
        {
          if (enable_ranger && !fallBackToNativeCheck(objkind, objectId, 
grantorId)) {
            if (pg_rangercheck(objkind, objectId, grantorId,
                whole_mask | ACL_GRANT_OPTION_FOR(whole_mask),
                ACLMASK_ANY) != ACLCHECK_OK)
              aclcheck_error(ACLCHECK_NO_PRIV, objkind, objname);
          }
    -     else {
    +     else if (!superuser_arg(grantorId)){
    --- End diff --
    
    Is it necessary?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to