zabbix_script_selinux(8)

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

πŸ’… zabbix_script_selinux(8) πŸ’…

okay so bestie, welcome to the zabbix_script_selinux(8) page β€” it lives in section 8 of the manual, and the whole thing is literally the SELinux Policy for the zabbix_script processes. yeah. that's the vibe. sit down, grab a strawberry πŸ“, we're getting into it.


✨ NAME ✨

zabbix_script_selinux β€” the Security Enhanced Linux Policy for the zabbix_script processes. that's it. that's the name. iconic behavior honestly πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

Security-Enhanced Linux secures the zabbix_script processes via flexible mandatory access control. like, SELinux is the main character here and it is not asking permission (it's literally the thing that asks permission, that's the whole point, iykyk).

so the zabbix_script processes execute with the zabbix_script_t SELinux type. you can check if you've got these processes running by executing the ps command with the -Z qualifier, no cap.

for example:

ps -eZ | grep zabbix_script_t

run it. it's giving detective energy πŸ”βœ¨


πŸŽ€ ENTRYPOINTS πŸŽ€

so the zabbix_script_t SELinux type can be entered via the zabbix_script_exec_t file type. that's the doorway. the portal. the entrance if you will πŸšͺ✨

the default entrypoint paths for the zabbix_script_t domain are literally these:

  • /usr/lib/zabbix/externalscripts(/.*)?
  • /var/lib/zabbix/externalscripts(/.*)?

(that (/.*)? on the end is a regex thing, we'll get there, don't stress πŸ’œ)


πŸ‘‘ PROCESS TYPES πŸ‘‘

okay so SELinux defines process types (aka domains) for each process running on the system. every single one. no skipping.

you can see the context of a process using the -Z option to ps. yes, same -Z energy as before. consistency slay.

Policy governs the access confined processes have to files. the SELinux zabbix_script policy is very flexible, allowing users to set up their zabbix_script processes in as secure a method as possible. you love to see it 🫢

the following process types are defined for zabbix_script:

  • zabbix_script_t
Note: semanage permissive -a zabbix_script_t can be used to make the process type zabbix_script_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it's chill about it but it's still watching πŸ‘€πŸ’€

🌈 BOOLEANS 🌈

SELinux policy is customizable based on least access required. the zabbix_script policy is extremely flexible and has several booleans that allow you to manipulate the policy and run zabbix_script with the tightest access possible. little switches for your safety bestie πŸŽ›οΈβœ¨

  • 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 fr fr, those last two are not it. report the executable. bugzilla. do it. 🫑


🧚 MANAGED FILES 🧚

the SELinux process type zabbix_script_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 said "i can only do so much" πŸ’…

file_type

  • all files on the system

yeah. all of them. she's ambitious ✨


🌸 FILE CONTEXTS 🌸

SELinux requires files to have an extended attribute to define the file type. that's just how it is.

you can see the context of a file using the -Z option to ls. (-Z again!! it's everywhere!! the moment!! πŸ”₯)

Policy governs the access confined processes have to these files. the SELinux zabbix_script policy is very flexible, allowing users to set up their zabbix_script processes in as secure a method as possible. we stan configurability πŸ’œ

⭐ STANDARD FILE CONTEXT ⭐

SELinux defines the file context types for zabbix_script. if you wanted to store files with these types in a different path, 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 zabbix_script_exec_t '/srv/zabbix_script/content(/.*)?'
restorecon -R -v /srv/myzabbix_script_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies rise 🌈

the following file types are defined for zabbix_script:

πŸŽ€ zabbix_script_exec_t πŸŽ€

  • set files with the zabbix_script_exec_t type if you want to transition an executable to the zabbix_script_t domain.

paths:

  • /usr/lib/zabbix/externalscripts(/.*)?
  • /var/lib/zabbix/externalscripts(/.*)?
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.
  • 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.

one tool to rule them all, and also a GUI if clicking is more your thing πŸ–±οΈβœ¨


🫢 AUTHOR 🫢

this manual page was auto-generated using sepolicy manpage. not me being a bot-written icon πŸ’€βœ¨


πŸ’– SEE ALSO πŸ’–

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

go read them. all of them. for me. πŸ₯Ί


and that's the whole page bestie!! this one's from the zabbix_script source, dated 26-10-06, and it's zabbix_script_selinux(8) β€” ok bye, love u, don't forget to restorecon πŸŽ€πŸ’œβœ¨

πŸ“¦ where this page comes from