What is typealias and typeattribute
Hi,
I noticed some sentence structures not to understand the meaning well, when I read policy_parse.y in checkpolicy.tgz.
I think we can replace 'typealias' and 'typeattribute' with 'type ...' sentence structure completely.
So, It's not writen in 'Configuring the SELinux Policy', orz.
Is it historical syntax? or does it have another purpose? Please tell me.
Thanks.
Signature · 6 lines
KaiGai Kohei <[email protected]> -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 9 lines · KaiGai Kohei
I noticed some sentence structures not to understand the meaning well, when I read policy_parse.y in checkpolicy.tgz.
I think we can replace 'typealias' and 'typeattribute' with 'type ...' sentence structure completely.
So, It's not writen in 'Configuring the SELinux Policy', orz.Is it historical syntax? or does it have another purpose? Please tell me.
Typealias and typeattribute are recent additions, added since that document was written. The original syntax only allowed applying an alias or an attribute on the type statement, as described in that doc. For example:
type etc_dhcp_t alias { etc_dhcpc_t etc_dhcpd_t }, file_type, sysadmfile;
However this is problematic if this is type statement is inside a macro, since you might not want to add aliases and attributes in general, or there are many types declared in the macro. So typealias and typeattribute were created so aliases and attributes could be added outside the type statement. If we wanted to add an alias and an attribute to a type created by the tmpfs_domain macro, it would look like this:
tmpfs_domain(foo)
typealias foo_tmpfs_t alias foo_shm_t;
typeattribute foo_tmpfs_t myattribute;
We do want to keep both syntaxes, since both are used in the policy.
Signature · 10 lines
Chris PeBenito Tresys Technology, LLC (410) 290-1411 x150 -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 3 lines · Christopher J. PeBenito
Typealias and typeattribute are recent additions, added since that document was written. The original syntax only allowed applying an alias or an attribute on the type statement, as described in that doc.
Note btw that both the module and the policy technical reports have been updated in our sourceforge CVS tree to reflect the current state of SELinux and the updated reports will be included in the next release on nsa.gov.
Signature · 8 lines
Stephen Smalley <[email protected]> National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Hi, Thankd for your comments.
I understood your exposition.
Indeed, such a syntax may not have enough compatibility for some macros.
The triger of this thread was a simple curiosity about the knowledge of the syntax for policy configuration, merely.
I don't say about the necessity of those sentence structure. Sorry, if my expression make you misunderstanding.
Thanks.
Quoted 28 lines · Christopher J. PeBenito
Quoted 9 lines · KaiGai Kohei
I noticed some sentence structures not to understand the meaning well, when I read policy_parse.y in checkpolicy.tgz.
I think we can replace 'typealias' and 'typeattribute' with 'type ...' sentence structure completely.
So, It's not writen in 'Configuring the SELinux Policy', orz.Is it historical syntax? or does it have another purpose? Please tell me.
Typealias and typeattribute are recent additions, added since that document was written. The original syntax only allowed applying an alias or an attribute on the type statement, as described in that doc. For example:
type
etc_dhcp_talias {etc_dhcpc_tetc_dhcpd_t},file_type, sysadmfile;However this is problematic if this is type statement is inside a macro, since you might not want to add aliases and attributes in general, or there are many types declared in the macro. So typealias and typeattribute were created so aliases and attributes could be added outside the type statement. If we wanted to add an alias and an attribute to a type created by the
tmpfs_domainmacro, it would look like this:
Quoted 5 lines
tmpfs_domain(foo)
typealiasfoo_tmpfs_taliasfoo_shm_t;
typeattributefoo_tmpfs_tmyattribute;We do want to keep both syntaxes, since both are used in the policy.
--
KaiGai Kohei <[email protected]>
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.