Fix the bug of cannot start/stop master successfully if ranger is enable and with a wrong RPS address
@@ -2735,6 +2735,11 @@ bool fallBackToNativeCheck(AclObjectKind objkind, Oid obj_oid, Oid roleid)
{
return true;
}
+ else if (obj_oid == PG_PUBLIC_NAMESPACE && superuser())
+ {
+ /* superuser's access to PUBLIC */
+ return true;
+ }
}
else if (objkind == ACL_KIND_PROC)
{
@@ -2848,7 +2853,8 @@ pg_rangercheck(AclObjectKind objkind, Oid object_oid, Oid roleid,
List* actions = getActionName(mask);
bool isAll = (how == ACLMASK_ALL) ? true: false;
- elog(DEBUG3, "ranger acl check kind: %d, object name: %s, role: %s, mask: %u\n", objkind, objectname, rolename, mask);
+ elog(DEBUG3, "ranger acl check kind: %d, object name: %s, object oid:%d, role: %s, mask: %u\n",
+ objkind, objectname, object_oid, rolename, mask);
List *resultargs = NIL;
RangerPrivilegeResults *aclresult = (RangerPrivilegeResults *) palloc(sizeof(RangerPrivilegeResults));
