openct_selinux(8)

πŸ“¦ version 38.1.87, in centos-stream 9

πŸ’– openct_selinux(8) β€” the SELinux glow-up for your openct processes πŸ’–

okay bestie, so this is openct_selinux(8), straight out of the SELinux Policy openct collection. sit down, grab a strawberry drink πŸ“, and let's get into it.


✨ NAME ✨

openct_selinux β€” the Security Enhanced Linux policy situation for your openct processes. that's it, that's the whole vibe. 🫢


🌸 DESCRIPTION 🌸

so basically, Security-Enhanced Linux keeps your openct processes safe and sound via flexible mandatory access control. like a bouncer at the club, but for syscalls. πŸ’…

your openct processes run with the openct_t SELinux type. wanna check if you've got any of those running? run the ps command with the -Z qualifier, easy:

ps -eZ | grep openct_t

that's it. go off, detective. πŸ”


πŸ¦‹ ENTRYPOINTS πŸ¦‹

the openct_t SELinux type can be entered via the openct_exec_t file type. no cap, that's the door. πŸšͺ

the default entrypoint paths for the openct_t domain are literally these:

/usr/sbin/ifdhandler, /usr/sbin/openct-control

memorize them, bestie, they matter. πŸŽ€


πŸ‘‘ PROCESS TYPES πŸ‘‘

SELinux defines process types (aka domains) for every single process running on the system. iconic behavior honestly.

you can peep the context of a process using the -Z option to ps.

policy governs the access that confined processes have to files. the SELinux openct policy is very flexible, letting users set up their openct processes in as secure a method as possible. slay.

the following process types are defined for openct:

openct_t

Note: semanage permissive -a openct_t can be used to make the process type openct_t permissive. SELinux doesn't deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it's chill but it's still watching you. πŸ‘€ no sneaky behavior.

⭐ BOOLEANS ⭐

SELinux policy is customizable based on least access required. the openct policy is extremely flexible and has several booleans that let you manipulate the policy and run openct with the tightest access possible. main character energy fr fr. πŸ‘‘

if you want to dontaudit all daemons scheduling requests (setsched, sys_nice), you must turn on the daemons_dontaudit_scheduling boolean. enabled by default.

setsebool -P daemons_dontaudit_scheduling 1

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

two booleans, both already on, we love a low-effort win. πŸ’…βœ¨


πŸŽ€ MANAGED FILES πŸŽ€

the SELinux process type openct_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. and babes, remember: the process's UID still needs to have DAC permissions. SELinux isn't doing your whole job for you. 😭

cluster_conf_t

/etc/cluster(/.*)?

cluster_var_lib_t

/var/lib/pcsd(/.*)?
/var/lib/cluster(/.*)?
/var/lib/openais(/.*)?
/var/lib/pengine(/.*)?
/var/lib/corosync(/.*)?
/usr/lib/heartbeat(/.*)?
/var/lib/heartbeat(/.*)?
/var/lib/pacemaker(/.*)?

cluster_var_run_t

/var/run/crm(/.*)?
/var/run/cman_.*
/var/run/rsctmp(/.*)?
/var/run/aisexec.*
/var/run/heartbeat(/.*)?
/var/run/pcsd-ruby.socket
/var/run/corosync-qnetd(/.*)?
/var/run/corosync-qdevice(/.*)?
/var/run/pcsd.socket
/var/run/corosync.pid
/var/run/cpglockd.pid
/var/run/rgmanager.pid
/var/run/cluster/rgmanager.sk

openct_var_run_t

/var/run/openct(/.*)?

root_t

/sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
/
/initrd

usbfs_t

(no paths listed, it's mysterious like that πŸ•΅οΈβ€β™€οΈ)


🌈 FILE CONTEXTS 🌈

SELinux requires files to have an extended attribute to define the file type. so like, files have lore now.

you can see the context of a file using the -Z option to ls.

policy governs the access that confined processes have to these files. the SELinux openct policy is very flexible, allowing users to set up their openct processes in as secure a method as possible. we stan. 🫢

πŸ’œ STANDARD FILE CONTEXT πŸ’œ

SELinux defines the file context types for openct. if you wanted to store files with these types in different paths, you need to execute the semanage command to specify alternate labeling, and then use restorecon to put the labels on disk.

semanage fcontext -a -t openct_var_run_t '/srv/myopenct_content(/.*)?'
restorecon -R -v /srv/myopenct_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies stay winning. 🧚

the following file types are defined for openct:

openct_exec_t

  • set files with the openct_exec_t type if you want to transition an executable to the openct_t domain.

paths:

/usr/sbin/ifdhandler, /usr/sbin/openct-control

openct_initrc_exec_t

  • set files with the openct_initrc_exec_t type if you want to transition an executable to the openct_initrc_t domain.

openct_var_run_t

  • set files with the openct_var_run_t type if you want to store the openct files under the /run or /var/run directory.
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. don't skip the restorecon step, bestie, that's how you end up confused and crying. 😭

πŸ”₯ 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, a GUI. for when the terminal is doing too much. πŸ’…


πŸ’€ AUTHOR πŸ’€

this manual page was auto-generated using sepolicy manpage. a robot wrote it, I just gave it a personality. πŸ™ˆ


🌟 SEE ALSO 🌟

selinux(8), openct(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)


and that's the whole page, bestie! you ate that. this one's from the openct fam, dated 26-10-23 β€” go forth and label responsibly. periodt. πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from