qatlib_selinux(8)

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

πŸ’… qatlib_selinux(8) β€” the SELinux policy for qatlib, bestie edition

okay so hi!! 🫢 you've landed on the manual page for qatlib_selinux, and honestly? it's giving "niche but important." this is the SELinux Policy page for the qatlib processes, and we're gonna walk through it together, no cap.


✨ NAME ✨

qatlib_selinux β€” Security Enhanced Linux Policy for the qatlib processes 🌸


πŸ¦‹ DESCRIPTION πŸ¦‹

Security-Enhanced Linux secures the qatlib processes via flexible mandatory access control. that's the whole vibe β€” SELinux is the friend who checks your outfit before you leave the house, except the outfit is file access permissions.

the qatlib processes execute with the qatlib_t SELinux type. you can check if you have these processes running by executing the ps command with the -Z qualifier.

for example:

ps -eZ | grep qatlib_t

literally that easy. πŸ’–


πŸŽ€ ENTRYPOINTS πŸŽ€

the qatlib_t SELinux type can be entered via the qatlib_exec_t file type.

the default entrypoint paths for the qatlib_t domain are the following:

/usr/bin/qatmgr, /usr/bin/qat_init.sh

those two are the main characters of the entrypoint world, periodt. πŸ‘‘


πŸ”₯ PROCESS TYPES πŸ”₯

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

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

Policy governs the access confined processes have to files. SELinux qatlib policy is very flexible, allowing users to setup their qatlib processes in as secure a method as possible.

the following process types are defined for qatlib:

qatlib_t
note: semanage permissive -a qatlib_t can be used to make the process type qatlib_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like… it stops blocking, but it absolutely still talks about you behind your back. πŸ’€

🌈 BOOLEANS 🌈

SELinux policy is customizable based on least access required. qatlib policy is extremely flexible and has several booleans that allow you to manipulate the policy and run qatlib with the tightest access possible.

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 disable kernel module loading, you must turn on the secure_mode_insmod boolean. disabled by default.

setsebool -P secure_mode_insmod 1

three booleans, three little switches, and yes you do need to know all of them. iykyk. 🧚


πŸ“ MANAGED FILES πŸ“

the SELinux process type qatlib_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. note that the process's UID still needs to have DAC permissions β€” SELinux isn't out here overriding the classics.

  • 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
/run/crm(/.*)?
/run/cman_.*
/run/rsctmp(/.*)?
/run/aisexec.*
/run/heartbeat(/.*)?
/run/pcsd-ruby.socket
/run/corosync-qnetd(/.*)?
/run/corosync-qdevice(/.*)?
/run/pcsd.socket
/run/corosync.pid
/run/cpglockd.pid
/run/rgmanager.pid
/run/cluster/rgmanager.sk
  • qatlib_var_run_t
/run/qat/qatmgr.pid
  • root_t
/sysroot/.aleph-version.json
/sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
/
/initrd
/var/lib/ntp
  • sysfs_t
/sys(/.*)?

that's a lot of nesting but it's giving organized. we love a structured bestie. πŸ’…


πŸ’œ FILE CONTEXTS πŸ’œ

SELinux requires files to have an extended attribute to define the file type.

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

Policy governs the access confined processes have to these files. SELinux qatlib policy is very flexible, allowing users to setup their qatlib processes in as secure a method as possible.

⭐ STANDARD FILE CONTEXT ⭐

SELinux defines the file context types for the qatlib, and 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 qatlib_exec_t '/srv/qatlib/content(/.*)?'
restorecon -R -v /srv/myqatlib_content
note: SELinux often uses regular expressions to specify labels that match multiple files. so don't be shocked when one little pattern catches a whole friend group. πŸ™ˆ

the following file types are defined for qatlib:

  • qatlib_conf_t β€” set files with the qatlib_conf_t type if you want to treat the files as qatlib configuration data, usually stored under the /etc directory.
  • qatlib_exec_t β€” set files with the qatlib_exec_t type if you want to transition an executable to the qatlib_t domain.

Paths:

/usr/bin/qatmgr, /usr/bin/qat_init.sh
  • qatlib_unit_file_t β€” set files with the qatlib_unit_file_t type if you want to treat the files as qatlib unit content.
  • qatlib_var_run_t β€” set files with the qatlib_var_run_t type if you want to store the qatlib 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, bestie β€” know the difference or you'll be redoing this forever. 😭

🫢 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.

that's your whole toolkit, go be iconic with it. πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

this manual page was auto-generated using sepolicy manpage. (yes, a robot wrote it. and it ate. ✨)


🌸 SEE ALSO 🌸

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


and that's the whole page!! this one's from qatlib, version 26-10-06, dated qatlib β€” mwah, slay, go label some files. πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from