piranha_lvs_selinux(8)

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

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

okay so bestie, this is piranha_lvs_selinux(8) from the SELinux Policy piranha_lvs section of the manual β€” yes it's a whole section, we love that for us.


🌸 NAME

piranha_lvs_selinux β€” the Security Enhanced Linux Policy for the piranha_lvs processes. that's it, that's the vibe 🫢


✨ DESCRIPTION

so like, Security-Enhanced Linux secures the piranha_lvs processes via flexible mandatory access control. mandatory = not optional, no cap πŸ’…

your piranha_lvs processes execute with the piranha_lvs_t SELinux type. wanna check if you've got these processes running? just run the ps command with the -Z qualifier, easy.

for example:

ps -eZ | grep piranha_lvs_t

πŸšͺ ENTRYPOINTS

the piranha_lvs_t SELinux type can be entered via the piranha_lvs_exec_t file type β€” that's the door, that's the entrance, that's the moment πŸ¦‹

the default entrypoint paths for the piranha_lvs_t domain are literally just:

/usr/sbin/lvsd

πŸ‘‘ PROCESS TYPES

SELinux defines process types (domains) for each process running on the system. iconic behaviour honestly.

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_lvs policy is very flexible, allowing users to set up their piranha_lvs processes in as secure a method as possible. obsessed with the security 😌

the following process types are defined for piranha_lvs:

  • piranha_lvs_t
note: semanage permissive -a piranha_lvs_t can be used to make the process type piranha_lvs_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so it's chill about it but it's still watching. πŸ™ˆ

πŸŽ€ BOOLEANS

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

  • if you want to allow the piranha-lvs domain to connect to the network using TCP, you must turn on the piranha_lvs_can_network_connect boolean. disabled by default.
setsebool -P piranha_lvs_can_network_connect 1
  • 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
  • if you want to allow the system to run with NIS, you must turn on the nis_enabled boolean. disabled by default.
setsebool -P nis_enabled 1

πŸ“ MANAGED FILES

the SELinux process type piranha_lvs_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. quick reminder though β€” the process's UID still needs to have DAC permissions. SELinux can't fix that for you babes 😭

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_lvs_tmpfs_t

no default paths listed for this one bestie, she's just here πŸ’œ

piranha_lvs_var_run_t

/var/run/lvs.pid

piranha_pulse_tmpfs_t

again, no default paths listed β€” just vibes 🌈

root_t

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

πŸ—‚οΈ FILE CONTEXTS

SELinux requires files to have an extended attribute to define the file type. yes, files have aura now.

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_lvs policy is very flexible, allowing users to set up their piranha_lvs processes in as secure a method as possible. πŸ’…

⭐ STANDARD FILE CONTEXT

SELinux defines the file context types for piranha_lvs. 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_lvs_var_run_t '/srv/mypiranha_lvs_content(/.*)?'
restorecon -R -v /srv/mypiranha_lvs_content
note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlie πŸ’…

the following file types are defined for piranha_lvs:

piranha_lvs_exec_t

  • set files with the piranha_lvs_exec_t type if you want to transition an executable to the piranha_lvs_t domain.

piranha_lvs_tmpfs_t

  • set files with the piranha_lvs_tmpfs_t type if you want to store piranha lvs files on a tmpfs file system.

piranha_lvs_var_run_t

  • set files with the piranha_lvs_var_run_t type if you want to store the piranha lvs 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. so like, chcon is the temporary tattoo and semanage fcontext + restorecon is the real ink. periodt. πŸŽ€

πŸ› οΈ 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 the girlies who like clicking πŸ–±οΈβœ¨

🧚 AUTHOR

this manual page was auto-generated using sepolicy manpage. not me being auto-generated and still serving looks πŸ’€


πŸ” SEE ALSO

selinux(8), piranha_lvs(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8) β€” go read those too, iykyk 🫢


okay that's the whole page bestie, you ate that πŸ’– this cutie was brought to you by the piranha_lvs source, dated 26-10-23, and it's all filed under piranha_lvs_selinux(8) β€” mwah πŸ’‹

πŸ“¦ where this page comes from