sensord_selinux(8)
π sensord_selinux(8) β okay bestie, let's talk SELinux and sensord
So this is the sensord_selinux(8) page, straight out of the SELinux Policy sensord manual, and I'm gonna walk you through it like we're texting at 2am. Buckle up π
β¨ NAME β¨
sensord_selinux β the Security Enhanced Linux Policy for the sensord processes. That's it, that's the whole name section, but like... it's kind of the main character of this whole page, so π
πΈ DESCRIPTION πΈ
Security-Enhanced Linux keeps the sensord processes secure via flexible mandatory access control. Fr fr, that's the whole vibe β SELinux is the strict bestie who checks your outfit before you leave the house.
The sensord processes execute with the sensord_t SELinux type. You can check if you've got these processes running by executing the ps command with the -Z qualifier. Like this:
ps -eZ | grep sensord_t
Lowkey the easiest vibe check ever. π¦
πͺ ENTRYPOINTS πͺ
The sensord_t SELinux type can be entered via the sensord_exec_t file type. That's the doorway, bestie β you gotta come in through the right door.
The default entrypoint paths for the sensord_t domain are the following:
/usr/bin/sensord, /usr/libexec/lm_sensors/sensord-service-wrapper
Two paths, both iconic, no cap. β¨
π PROCESS TYPES π
SELinux defines process types (domains) for each process running on the system. Yes, every process gets its own little identity. Main character energy for everyone.
You can see the context of a process using the -Z option to ps. Use it, love it, put it in your notes app.
Policy governs the access confined processes have to files. SELinux sensord policy is very flexible, allowing users to set up their sensord processes in as secure a method as possible. Flexible and responsible? We love a well-rounded icon.
The following process types are defined for sensord:
sensord_t
Note:semanage permissive -a sensord_tcan be used to make the process typesensord_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. So like, it stops saying no, but it's still keeping receipts. π
π BOOLEANS π
SELinux policy is customizable based on least access required. sensord policy is extremely flexible and has several booleans that allow you to manipulate the policy and run sensord with the tightest access possible. Tightest access possible = the snatched-waist of security. π
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 system to run with NIS, you must turn on the nis_enabled boolean. Disabled by default.
setsebool -P nis_enabled 1
Three booleans, three little switches. Flip responsibly. π
π MANAGED FILES π
The SELinux process type sensord_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note: the process's UID still needs to have DAC permissions β SELinux isn't out here overriding your regular permissions, it's just adding its own layer. β¨
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
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
root_t
/sysroot/.aleph-version.json
/sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
/
/initrd
/var/lib/ntp
sensord_log_t
/var/log/sensor.*
sensord_var_run_t
/run/sensord.pid
That's a lot of paths and I typed every single one because I love you. π«Ά
ποΈ FILE CONTEXTS ποΈ
SELinux requires files to have an extended attribute to define the file type. It's like a name tag but for files, and honestly? Slay.
You can see the context of a file using the -Z option to ls. Go look at your files, they have labels, it's a whole thing.
Policy governs the access confined processes have to these files. SELinux sensord policy is very flexible, allowing users to set up their sensord processes in as secure a method as possible. (Yes, that sentence is basically the same as the process one, the manpage really said "consistency" and I respect it.)
β STANDARD FILE CONTEXT β
SELinux defines the file context types for the sensord. 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 sensord_exec_t '/srv/sensord/content(/.*)?'
restorecon -R -v /srv/mysensord_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. That's the (/.*)? energy you keep seeing. Regex girlies rise. π
The following file types are defined for sensord:
sensord_exec_t
- Set files with the
sensord_exec_ttype, if you want to transition an executable to thesensord_tdomain.
Paths:
/usr/bin/sensord, /usr/libexec/lm_sensors/sensord-service-wrapper
sensord_initrc_exec_t
- Set files with the
sensord_initrc_exec_ttype, if you want to transition an executable to thesensord_initrc_tdomain.
sensord_log_t
- Set files with the
sensord_log_ttype, if you want to treat the data assensordlog data, usually stored under the/var/logdirectory.
sensord_unit_file_t
- Set files with the
sensord_unit_file_ttype, if you want to treat the files assensordunit content.
sensord_var_run_t
- Set files with the
sensord_var_run_ttype, if you want to store thesensordfiles 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. Temporary vs permanent β choose wisely, bestie. π
π οΈ 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. A GUI!! For when you want to click instead of type. π±οΈβ¨
βοΈ AUTHOR βοΈ
This manual page was auto-generated using sepolicy manpage .
Yes, a robot wrote it. And now I'm rewriting the robot's homework. Full circle. π€π
π SEE ALSO π
Go read them, they're all linked in the group chat. iykyk π¦
Okay that's the whole page!! π This little writeup is from <pink>sensord</pink>, dated 26-10-06, and the source line is sensord_selinux(8) β so like, that's the version tea. Mwah, go label your files, ily, bye! ππ₯
π¦ 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