tmpreaper_selinux(8)
β¨ tmpreaper_selinux β the SELinux glow-up for tmpreaper π
Okay so bestie, welcome to the tmpreaper_selinux page from the SELinux Policy collection β it's giving security manual, it's giving "your processes are NOT the main character unless they're properly labeled," no cap. Let me walk you through it so you actually get it. π«Ά
πΈ NAME πΈ
tmpreaper_selinux β Security Enhanced Linux Policy for the tmpreaper processes. Literally what it says on the tin, bestie.
π¦ DESCRIPTION π¦
Security-Enhanced Linux secures the tmpreaper processes via flexible mandatory access control. That's the whole vibe β SELinux is the bouncer, your processes need the right wristband.
The tmpreaper processes execute with the tmpreaper_t SELinux type. Wanna check if you've got these processes running? Run the ps command with the -Z qualifier, like this:
ps -eZ | grep tmpreaper_t
See? Easy. Slay. π₯
π ENTRYPOINTS π
The tmpreaper_t SELinux type can be entered via the tmpreaper_exec_t file type. That's the doorway, iykyk.
The default entrypoint paths for the tmpreaper_t domain are the following:
/usr/bin/tmpwatch/usr/bin/tmpreaper/etc/rc.d/init.d/mountall-bootclean.sh/etc/rc.d/init.d/mountnfs-bootclean.sh
Those four. Memorize them if you want, or don't β the policy remembers for you. π
π PROCESS TYPES π
SELinux defines process types (domains) for each process running on the system. Yes, every single one. It's a lot, but it's iconic.
You can see the context of a process using the -Z option to ps.
Policy governs the access confined processes have to files. SELinux tmpreaper policy is very flexible, allowing users to setup their tmpreaper processes in as secure a method as possible. Flexible AND secure? We love to see it. β¨
The following process types are defined for tmpreaper:
tmpreaper_t
Note:semanage permissive -a tmpreaper_tcan be used to make the process typetmpreaper_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. So it's chill about access but still snitches in the logs. π
π BOOLEANS π
SELinux policy is customizable based on least access required. tmpreaper policy is extremely flexible and has several booleans that allow you to manipulate the policy and run tmpreaper with the tightest access possible. It's giving "minimalism but make it security."
If you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. It's enabled by default.
setsebool -P fips_mode 1
If you want to allow system to run with NIS, you must turn on the nis_enabled boolean. It's disabled by default.
setsebool -P nis_enabled 1
Two booleans, two little switches. Flip them wisely. π§
π MANAGED FILES π
The SELinux process type tmpreaper_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. But heads up β note the processes UID still need to have DAC permissions. SELinux isn't out here overriding classic Unix perms, it's just adding a layer of fabulous on top. β
antivirus_db_t/var/amavis(/.*)?/var/clamav(/.*)?/var/lib/clamd.*/var/lib/amavis(/.*)?/var/lib/clamav(/.*)?/var/virusmails(/.*)?/var/opt/f-secure(/.*)?/var/spool/amavisd(/.*)?/var/lib/clamav-unofficial-sigs(/.*)?
kismet_log_t/var/log/kismet(/.*)?
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
ntpd_log_t/var/log/ntp.*/var/log/xntpd.*/var/log/ntpstats(/.*)?/var/lib/ntp/var/log/ntp.*/var/lib/ntp/var/log/xntpd.*/var/lib/ntp/var/log/ntpstats(/.*)?
print_spool_t/var/spool/lpd(/.*)?/var/spool/cups(/.*)?/var/spool/cups-pdf(/.*)?
rpm_var_cache_t/var/adm/mount(/.*)?/var/cache/dnf(/.*)?/var/cache/yum(/.*)?/var/cache/zypp(/.*)?/var/spool/up2date(/.*)?/var/cache/PackageKit(/.*)?
That's the full roster, bestie. Every path accounted for. No crumbs. π
π₯ FILE CONTEXTS π₯
SELinux requires files to have an extended attribute to define the file type. It's like a name tag but for files.
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 tmpreaper policy is very flexible, allowing users to setup their tmpreaper processes in as secure a method as possible.
π STANDARD FILE CONTEXT π
SELinux defines the file context types for the tmpreaper. 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 tmpreaper_exec_t '/srv/tmpreaper/content(/.*)?'
restorecon -R -v /srv/mytmpreaper_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. So yes, that regex-looking thing is on purpose. π
The following file types are defined for tmpreaper:
tmpreaper_exec_tβ Set files with thetmpreaper_exec_ttype if you want to transition an executable to thetmpreaper_tdomain.
Paths:
/usr/bin/tmpwatch/usr/bin/tmpreaper/etc/rc.d/init.d/mountall-bootclean.sh/etc/rc.d/init.d/mountnfs-bootclean.sh
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. So like,chconis the quick fix andsemanage fcontext+restoreconis the whole commitment. Choose your energy. π
π 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. For the besties who prefer buttons over typing. π
π¦ AUTHOR π¦
This manual page was auto-generated using sepolicy manpage. The script did the writing, I just did the glow-up. π
π SEE ALSO π
selinux(8), tmpreaper(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)
And that's the whole page, bestie! This gem is from the tmpreaper manual, dated 26-10-06, and it's slated under version tmpreaper β periodt. Go forth and label responsibly. πΈπ
π«Ά
π¦ 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