From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Simplify calls of pg_class_aclcheck when multiple modes are used |
Date: | 2014-10-21 20:03:09 |
Message-ID: | 5446BBFD.80502@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 8/27/14 8:02 AM, Michael Paquier wrote:
> In a couple of code paths we do the following to check permissions on an
> object:
> if (pg_class_aclcheck(relid, userid, ACL_USAGE) != ACLCHECK_OK &&
> pg_class_aclcheck(relid, userid, ACL_UPDATE) != ACLCHECK_OK)
> ereport(ERROR, blah);
>
> Wouldn't it be better to simplify that with a single call of
> pg_class_aclcheck, gathering together the modes that need to be checked?
Yes, it's probably just an oversight.
While looking at this, I wrote a few tests cases for sequence
privileges, because that was not covered at all. That patch is attached.
That led me to discover this issue:
http://www.postgresql.org/message-id/5446B819.1020600@gmx.net
I'll wait for the resolution of that and then commit this.
Attachment | Content-Type | Size |
---|---|---|
sequence-privileges-tests.patch | text/x-diff | 4.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2014-10-21 20:21:00 | Re: Allow format 0000-0000-0000 in postgresql MAC parser |
Previous Message | Brightwell, Adam | 2014-10-21 19:49:50 | Re: Directory/File Access Permissions for COPY and Generic File Access Functions |