SELinuxProject / selinux

This is the upstream repository for the Security Enhanced Linux (SELinux) userland libraries and tools. The software provided by this project complements the SELinux features integrated into the Linux kernel and is used by Linux distributions. All bugs and patches should be submitted to selinux@vger.kernel.org
Other
1.35k stars 360 forks source link

How to copy a selinux domain #324

Open daipipiwan12 opened 3 years ago

daipipiwan12 commented 3 years ago

I have a domain, like type AA with some MAC rules. How can I simply clone type AA? I need a new type BB have same MAC rules with type AA. I have to add some additional rules to type BB. Which key word can I use to do this clone job?

ghost commented 3 years ago

you would associate the shared rules with one or more type attributes and then you would associate the type attributes with any types you want to associate with the rules.

https://github.com/SELinuxProject/selinux-notebook/blob/main/src/type_statements.md#typeattribute