svc_run_selinux(8)

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

πŸ’… 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_t can be used to make the process type svc_run_t permissive. 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_t type, if you want to transition an executable to the svc_run_t domain.

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 the chcon command. If you want to permanently change the file context you need to use the semanage fcontext command. This will modify the SELinux labeling database. You will need to use restorecon to 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