Re: Updates of SE-PostgreSQL 8.4devel patches (r1324)

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>
Cc: KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>, pgsql-hackers(at)postgresql(dot)org, tgl(at)sss(dot)pgh(dot)pa(dot)us, simon(at)2ndQuadrant(dot)com
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1324)
Date: 2008-12-19 00:38:58
Message-ID: 200812190038.mBJ0cwQ13745@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Ah, very interesting. Thanks.

---------------------------------------------------------------------------

KaiGai Kohei wrote:
> > 1034 and 25 are the oids for 'acllist' and 'text' and they are being
> > added to system tables. Are you saying system tables don't use
> > pg_security but other tables do?
>
> It means users can refer the "security_acl" and "security_label",
> as if they have proper types. However, in actually, they are stroed
> as security identifiers.
>
> When user refers "security_acl", the patched heap_getsysattr() invokes
> rowaclHeapGetSecurityAclSysattr() to translate the security identifier
> of Row-level ACLs into an array of ACLs. User will see the translated
> representation, as if there is a variable length array, not an oid.
>
> The rowaclHeapGetSecurityAclSysattr() fetch a tuple for the given
> security identifier from pg_security. It contains a text representation
> of ACLs, so the function exchange it into Acl *.
>
> rowaclHeapGetSecurityAclSysattr()
> -> rowaclSidToSecurityAcl()
> -> pgaceLookupSecurityLabel() ... It fetch a tuple from pg_security
> -> rawAclTextToAclArray() ... It translate from TEXT -> AclItem[]
>
> > I do see pg_security being defined:
> >
> > + CATALOG(pg_security,3400) BKI_SHARED_RELATION
> > + {
> > + text seclabel; /* text representation of security label */
> > + } FormData_pg_security;
> >
> > and I assume both security columns reference that.
>
> Yes, AclItem[] is internally translated into text representation to store
> it on pg_security.
>
> Thanks,
> --
> KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-12-19 00:42:23 Re: rmgr hooks (v2)
Previous Message Bruce Momjian 2008-12-19 00:38:22 Re: Summary: changes needed in function defaults behavior