SELinuxProject / selinux-notebook

The SELinux Notebook
Other
546 stars 106 forks source link

Q: looking for documentation on the reference policy #19

Closed freedom1b2830 closed 1 year ago

freedom1b2830 commented 1 year ago

I want to write a library to read such rules. You can provide a detailed example of rules (te if fc) with all sorts of syntax:

optional_policy(`
    dbus_system_bus_client(kde_t)
    dbus_connect_system_bus(kde_t)
')
optional_policy(`
    gen_require(`
        type user_t;
        role user_r;
    ')
    kde_run(user_t, user_r)
')

with monolithic syntax:

require {
         type discord_t;
         class lnk_file read;
}

With deprecated macros.

With obsolete keywords

dominance { role message_filter_r { role unconfined_r };}

Complete example for MLS MCS

And other things

pcmoore commented 1 year ago

Hi @freedom1b2830, the Reference Policy section is likely the closest you will get outside the sources themselves: