packagekit_selinux(8)

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

✨ packagekit_selinux(8) β€” the SELinux glow-up for packagekit ✨

okay bestie, so you know how SELinux is like the ✨main character✨ of mandatory access control on your system? this page is all about how it secures the packagekit processes, and honestly it's giving very much "security guard but make it fashion" πŸ’…


🌸 NAME 🌸

packagekit_selinux β€” Security Enhanced Linux Policy for the packagekit processes. periodt. πŸŽ€


πŸ’– DESCRIPTION πŸ’–

Security-Enhanced Linux secures the packagekit processes via flexible mandatory access control. it's literally out here protecting your system with ✨flexible✨ vibes.

The packagekit processes execute with the packagekit_t SELinux type. you can check if you have these processes running by executing the ps command with the -Z qualifier β€” iykyk. πŸ•΅οΈβ€β™€οΈ

For example:

ps -eZ | grep packagekit_t

no cap, that's the whole check. slay. πŸ”₯


πŸ¦‹ ENTRYPOINTS πŸ¦‹

The packagekit_t SELinux type can be entered via the packagekit_exec_t file type. so if a file has that label, it's basically the VIP entrance to the packagekit_t domain 🎟️✨

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

/usr/bin/pkcon, /usr/bin/pkmon, /usr/bin/packagekit, /usr/lib/packagekitd, /usr/lib/packagekit-direct, /usr/lib/pk-offline-update

those are the iconic spots fr fr. πŸ“


πŸ‘‘ PROCESS TYPES πŸ‘‘

SELinux defines process types (domains) for each process running on the system. it's giving "everyone gets their own little category" energy πŸŽ€

You can see the context of a process using the -Z option to ps. easy peasy. πŸ’…

Policy governs the access confined processes have to files. SELinux packagekit policy is very flexible allowing users to setup their packagekit processes in as secure a method as possible. bestie, it's literally so accommodating. 🌈

The following process types are defined for packagekit:

  • packagekit_t
Note: semanage permissive -a packagekit_t can be used to make the process type packagekit_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 just doesn't block stuff β€” but it will still snitch in the logs πŸ‘€πŸ’€

πŸ“ BOOLEANS πŸ“

SELinux policy is customizable based on least access required. packagekit policy is extremely flexible and has several booleans that allow you to manipulate the policy and run packagekit with the tightest access possible. it's literally customizable to your exact vibe ✨

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 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_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 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. 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_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 indicates a badly coded executable, but could indicate an attack. This executable should be reported in bugzilla, you must turn on the selinuxuser_execstack boolean. Disabled by default. πŸ”΄βš οΈ

setsebool -P selinuxuser_execstack 1

like, please don't turn those last two on unless you absolutely have to, bestie. it's giving "red flag energy" 🚩😭


🧚 MANAGED FILES 🧚

The SELinux process type packagekit_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. so like, SELinux isn't doing everything for you, you still need the regular permissions too πŸ’…

  • file_type

all files on the system

like, literally all of them. iconic. πŸ‘‘


🌈 FILE CONTEXTS 🌈

SELinux requires files to have an extended attribute to define the file type. it's the ✨label✨ on the file, bestie.

You can see the context of a file using the -Z option to ls. yep, same flag energy as ps. πŸŽ€

Policy governs the access confined processes have to these files. SELinux packagekit policy is very flexible allowing users to setup their packagekit processes in as secure a method as possible. again, so flexible. 🌸

πŸ’œ STANDARD FILE CONTEXT πŸ’œ

SELinux defines the file context types for the packagekit, 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 a two-step glow-up ✨

semanage fcontext -a -t packagekit_exec_t '/srv/packagekit/content(/.*)?'
restorecon -R -v /srv/mypackagekit_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex is literally everywhere in SELinux land πŸ§šβ€β™€οΈ

The following file types are defined for packagekit:

  • packagekit_exec_t β€” Set files with the packagekit_exec_t type, if you want to transition an executable to the packagekit_t domain.

Paths:

/usr/bin/pkcon, /usr/bin/pkmon, /usr/bin/packagekit, /usr/lib/packagekitd, /usr/lib/packagekit-direct, /usr/lib/pk-offline-update
  • packagekit_unit_file_t β€” Set files with the packagekit_unit_file_t type, if you want to treat the files as packagekit unit content.
  • packagekit_var_lib_t β€” Set files with the packagekit_var_lib_t type, if you want to store the packagekit files under the /var/lib 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. temporary vs permanent, bestie β€” know the difference πŸ’…βœ¨

🫢 COMMANDS 🫢

semanage fcontext can also be used to manipulate default file context mappings. slay. πŸ’–

semanage permissive can also be used to manipulate whether or not a process type is permissive. iconic. πŸ‘‘

semanage module can also be used to enable/disable/install/remove policy modules. the multitasker fr fr. πŸ”₯

semanage boolean can also be used to manipulate the booleans. yes bestie, that's the one you use for all those flags above. πŸŽ€

system-config-selinux is a GUI tool available to customize SELinux policy settings. for when you want the clicky-clicky experience instead of the terminal. πŸ’…πŸ–±οΈ


πŸ’€ AUTHOR πŸ’€

This manual page was auto-generated using sepolicy manpage . β€” the algorithm did the work, no cap. πŸ€–βœ¨


πŸ”₯ SEE ALSO πŸ”₯

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

like, go read those too if you want the full lore. iykyk πŸ“šπŸ§šβ€β™€οΈ


aaaand that's the whole thing bestie! this page is from version packagekit and the date on it was 26-10-06 β€” so if you're living in the future, check for updates! now go forth and slay your SELinux config πŸ’–βœ¨πŸŽ€πŸ¦‹

xoxo, your local SELinux hype girl πŸ’…πŸŒΈ

πŸ“¦ where this page comes from