blktap_selinux(8)
πΈ NAME πΈ
okay so this is blktap_selinux(8), the manual page for the SELinux policy that handles the blktap processes π β and yes, the manual name is literally blktap_selinux(8), we're folding that in right at the top bestie β¨.
π DESCRIPTION π
Security-Enhanced Linux secures the blktap processes via flexible mandatory access control. That's the whole vibe: SELinux is out here doing mandatory access control, and it's flexible about it π«.
The blktap processes execute with the blktap_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 blktap_t
π¦ ENTRYPOINTS π¦
The blktap_t SELinux type can be entered via the blktap_exec_t file type.
The default entrypoint paths for the blktap_t domain are the following:
/usr/bin/tapdisk/usr/bin/blktapctrl
π 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 blktap policy is very flexible allowing users to setup their blktap processes in as secure a method as possible.
The following process types are defined for blktap:
blktap_t
Note:semanage permissive -a blktap_tcan be used to make the process typeblktap_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. π«Ά
β¨ BOOLEANS β¨
SELinux policy is customizable based on least access required. blktap policy is extremely flexible and has several booleans that allow you to manipulate the policy and run blktap with the tightest access possible. Slay, least privilege π .
fips_modeβ if you want to allow all domains to execute infips_mode, you must turn on thefips_modeboolean. Enabled by default.
setsebool -P fips_mode 1
xend_run_blktapβ if you want to allowxendto runblktapctrl/tapdisk. Not required if using dedicated logical volumes for disk images, you must turn on thexend_run_blktapboolean. Enabled by default.
setsebool -P xend_run_blktap 1
π 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 blktap policy is very flexible allowing users to setup their blktap processes in as secure a method as possible.
π STANDARD FILE CONTEXT π
SELinux defines the file context types for the blktap, 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.
semanage fcontext -a -t blktap_exec_t '/srv/blktap/content(/.*)?'
restorecon -R -v /srv/myblktap_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlie behavior, honestly πΈ.
The following file types are defined for blktap:
blktap_exec_tβ set files with theblktap_exec_ttype, if you want to transition an executable to theblktap_tdomain.
Paths: /usr/bin/tapdisk, /usr/bin/blktapctrl
blktap_var_run_tβ set files with theblktap_var_run_ttype, if you want to store the blktap files under the/runor/var/rundirectory.
Note: File context can be temporarily modified with thechconcommand. If you want to permanently change the file context you need to use thesemanage fcontextcommand. This will modify the SELinux labeling database. You will need to userestoreconto apply the labels. no cap, permanent labels need the full pipeline π§.
π COMMANDS π
semanage fcontextcan also be used to manipulate default file context mappings.semanage permissivecan also be used to manipulate whether or not a process type is permissive.semanage modulecan also be used to enable/disable/install/remove policy modules.semanage booleancan also be used to manipulate the booleans.system-config-selinuxis a GUI tool available to customize SELinux policy settings.
π AUTHOR π
This manual page was auto-generated using sepolicy manpage .
β SEE ALSO β
Bye bestie π β footer deets for the very end: source/version blktap, date 26-10-06, manual blktap_selinux(8). Mwah π
π
π¦ where this page comes from
- opensuse-leap 16.0: selinux-policy-doc 20250627+git412.dbf877ab7-160000.1.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms