setfiles_mac_selinux(8)
π
setfiles_mac_selinux β your girl's guide to the SELinux policy for setfiles_mac
okay so this is setfiles_mac_selinux(8), bestie β it's the manual page for the SELinux Policy that wraps the setfiles_mac processes. pull up a chair, we're getting into it π
β¨ NAME β¨
setfiles_mac_selinux β Security Enhanced Linux Policy for the setfiles_mac processes. that's the whole vibe. it's the policy page, it's iconic, let's go πΈ
π¦ DESCRIPTION π¦
Security-Enhanced Linux secures the setfiles_mac processes via flexible mandatory access control. flexible! mandatory! access control! the way that it just does that π
The setfiles_mac processes execute with the setfiles_mac_t SELinux type. you can check if you've got these processes running by executing the ps command with the -Z qualifier.
For example:
ps -eZ | grep setfiles_mac_t
literally just run it, it's giving "main character energy" for your process table π₯
πͺ ENTRYPOINTS πͺ
The setfiles_mac_t SELinux type can be entered via the setfiles_exec_t file type. that's the doorway, that's the portal, that's the way in π«Ά
The default entrypoint paths for the setfiles_mac_t domain are the following:
/usr/bin/setfiles.*, /usr/bin/restorecon
two paths, no cap, both of them matter π
π PROCESS TYPES π
SELinux defines process types (domains) for each process running on the system. yes, every process. it's a lot. she's thorough. π
You can see the context of a process using the -Z option to ps.
Policy governs the access confined processes have to files. SELinux setfiles_mac policy is very flexible allowing users to setup their setfiles_mac processes in as secure a method as possible. secure as possible, periodt. π
The following process types are defined for setfiles_mac:
setfiles_mac_t
Note:semanage permissive -a setfiles_mac_tcan be used to make the process typesetfiles_mac_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, she's not gonna stop you, but she's absolutely gonna write it down in her notes ππ
π BOOLEANS π
SELinux policy is customizable based on least access required. setfiles_mac policy is extremely flexible and has several booleans that allow you to manipulate the policy and run setfiles_mac with the tightest access possible. tightest access possible, iykyk β¨
deny_execmemβ if you want to deny user domains applications to map a memory region as both executable and writable, this is dangerous and the executable should be reported in bugzilla, you must turn on thedeny_execmemboolean. Disabled by default.
setsebool -P deny_execmem 1
mmap_low_allowedβ if you want to control the ability tommapa low area of the address space, as configured by/proc/sys/vm/mmap_min_addr, you must turn on themmap_low_allowedboolean. Disabled by default.
setsebool -P mmap_low_allowed 1
secure_mode_insmodβ if you want to disable kernel module loading, you must turn on thesecure_mode_insmodboolean. Disabled by default.
setsebool -P secure_mode_insmod 1
selinuxuser_execheapβ if you want to allow unconfined executables to make their heap memory executable. doing this is a really bad idea. probably indicates a badly coded executable, but could indicate an attack. this executable should be reported in bugzilla, you must turn on theselinuxuser_execheapboolean. Disabled by default.
setsebool -P selinuxuser_execheap 1
selinuxuser_execstackβ if you want to allow unconfined executables to make their stack executable. this should never, ever be necessary. probably indicates a badly coded executable, but could indicate an attack. this executable should be reported in bugzilla, you must turn on theselinuxuser_execstackboolean. Disabled by default.
setsebool -P selinuxuser_execstack 1
like, genuinely β if you're flipping any of these on, report the executable in bugzilla first. the page says so twice. it's not being subtle π
ποΈ MANAGED FILES ποΈ
The SELinux process type setfiles_mac_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. note the processes UID still need to have DAC permissions β SELinux is not out here overriding your regular permissions, she's doing her own layer π§
file_type
that's... all files on the system. every one. the whole thing. she said "i'll take the lot" πβ¨
π οΈ COMMANDS π οΈ
semanage fcontextcan also be used to manipulate default file context mappings.semanage permissivecan also be used to manipulate whether or not a process type is permissive.semanage modulecan also be used to enable/disable/install/remove policy modules.semanage booleancan also be used to manipulate the booleans.system-config-selinuxis a GUI tool available to customize SELinux policy settings. (a GUI!! for the girlies who like a little clicky-click π±οΈπ)
π AUTHOR π
This manual page was auto-generated using sepolicy manpage . β yes, the robots wrote it, and honestly? they ate. π€π
β SEE ALSO β
selinux(8), setfiles_mac(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)
go read them, they're all lowkey bangers π
and that's the page, bestie π«Ά β this was setfiles_mac, dated 26-10-06, from the setfiles_mac_selinux(8) manual, generated back in the day and still serving looks. stay confined, stay flexible, and don't make your heap executable. mwah ππ
π¦ where this page comes from
- opensuse-leap 16.0: selinux-policy-doc 20250627+git412.dbf877ab7-160000.1.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms