powerprofiles_selinux(8)

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

✨ powerprofiles_selinux(8) β€” the manual page bestie edition ✨

Okay so, before we dive in, just know this is the manual page for powerprofiles_selinux, section 8. It's giving "SELinux policy for the powerprofiles processes" and honestly? Iconic behavior. Let's get into it, bestie. πŸ’…


πŸŽ€ NAME πŸŽ€

powerprofiles_selinux β€” Security Enhanced Linux Policy for the powerprofiles processes.

That's literally it. No cap. 🫢


🌸 DESCRIPTION 🌸

Security-Enhanced Linux secures the powerprofiles processes via flexible mandatory access control. It's basically the bouncer at the club, but for syscalls. πŸ”₯

The powerprofiles processes execute with the powerprofiles_t SELinux type. You can check if you have these processes running by executing the ps command with the -Z qualifier. Like this:

ps -eZ | grep powerprofiles_t

That's the whole vibe check right there. If you see powerprofiles_t in the output, you're in business. πŸ’–


πŸ¦‹ ENTRYPOINTS πŸ¦‹

The powerprofiles_t SELinux type can be entered via the powerprofiles_exec_t file type. Think of it as the VIP entrance. 🎟️

The default entrypoint paths for the powerprofiles_t domain are the following:

/usr/libexec/power-profiles-daemon

Periodt. That's the only one. πŸ’…


πŸ‘‘ PROCESS TYPES πŸ‘‘

SELinux defines process types (domains) for each process running on the system. It's a whole thing. 🌈

You can see the context of a process using the -Z option to ps.

Policy governs the access confined processes have to files. SELinux powerprofiles policy is very flexible, allowing users to setup their powerprofiles processes in as secure a method as possible. Lowkey obsessed with the flexibility. ✨

The following process types are defined for powerprofiles:

  • powerprofiles_t
Note: semanage permissive -a powerprofiles_t can be used to make the process type powerprofiles_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. So it's like, "you're not in trouble, but I'm still telling on you." πŸ’€

πŸ“ BOOLEANS πŸ“

SELinux policy is customizable based on least access required. powerprofiles policy is extremely flexible and has several booleans that allow you to manipulate the policy and run powerprofiles with the tightest access possible. It's giving "your vibe, your rules." 🌸

  • daemons_dontaudit_scheduling β€” If you want to dontaudit all daemons scheduling requests (setsched, sys_nice), you must turn on this boolean. Enabled by default.
setsebool -P daemons_dontaudit_scheduling 1
  • fips_mode β€” If you want to allow all domains to execute in fips_mode, you must turn on this boolean. Enabled by default.
setsebool -P fips_mode 1

That's the whole boolean situation. Two booleans, both enabled by default. Slay. πŸ’–


🧚 MANAGED FILES 🧚

The SELinux process type powerprofiles_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. Like, SELinux isn't gonna override your regular permissions, bestie. πŸ™ˆ

  • cluster_conf_t β€” cluster config files, iykyk.
/etc/cluster(/.*)?
  • cluster_var_lib_t β€” cluster variable library files. So many paths. 😭
/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 β€” cluster runtime files. The way this list is long, but we respect it. πŸ’…
/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
  • powerprofiles_var_lib_t β€” the powerprofiles variable library files. Main character energy. 🌟
/var/lib/power-profiles-daemon(/.*)?
  • root_t β€” root files. Root is literally root. πŸ€·β€β™€οΈ
/sysroot/.aleph-version.json
/sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
/
/initrd
/var/lib/ntp
  • sysfs_t β€” sysfs files. The whole /sys tree. Wild. πŸ¦‹
/sys(/.*)?

πŸ’œ FILE CONTEXTS πŸ’œ

SELinux requires files to have an extended attribute to define the file type. It's like each file has a little name tag. 🏷️

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 powerprofiles policy is very flexible, allowing users to setup their powerprofiles processes in as secure a method as possible. We love a flexible queen. πŸ‘‘

🌺 STANDARD FILE CONTEXT 🌺

SELinux defines the file context types for the powerprofiles. If you wanted to store files with these types in 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 powerprofiles_exec_t
'/srv/powerprofiles/content(/.*)?'
restorecon -R -v /srv/mypowerprofiles_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. Regex is lowkey iconic. ✨

The following file types are defined for powerprofiles:

  • powerprofiles_exec_t β€” Set files with the powerprofiles_exec_t type if you want to transition an executable to the powerprofiles_t domain. It's the entrypoint vibe. πŸšͺ
  • powerprofiles_var_lib_t β€” Set files with the powerprofiles_var_lib_t type if you want to store the powerprofiles files under the /var/lib directory. That's where the data lives. πŸ“
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 will modify the SELinux labeling database. You will need to use restorecon to apply the labels. So like, chcon is a quick fix, but semanage fcontext + restorecon is the real glow-up. πŸ’…

πŸ”₯ COMMANDS πŸ”₯

  • semanage fcontext can also be used to manipulate default file context mappings. It's the queen of file contexts. πŸ‘‘
  • semanage permissive can also be used to manipulate whether or not a process type is permissive. Per my last email, permissive mode is a whole thing. πŸ’Œ
  • semanage module can also be used to enable/disable/install/remove policy modules. Modular realness. 🧩
  • semanage boolean can also be used to manipulate the booleans. Boolean manipulation is self-care. 🍡
  • system-config-selinux is a GUI tool available to customize SELinux policy settings. For my visual besties. πŸ–₯️✨

🌟 AUTHOR 🌟

This manual page was auto-generated using sepolicy manpage. Yes, it was generated. No human wrote this originally. But now it's been rewritten with love. 🫢


🌈 SEE ALSO 🌈

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

That's the whole squad right there. Go read them if you need more. Iykyk. πŸ’–


Sign-off: This manual page is for powerprofiles, dated 26-10-06, from powerprofiles_selinux(8). Stay secure, bestie. No cap. πŸ’…βœ¨
πŸ“¦ where this page comes from