devicekit_selinux(8)
π devicekit_selinux β the manual page, but make it cute
Okay bestie, buckle up, because this is the devicekit_selinux(8) manual page and we're about to get into it. This is the Security Enhanced Linux Policy for the devicekit processes, and honestly? It's giving secure. It's giving mandatory access control. It's giving "your fave could never."
β¨ NAME β¨
So the name of this whole thing is devicekit_selinux β and it's literally the Security Enhanced Linux Policy for the devicekit processes. That's it, that's the name, periodt.
π¦ DESCRIPTION π¦
Security-Enhanced Linux secures the devicekit processes via flexible mandatory access control. No cap. Like, SELinux is out here protecting these processes with flexible mandatory access control, which is a whole vibe.
The devicekit processes execute with the devicekit_t SELinux type. You can check if you have these processes running by executing the ps command with the -Z qualifier. It's super easy, bestie.
For example:
ps -eZ | grep devicekit_t
See? Iconic. You just ran a command and now you know things. Main character energy.
πΈ ENTRYPOINTS πΈ
So the devicekit_t SELinux type can be entered via the devicekit_exec_t file type. That's the doorway, the entrance, the red carpet moment.
The default entrypoint paths for the devicekit_t domain are literally these:
/usr/bin/udisksctl, /usr/libexec/devkit-daemon
Those two. That's where it all happens. Write it down, screenshot it, whatever you gotta do.
π PROCESS TYPES π
SELinux defines process types (domains) for each process running on the system. It's a whole thing. Keep up.
You can see the context of a process using the -Z option to ps. Simple. Cute. Useful.
Policy governs the access confined processes have to files. SELinux devicekit policy is very flexible, allowing users to setup their devicekit processes in as secure a method as possible. Like, the most secure. The final boss of secure.
The following process types are defined for devicekit:
devicekit_t, devicekit_power_t, devicekit_disk_t
Three of them. A little trio. A squad, if you will.
Note:semanage permissive -a devicekit_tcan be used to make the process typedevicekit_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. So like, it's not fully off the hook β it's still snitching in the logs. Just so you know.
π§ BOOLEANS π§
SELinux policy is customizable based on least access required. devicekit policy is extremely flexible and has several booleans that allow you to manipulate the policy and run devicekit with the tightest access possible. Tightest access? We love to see it.
Here come the booleans, bestie. Every single one. Let's go.
- If you want to dontaudit all daemons scheduling requests (
setsched,sys_nice), you must turn on thedaemons_dontaudit_schedulingboolean. Enabled by default.
setsebool -P daemons_dontaudit_scheduling 1
- If you want to deny user domains applications to map a memory region as both executable and writable β this is dangerous and the executable should be reported in bugzilla β you must turn on the
deny_execmemboolean. Disabled by default.
setsebool -P deny_execmem 1
Okay, for real though, that one is dangerous. Like, report-it-in-bugzilla dangerous. Don't be cute with it.
- If you want to control the ability to mmap a low area of the address space, as configured by
/proc/sys/vm/mmap_min_addr, you must turn on themmap_low_allowedboolean. Disabled by default.
setsebool -P mmap_low_allowed 1
- If you want to disable kernel module loading, you must turn on the
secure_mode_insmodboolean. Disabled by default.
setsebool -P secure_mode_insmod 1
- If you want to allow unconfined executables to make their heap memory executable β doing this is a really bad idea. Probably indicates a badly coded executable, but could indicate an attack. This executable should be reported in bugzilla β you must turn on the
selinuxuser_execheapboolean. Disabled by default.
setsebool -P selinuxuser_execheap 1
Bad idea. Bad. Report it in bugzilla. We said what we said.
- If you want to allow unconfined executables to make their stack executable β this should never, ever be necessary. Probably indicates a badly coded executable, but could indicate an attack. This executable should be reported in bugzilla β you must turn on the
selinuxuser_execstackboolean. Disabled by default.
setsebool -P selinuxuser_execstack 1
Never. Ever. Necessary. Like, never ever ever. Keep that in mind.
π«Ά MANAGED FILES π«Ά
The SELinux process type devicekit_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. And bestie β note the processes UID still need to have DAC permissions. Don't forget that part, it's important.
file_type
- all files on the system
Yes, all of them. That's the whole vibe. That's the whole list. Moving on.
π FILE CONTEXTS π
SELinux requires files to have an extended attribute to define the file type. It's basically the file's whole identity. Its aesthetic, if you will.
You can see the context of a file using the -Z option to ls. Cute and informative.
Policy governs the access confined processes have to these files. SELinux devicekit policy is very flexible, allowing users to setup their devicekit processes in as secure a method as possible. (Yes, we said that already. It's still true. Repetition is a valid communication strategy.)
π STANDARD FILE CONTEXT π
SELinux defines the file context types for the devicekit, so 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. Like this:
semanage fcontext -a -t devicekit_exec_t '/srv/devicekit/content(/.*)?'
restorecon -R -v /srv/mydevicekit_content
See? You got this. Slay.
Note: SELinux often uses regular expressions to specify labels that match multiple files. So those regex bits? They're doing the most, but like, the most in a good way.
The following file types are defined for devicekit:
devicekit_disk_exec_t
- Set files with the
devicekit_disk_exec_ttype, if you want to transition an executable to thedevicekit_disk_tdomain.
Paths:
/lib/udisks2/udisksd, /lib/udev/udisks-part-id,
/usr/lib/udisks2/udisksd, /usr/libexec/udisks-daemon,
/usr/lib/udev/udisks-part-id, /usr/libexec/udisks2/udisksd,
/usr/lib/udisks/udisks-daemon, /usr/libexec/devkit-disks-daemon
devicekit_exec_t
- Set files with the
devicekit_exec_ttype, if you want to transition an executable to thedevicekit_tdomain.
Paths:
/usr/bin/udisksctl, /usr/libexec/devkit-daemon
devicekit_power_exec_t
- Set files with the
devicekit_power_exec_ttype, if you want to transition an executable to thedevicekit_power_tdomain.
Paths:
/usr/libexec/upowerd, /usr/lib/upower/upowerd, /usr/libexec/devkit-
power-daemon
devicekit_tmp_t
- Set files with the
devicekit_tmp_ttype, if you want to store devicekit temporary files in the/tmpdirectories.
devicekit_var_lib_t
- Set files with the
devicekit_var_lib_ttype, if you want to store the devicekit files under the/var/libdirectory.
Paths:
/var/lib/udisks.*, /var/lib/upower(/.*)?, /var/lib/DeviceKit-.*
devicekit_var_log_t
- Set files with the
devicekit_var_log_ttype, if you want to treat the data as devicekit var log data, usually stored under the/var/logdirectory.
Paths:
/var/log/pm-suspend.log.*, /var/log/pm-powersave.log.*
devicekit_var_run_t
- Set files with the
devicekit_var_run_ttype, if you want to store the devicekit files under the/runor/var/rundirectory.
Paths:
/run/udisks.*, /run/devkit(/.*)?, /run/upower(/.*)?, /run/pm-
utils(/.*)?, /run/DeviceKit-disks(/.*)?
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 a quick fix,semanage fcontextis the forever fix, andrestoreconis the one who actually makes it happen. Teamwork.
π 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. (A GUI! For when you want to point and click instead of type. We respect it.)
π AUTHOR π
This manual page was auto-generated using sepolicy manpage. So like, it wasn't written by a human hand, it was born from the machine. Still iconic though.
β SEE ALSO β
Go read these too, bestie:
selinux(8), devicekit(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8), devicekit_disk_selinux(8), devicekit_disk_selinux(8), devicekit_power_selinux(8), devicekit_power_selinux(8)
(Yes, some of them are listed twice. That's how the original does it. We don't make the rules, we just make them cute.)
And that's the whole page! This one came from devicekit and it's dated 26-10-06 β so like, a little vintage, but still slaying. Go forth and be secure. πβ¨ππ¦πΈπ
π«Άππ₯ππβππππ§π
π¦ 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