svc_run_selinux(8)
π svc_run_selinux(8) β like, the whole SELinux glow-up for svc_run β¨
okay bestie, so this is the svc_run_selinux page from the SELinux Policy svc_run manual, and it's genuinely the whole vibe check for how SELinux keeps your svc_run processes on a leash π
πΈ NAME πΈ
svc_run_selinux β the Security Enhanced Linux Policy for the svc_run processes. yeah. that's the whole name. slay.
π¦ DESCRIPTION π¦
So Security-Enhanced Linux secures the svc_run processes via flexible mandatory access control. read that again. flexible AND mandatory. main character energy fr fr π
The svc_run processes execute with the svc_run_t SELinux type. Wanna check if you've got these processes running? literally just run the ps command with the -Z qualifier π«Ά
For example:
ps -eZ | grep svc_run_t
like, that's it. that's the whole trick. iykyk β¨
πͺ ENTRYPOINTS πͺ
The svc_run_t SELinux type can be entered via the svc_run_exec_t file type. it's giving VIP door π
The default entrypoint paths for the svc_run_t domain are the following:
/var/service/.*/run.*, /var/service/.*/log/run,
/var/qmail/supervise/.*/run, /var/qmail/supervise/.*/log/run,
/usr/bin/envdir, /usr/bin/fghack, /usr/bin/setlock, /var/axfrdns/run,
/var/tinydns/run, /usr/bin/pgrphack, /var/dnscache/run,
/usr/bin/envuidgid, /usr/bin/setuidgid, /usr/bin/softlimit,
/var/axfrdns/log/run, /var/tinydns/log/run, /var/dnscache/log/run
π PROCESS TYPES π
SELinux defines process types (domains) for each process running on the system. yes. every single one. obsessed π
You can see the context of a process using the -Z option to ps π
Policy governs the access confined processes have to files. The SELinux svc_run policy is very flexible allowing users to setup their svc_run processes in as secure a method as possible. tightest leash possible but make it cute π
The following process types are defined for svc_run:
svc_run_t
Note:semanage permissive -a svc_run_tcan be used to make the process typesvc_run_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it stops yelling at you but it's still watching ππ
π§ BOOLEANS π§
SELinux policy is customizable based on least access required. The svc_run policy is extremely flexible and has several booleans that allow you to manipulate the policy and run svc_run with the tightest access possible. no cap, this is how you fine-tune the whole thing β¨
If you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default.
setsebool -P fips_mode 1
look at you go, flipping booleans like a boss π
π FILE CONTEXTS π
SELinux requires files to have an extended attribute to define the file type. like a little name tag but for security π·οΈ
You can see the context of a file using the -Z option to ls π
Policy governs the access confined processes have to these files. The SELinux svc_run policy is very flexible allowing users to setup their svc_run processes in as secure a method as possible. (yes, same energy as before. it's a whole theme π
)
π STANDARD FILE CONTEXT π
SELinux defines the file context types for the svc_run. If you wanted to store files with these types in a different paths, you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk. relabeling era π¦
semanage fcontext -a -t svc_run_exec_t '/srv/svc_run/content(/.*)?'
restorecon -R -v /srv/mysvc_run_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies rise πΈ
The following file types are defined for svc_run:
β svc_run_exec_t
- Set files with the
svc_run_exec_ttype, if you want to transition an executable to thesvc_run_tdomain.
Paths:
/var/service/.*/run.*, /var/service/.*/log/run,
/var/qmail/supervise/.*/run, /var/qmail/supervise/.*/log/run,
/usr/bin/envdir, /usr/bin/fghack, /usr/bin/setlock,
/var/axfrdns/run, /var/tinydns/run, /usr/bin/pgrphack,
/var/dnscache/run, /usr/bin/envuidgid, /usr/bin/setuidgid,
/usr/bin/softlimit, /var/axfrdns/log/run, /var/tinydns/log/run,
/var/dnscache/log/run
Note: File context can be temporarily modified with thechconcommand. If you want to permanently change the file context you need to use thesemanage fcontextcommand. This will modify the SELinux labeling database. You will need to userestoreconto apply the labels. temporary vs permanent bestie, know the difference ππ₯
π οΈ 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. yes bestie, a whole GUI. point and click era π±οΈβ¨
βοΈ AUTHOR βοΈ
This manual page was auto-generated using sepolicy manpage. the bot did its thing π€π
π SEE ALSO π
selinux(8), svc_run(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)
go read them. all of them. i'll wait π«Ά
and that's the whole page!! brought to you by svc_run, version 26-10-06 β mwah, ily, go label some files responsibly πππ¦πΈπ
π¦ 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