setfiles_mac_selinux(8)

πŸ“¦
version 20250627+git412.dbf877ab7 Β· 7 versions
, in opensuse-leap 16.0

πŸ’… 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_t can be used to make the process type setfiles_mac_t permissive. 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 the deny_execmem boolean. Disabled by default.
setsebool -P deny_execmem 1
  • mmap_low_allowed β€” if you want to control the ability to mmap a low area of the address space, as configured by /proc/sys/vm/mmap_min_addr, you must turn on the mmap_low_allowed boolean. Disabled by default.
setsebool -P mmap_low_allowed 1
  • secure_mode_insmod β€” if you want to disable kernel module loading, you must turn on the secure_mode_insmod boolean. 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 the selinuxuser_execheap boolean. 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 the selinuxuser_execstack boolean. 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 fcontext can also be used to manipulate default file context mappings.
  • semanage permissive can also be used to manipulate whether or not a process type is permissive.
  • semanage module can also be used to enable/disable/install/remove policy modules.
  • semanage boolean can also be used to manipulate the booleans.
  • system-config-selinux is 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