qm_selinux(8)
β¨ qm_selinux(8) β the SELinux tea for qm π
okay bestie, gather round, because this is the manual page for qm_selinux, aka the Security Enhanced Linux Policy for the qm processes. it's filed under section 8 of the qm manual, and it is so much more chill than it sounds, i promise π«Ά
πΈ NAME πΈ
qm_selinux β Security Enhanced Linux Policy for the qm processes
π DESCRIPTION π
Security-Enhanced Linux secures the qm processes via flexible mandatory access control. yes, "mandatory access control" β SELinux is the friend who will enforce the group chat rules, no cap.
The qm processes execute with the qm_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 qm_t
πͺ ENTRYPOINTS πͺ
The qm_t SELinux type can be entered via the qm_file_type file type.
The default entrypoint paths for the qm_t domain are the following:
(and yes, the list is literally empty here β the page just vibes with a blank space, so no paths are listed.)
π 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 qm policy is very flexible allowing users to setup their qm processes in as secure a method as possible.
The following process types are defined for qm:
qm_t, qm_container_t, qm_container_kvm_t, qm_container_init_t, qmail_clean_t, qmail_inject_t, qmail_local_t, qmail_lspawn_t, qmail_queue_t, qmail_remote_t, qmail_rspawn_t, qmail_send_t, qmail_smtpd_t, qmail_splogger_t, qmail_start_t, qmail_tcp_env_t
Note:semanage permissive -a qm_tcan be used to make the process typeqm_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it stops blocking you, but it will absolutely still be in your notifications talking about it π
π BOOLEANS π
SELinux policy is customizable based on least access required. qm policy is extremely flexible and has several booleans that allow you to manipulate the policy and run qm with the tightest access possible.
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
ποΈ MANAGED FILES ποΈ
The SELinux process type qm_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note the processes UID still need to have DAC permissions.
cgroup_t
/sys/fs/cgroup
initrc_tmp_tmnt_t
/mnt(/[^/]*)?
/mnt(/[^/]*)?
/rhev(/[^/]*)?
/rhev/[^/]*/.*
/media(/[^/]*)?
/media(/[^/]*)?
/media/.hal-.*
/var/run/media(/[^/]*)?
/afs
/net
/misc
/rhev
net_conf_t
/etc/hosts[^/]*
/etc/yp.conf.*
/etc/denyhosts.*
/etc/hosts.deny.*
/etc/resolv.conf.*
/etc/.resolv.conf.*
/etc/resolv-secure.conf.*
/var/run/cloud-init(/.*)?
/var/run/systemd/network(/.*)?
/etc/sysconfig/networking(/.*)?
/etc/sysconfig/network-scripts(/.*)?
/etc/sysconfig/network-scripts/.*resolv.conf
/var/run/NetworkManager/resolv.conf.*
/etc/ethers
/etc/ntp.conf
/var/run/systemd/resolve/resolv.conf
/var/run/systemd/resolve/stub-resolv.conf
/var/run/NetworkManager/no-stub-resolv.conf
qm_file_typesecurity_t
/selinux
tmp_t
/sandbox(/.*)?
/tmp
/usr/tmp
/var/tmp
/var/tmp
/tmp-inst
/var/tmp-inst
/var/tmp/tmp-inst
/var/tmp/vi.recover
π¦ 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 qm policy is very flexible allowing users to setup their qm processes in as secure a method as possible.
β STANDARD FILE CONTEXT β
SELinux defines the file context types for the qm, 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 qm_file_t '/srv/qm/content(/.*)?'
restorecon -R -v /srv/myqm_content
Note: SELinux often uses regular expressions to specify labels that match multiple files.
The following file types are defined for qm:
qm_container_file_t- Set files with the
qm_container_file_ttype, if you want to treat the files as qm container content.
- Set files with the
qm_container_kvm_var_run_t- Set files with the
qm_container_kvm_var_run_ttype, if you want to store the qm container kvm files under the/runor/var/rundirectory.
- Set files with the
qm_container_ro_file_t- Set files with the
qm_container_ro_file_ttype, if you want to treat the files as qm container ro content.
- Set files with the
Paths:
/usr/lib/qm/rootfs/var/lib/containers/storage/overlay(/.*)?,
/usr/lib/qm/rootfs/var/lib/containers/storage/overlay2(/.*)?,
/usr/lib/qm/rootfs/var/lib/containers/storage/overlay-images(/.*)?,
/usr/lib/qm/rootfs/var/lib/containers/storage/overlay-layers(/.*)?,
/usr/lib/qm/rootfs/var/lib/containers/storage/overlay2-images(/.*)?,
/usr/lib/qm/rootfs/var/lib/containers/storage/overlay2-layers(/.*)?
qm_container_var_lib_t- Set files with the
qm_container_var_lib_ttype, if you want to store the qm container files under the/var/libdirectory.
- Set files with the
qm_file_t- Set files with the
qm_file_ttype, if you want to treat the files as qm content.
- Set files with the
qmail_alias_home_t- Set files with the
qmail_alias_home_ttype, if you want to store qmail alias files in the users home directory.
- Set files with the
Paths:
/var/qmail/alias(/.*)?, /var/qmail/alias
qmail_clean_exec_t- Set files with the
qmail_clean_exec_ttype, if you want to transition an executable to theqmail_clean_tdomain.
- Set files with the
qmail_etc_t- Set files with the
qmail_etc_ttype, if you want to store qmail files in the/etcdirectories.
- Set files with the
Paths:
/var/qmail/owners(/.*)?, /var/qmail/control(/.*)?
qmail_exec_t- Set files with the
qmail_exec_ttype, if you want to transition an executable to theqmail_tdomain.
- Set files with the
qmail_inject_exec_t- Set files with the
qmail_inject_exec_ttype, if you want to transition an executable to theqmail_inject_tdomain.
- Set files with the
qmail_keytab_t- Set files with the
qmail_keytab_ttype, if you want to treat the files as kerberos keytab files.
- Set files with the
qmail_local_exec_t- Set files with the
qmail_local_exec_ttype, if you want to transition an executable to theqmail_local_tdomain.
- Set files with the
qmail_lspawn_exec_t- Set files with the
qmail_lspawn_exec_ttype, if you want to transition an executable to theqmail_lspawn_tdomain.
- Set files with the
qmail_queue_exec_t- Set files with the
qmail_queue_exec_ttype, if you want to transition an executable to theqmail_queue_tdomain.
- Set files with the
qmail_remote_exec_t- Set files with the
qmail_remote_exec_ttype, if you want to transition an executable to theqmail_remote_tdomain.
- Set files with the
qmail_rspawn_exec_t- Set files with the
qmail_rspawn_exec_ttype, if you want to transition an executable to theqmail_rspawn_tdomain.
- Set files with the
qmail_send_exec_t- Set files with the
qmail_send_exec_ttype, if you want to transition an executable to theqmail_send_tdomain.
- Set files with the
qmail_smtpd_exec_t- Set files with the
qmail_smtpd_exec_ttype, if you want to transition an executable to theqmail_smtpd_tdomain.
- Set files with the
qmail_splogger_exec_t- Set files with the
qmail_splogger_exec_ttype, if you want to transition an executable to theqmail_splogger_tdomain.
- Set files with the
qmail_spool_t- Set files with the
qmail_spool_ttype, if you want to store the qmail files under the/var/spooldirectory.
- Set files with the
qmail_start_exec_t- Set files with the
qmail_start_exec_ttype, if you want to transition an executable to theqmail_start_tdomain.
- Set files with the
qmail_tcp_env_exec_t- Set files with the
qmail_tcp_env_exec_ttype, if you want to transition an executable to theqmail_tcp_env_tdomain.
- Set files with the
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. (temporary = cute little experiment, permanent = commit to the bit, okay?)
π§ 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.
π AUTHOR π
This manual page was auto-generated using sepolicy manpage .
π₯ SEE ALSO π₯
selinux(8), qm(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8), qm_container_selinux(8), qm_container_selinux(8), qm_container_init_selinux(8), qm_container_init_selinux(8), qm_container_kvm_selinux(8), qm_container_kvm_selinux(8)
and that's the whole page bestie, we ate and left no crumbs π β¨
this one came from the qm manual, dated 23-04-12, and it lives at qm_selinux(8). go forth and label responsibly, my little SELinux icon ππΈ
π¦ where this page comes from
- epel 10: qm 1.2-1.el10_3 Β· GPL-2.0-only
- epel 9: qm 1.3-1.el9 Β· GPL-2.0-only
- fedora 43: qm 0.9-1.fc43 Β· GPL-2.0-only
- fedora 43: qm 1.3-1.fc43 Β· GPL-2.0-only
- fedora 44: qm 1.0-2.fc44 Β· GPL-2.0-only
- fedora 44: qm 1.3-1.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms