deviceki...r_selinux(8)

πŸ“¦
version 20250627+git412.dbf877ab7 Β· 7 versions
, in opensuse-leap 16.0

πŸ’– devicekit_power_selinux β€” the manual, but make it cute πŸ’–

okay bestie, so this is the devicekit_power_selinux(8) page, living under the SELinux Policy devicekit_power umbrella. yes, the header looks like deviceki...r_selinux(8) because someone let the truncation goblins loose β€” it's the same page, i promise 🫢


✨ NAME ✨

devicekit_power_selinux β€” the whole Security Enhanced Linux policy sitch for the devicekit_power processes 🌸


πŸ¦‹ DESCRIPTION πŸ¦‹

Security-Enhanced Linux keeps the devicekit_power processes safe via flexible mandatory access control. that's the whole vibe, no cap.

The devicekit_power processes run with the devicekit_power_t SELinux type. wanna check if you've got these processes running? just run the ps command with the -Z qualifier πŸ’…

example, go:

ps -eZ | grep devicekit_power_t

πŸŽ€ ENTRYPOINTS πŸŽ€

You can enter the devicekit_power_t SELinux type through the devicekit_power_exec_t file type. that's the door. the only door. πŸšͺ✨

The default entrypoint paths for the devicekit_power_t domain are literally these:

/usr/libexec/upowerd, /usr/lib/upower/upowerd, /usr/libexec/devkit-power-daemon


πŸ‘‘ PROCESS TYPES πŸ‘‘

SELinux defines process types (aka domains) for every single process running on the system, no exceptions πŸ’€

you can see the context of a process with the -Z option to ps.

Policy governs the access confined processes have to files. the SELinux devicekit_power policy is very flexible, letting users set up their devicekit_power processes in the most secure way possible πŸ›‘οΈ

The following process type is defined for devicekit_power:

  • devicekit_power_t
Note: semanage permissive -a devicekit_power_t makes the process type devicekit_power_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it's not a free pass, it's just a loud pass πŸ™ˆ

🌈 BOOLEANS 🌈

SELinux policy is customizable based on least access required. the devicekit_power policy is extremely flexible and has several booleans that let you manipulate the policy and run devicekit_power with the tightest access possible πŸ”’

  • 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 deny user domains applications from mapping a memory region as both executable and writable β€” heads up, this is dangerous and the executable should be reported in bugzilla β€” you must turn on the deny_execmem boolean. Disabled by default.
setsebool -P deny_execmem 1
  • 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 the mmap_low_allowed boolean. Disabled by default.
setsebool -P mmap_low_allowed 1
  • if you want to allow the system to run with NIS, you must turn on the nis_enabled boolean. Disabled by default.
setsebool -P nis_enabled 1
  • if you want to disable kernel module loading, you must turn on the secure_mode_insmod boolean. Disabled by default.
setsebool -P secure_mode_insmod 1
  • if you want to allow unconfined executables to make their heap memory executable β€” and bestie, doing this is a really bad idea, probably means a badly coded executable but could mean an attack, and that executable should be reported in bugzilla β€” you must turn on the selinuxuser_execheap boolean. Disabled by default.
setsebool -P selinuxuser_execheap 1
  • if you want to allow unconfined executables to make their stack executable β€” this should never, ever be necessary, probably means a badly coded executable but could mean an attack, and that executable should be reported in bugzilla β€” you must turn on the selinuxuser_execstack boolean. Disabled by default.
setsebool -P selinuxuser_execstack 1

πŸ“ MANAGED FILES πŸ“

The SELinux process type devicekit_power_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 πŸ‘€

file_type

  • all files on the system

like. all of them. iconic, honestly πŸ’…


🧚 FILE CONTEXTS 🧚

SELinux requires files to have an extended attribute to define the file type.

you can see the context of a file with the -Z option to ls πŸ‘€

Policy governs the access confined processes have to these files. the SELinux devicekit_power policy is very flexible, letting users set up their devicekit_power processes in the most secure way possible πŸ›‘οΈ

πŸ’œ STANDARD FILE CONTEXT πŸ’œ

SELinux defines the file context types for devicekit_power. if you wanted to store files with these types in different paths, you need to run the semanage command to specify alternate labeling, and then use restorecon to actually put the labels on disk 🏷️

semanage fcontext -a -t devicekit_power_exec_t '/srv/devicekit_power/content(/.*)?'
restorecon -R -v /srv/mydevicekit_power_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies stay winning πŸŽ€

The following file type is defined for devicekit_power:

devicekit_power_exec_t

  • Set files with the devicekit_power_exec_t type if you want to transition an executable to the devicekit_power_t domain.

Paths:

/usr/libexec/upowerd, /usr/lib/upower/upowerd, /usr/libexec/devkit-power-daemon

Note: file context can be temporarily modified with the chcon command. if you want to permanently change the file context you need to use the semanage fcontext command β€” this modifies the SELinux labeling database. and then you'll need to use restorecon to apply the labels. temporary vs permanent, know the difference 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 πŸ–±οΈβœ¨

🌸 AUTHOR 🌸

This manual page was auto-generated using sepolicy manpage. (a bot wrote this, but a bot with taste πŸ’…)


πŸ”₯ SEE ALSO πŸ”₯

selinux(8), devicekit_power(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)


and that's the whole page, bestie!! 🫢 brought to you by the SELinux Policy devicekit_power girlies, dated 26-10-06, filed under deviceki...r_selinux(8) because truncation is our aesthetic apparently πŸ’€πŸŽ€

πŸ“¦ where this page comes from