piranha_fos_selinux(8)

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

πŸ’… piranha_fos_selinux β€” the manual page, but make it make sense

okay bestie, so this is the piranha_fos_selinux(8) page β€” yes, that's the manual name, we're not copying the whole header line, you're welcome β€” and it's all about the SELinux policy for the piranha_fos processes. let's get into it ✨


🌸 NAME

piranha_fos_selinux β€” the Security Enhanced Linux Policy for the piranha_fos processes. that's it, that's the name, slay.


πŸ¦‹ DESCRIPTION

so, Security-Enhanced Linux secures the piranha_fos processes via flexible mandatory access control. yes, mandatory. it's not asking, it's telling πŸ’…

the piranha_fos processes execute with the piranha_fos_t SELinux type. you wanna check if you've got these processes running? run the ps command with the -Z qualifier, like this:

ps -eZ | grep piranha_fos_t

lowkey iconic, highkey useful.


πŸŽ€ ENTRYPOINTS

the piranha_fos_t SELinux type can be entered via the piranha_fos_exec_t file type. that's the door, bestie πŸšͺ✨

the default entrypoint paths for the piranha_fos_t domain are:

/usr/sbin/fos

one path. one vibe. periodt.


πŸ‘‘ PROCESS TYPES

SELinux defines process types (domains) for each process running on the system. so like, everybody gets a little label, cute.

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 piranha_fos policy is very flexible, allowing users to setup their piranha_fos processes in as secure a method as possible. bestie, it's giving "customizable but make it safe" πŸ”₯

the following process types are defined for piranha_fos:

piranha_fos_t
πŸ’€ Note: semanage permissive -a piranha_fos_t can be used to make the process type piranha_fos_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it's not a free pass, the receipts are still there 😭

🧚 BOOLEANS

SELinux policy is customizable based on least access required β€” little-to-no access, our beloved. piranha_fos policy is extremely flexible and has several booleans that allow you to manipulate the policy and run piranha_fos with the tightest access possible. snug. secure.✨

  • daemons_dontaudit_scheduling β€” if you want to dontaudit all daemons scheduling requests (setsched, sys_nice), you must turn on this boolean. Enabled by default.
setsebool -P daemons_dontaudit_scheduling 1
  • fips_mode β€” if you want to allow all domains to execute in fips_mode, you must turn on this boolean. Enabled by default.
setsebool -P fips_mode 1
  • nis_enabled β€” if you want to allow system to run with NIS, you must turn on this boolean. Disabled by default. (so flip it if you need it, bestie πŸ™ˆ)
setsebool -P nis_enabled 1

πŸ“ MANAGED FILES

the SELinux process type piranha_fos_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. 🫢 and hey β€” note that the processes UID still need to have DAC permissions. SELinux isn't doing your whole job for you, sorry.

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

krb5_host_rcache_t

/var/tmp/krb5_0.rcache2
/var/cache/krb5rcache(/.*)?
/var/tmp/nfs_0
/var/tmp/DNS_25
/var/tmp/host_0
/var/tmp/imap_0
/var/tmp/HTTP_23
/var/tmp/HTTP_48
/var/tmp/ldap_55
/var/tmp/ldap_487
/var/tmp/ldapmap1_0

piranha_fos_tmpfs_t

(this one's got no default paths listed, bestie β€” it just vibes) πŸ¦‹

piranha_fos_var_run_t

/var/run/fos.pid

root_t

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

🌈 FILE CONTEXTS

SELinux requires files to have an extended attribute to define the file type. yes, every file's gotta have its little label, it's giving ✨personalized✨

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 piranha_fos policy is very flexible, allowing users to setup their piranha_fos processes in as secure a method as possible. (we love a consistent message, fr fr)

⭐ STANDARD FILE CONTEXT

SELinux defines the file context types for the piranha_fos. so 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. like so:

semanage fcontext -a -t piranha_fos_var_run_t '/srv/mypiranha_fos_content(/.*)?'
restorecon -R -v /srv/mypiranha_fos_content
πŸ’– Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies, rise.

the following file types are defined for piranha_fos:

  • piranha_fos_exec_t β€” set files with the piranha_fos_exec_t type, if you want to transition an executable to the piranha_fos_t domain.
  • piranha_fos_tmpfs_t β€” set files with the piranha_fos_tmpfs_t type, if you want to store piranha fos files on a tmpfs file system.
  • piranha_fos_var_run_t β€” set files with the piranha_fos_var_run_t type, if you want to store the piranha fos 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. temporary vs permanent, know the difference bestie, it WILL come up πŸ’€

πŸ’œ COMMANDS

okay so here's the toolkit, bookmark these:

  • 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 buttons πŸŽ€)

🌸 AUTHOR

This manual page was auto-generated using sepolicy manpage. yes, a robot wrote it, and honestly? ate.


🌟 SEE ALSO

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


and that's the tea, bestie 🫢 this little number is piranha_fos, dated 26-10-23, living in piranha_fos_selinux(8) β€” go forth and label responsibly πŸ’…βœ¨

πŸ“¦ where this page comes from