How to get the SELinux Type Enforcement (.te) file which contains all rules regarding certain type? [migrated]

I would like to change permissions of certain directories(with user_home_t type) to further disallow guest_t to perform some actions on them.
I thought to do so by creating new type (protected_t) and then not allowing guest_t the actions I… Continue reading How to get the SELinux Type Enforcement (.te) file which contains all rules regarding certain type? [migrated]

How to only allow whitelisted processes to access a certain file using SElinux?

Let’s say you have a important file/folder, and want to only allow certain processes (based on process name, or its corresponding ELF file on the disk, or the digital signature of the corresponding ELF, etc) to read/write to that file. How… Continue reading How to only allow whitelisted processes to access a certain file using SElinux?

Secure way to run a linux binary which needs access to ressources only available to root?

As a developer, I ask how to approach security concerns regarding permissions of a binary which needs access to resources only available to root users.
For example, let’s think of a simple tool which creates a virtual device or executes co… Continue reading Secure way to run a linux binary which needs access to ressources only available to root?