cpuplug_selinux(8)

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

✨ cpuplug_selinux ✨

Okay bestie, so like... this is the manual page for the SELinux policy for cpuplug? And it's from the SELinux Policy cpuplug collection, iykyk. Let me walk you through it because honestly it's giving "niche but important" and we love that for us πŸ’…


πŸ’– NAME πŸ’–

So cpuplug_selinux is literally the Security Enhanced Linux Policy for the cpuplug processes. That's the whole vibe. Periodt.


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the tea: Security-Enhanced Linux secures the cpuplug processes via flexible mandatory access control. It's like having a very strict bouncer for your processes, no cap.

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

ps -eZ | grep cpuplug_t

Literally just run that and see what's up πŸ”


🌸 ENTRYPOINTS 🌸

The cpuplug_t SELinux type can be entered via the cpuplug_exec_t file type. It's giving VIP entrance energy ✨

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

/usr/bin/cpuplugd

That's it. One path. And it's iconic.


πŸ‘‘ PROCESS TYPES πŸ‘‘

SELinux defines process types (domains) for each process running on the system. Like, every process gets its own little domain, cute right?

You can see the context of a process using the -Z option to ps. Just add that on and you'll see the full picture πŸ–ΌοΈ

Policy governs the access confined processes have to files. SELinux cpuplug policy is very flexible allowing users to setup their cpuplug processes in as secure a method as possible. Slay for security πŸ’–

The following process types are defined for cpuplug:

  • cpuplug_t
Note: semanage permissive -a cpuplug_t can be used to make the process type cpuplug_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. It's like, you're telling SELinux to chill about this one but still report what happened. Lowkey useful for debugging, ngl.

πŸŽ€ BOOLEANS πŸŽ€

SELinux policy is customizable based on least access required. cpuplug policy is extremely flexible and has several booleans that allow you to manipulate the policy and run cpuplug with the tightest access possible. Booleans are literally just on/off switches for policy behavior and they're so satisfying to toggle.

If you want to dontaudit all daemons scheduling requests (setsched, sys_nice), you must turn on the daemons_dontaudit_scheduling boolean. Enabled by default. Like it's already on, bestie.

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. Also already on, we love a head start πŸ’œ

setsebool -P fips_mode 1

🧚 MANAGED FILES 🧚

The SELinux process type cpuplug_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β€”SELinux doesn't override regular Unix permissions, they work together, bestie. Teamwork makes the dream work 🫢

  • 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
  • cpuplug_lock_t
  • cpuplug_var_run_t
  • root_t
    • /sysroot/.aleph-version.json
    • /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
    • /
    • /initrd
    • /var/lib/ntp
  • sysfs_t
    • /sys(/.*)?

🌈 FILE CONTEXTS 🌈

SELinux requires files to have an extended attribute to define the file type. Like every file has a little name tag at the party, and SELinux checks it before letting it in 🎫

You can see the context of a file using the -Z option to ls. Just ls -Z and boom, context revealed.

Policy governs the access confined processes have to these files. SELinux cpuplug policy is very flexible allowing users to setup their cpuplug processes in as secure a method as possible. Again, slay for security and flexibility together πŸ’–

⭐ STANDARD FILE CONTEXT ⭐

SELinux defines the file context types for the cpuplug, 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. It's like relabeling the folders in your file system but make it SELinux.

semanage fcontext -a -t cpuplug_exec_t '/srv/cpuplug/content(/.*)?'
restorecon -R -v /srv/mycpuplug_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. Regex my beloved 😌

The following file types are defined for cpuplug:

  • cpuplug_exec_t β€” Set files with the cpuplug_exec_t type, if you want to transition an executable to the cpuplug_t domain.
  • cpuplug_initrc_exec_t β€” Set files with the cpuplug_initrc_exec_t type, if you want to transition an executable to the cpuplug_initrc_t domain.
  • cpuplug_lock_t β€” Set files with the cpuplug_lock_t type, if you want to treat the files as cpuplug lock data, stored under the /var/lock directory.
  • cpuplug_var_run_t β€” Set files with the cpuplug_var_run_t type, if you want to store the cpuplug files under the /run or /var/run directory.
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 chcon is temporary, semanage fcontext + restorecon is forever. Don't mix them up bestie πŸ’€

πŸ’€ COMMANDS πŸ’€

Okay so these are the commands you can use to manipulate things.

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. It's giving graphical interface for the girlies who prefer clicking over typing πŸ–±οΈβœ¨


🫢 AUTHOR 🫢

This manual page was auto-generated using sepolicy manpage . β€” okay auto-generated king, we respect the automation grind πŸ€–


πŸ”₯ SEE ALSO πŸ”₯


Okay that's literally the whole page bestie! This was cpuplug from 26-10-06 in the cpuplug_selinux(8) manual, and honestly? Ate. No crumbs. Go forth and configure your SELinux policy with confidence because you're the main character of your own system security story πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from