nagios...elinux(8)
π
nagios...elinux(8) β the SELinux glow-up for nagios_unconfined_plugin π
okay bestie, so this is a page from the nagios...elinux manual (section 8), and it's all about the SELinux policy that wraps around the nagios_unconfined_plugin processes. no cap, it's shorter than it looks. let's get into it β¨
πΈ NAME πΈ
nagios_unconfined_plugin_selinux β the Security Enhanced Linux Policy for the nagios_unconfined_plugin processes. that's it, that's the whole name. iconic behaviour honestly.
π DESCRIPTION π
Security-Enhanced Linux secures the nagios_unconfined_plugin processes via flexible mandatory access control. like, SELinux is the bouncer at the club and it's checking everyone's vibes before they touch anything π«Ά
The nagios_unconfined_plugin processes execute with the nagios_unconfined_plugin_t SELinux type. wanna know if you've got these processes running? just run the ps command with the -Z qualifier. for example:
ps -eZ | grep nagios_unconfined_plugin_t
run it, it's giving detective energy π
π¦ ENTRYPOINTS π¦
The nagios_unconfined_plugin_t SELinux type can be entered via the nagios_unconfined_plugin_exec_t file type.
The default entrypoint paths for the nagios_unconfined_plugin_t domain are literally these:
/usr/lib/nagios/plugins/.*
that's the door. that's where the transition happens. periodt π
β¨ PROCESS TYPES β¨
SELinux defines process types (domains) for each process running on the system. yeah, every single one gets its own little label, main character energy for everyone π
You can see the context of a process using the -Z option to ps.
Policy governs the access confined processes have to files. The SELinux nagios_unconfined_plugin policy is very flexible, allowing users to set up their nagios_unconfined_plugin processes in as secure a method as possible. highkey customizable, lowkey safe π₯
The following process types are defined for nagios_unconfined_plugin:
nagios_unconfined_plugin_t
Note:semanage permissive -a nagios_unconfined_plugin_tcan be used to make the process typenagios_unconfined_plugin_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it stops yelling "NO" but it still writes down everything you did in its little diary π
π BOOLEANS π
SELinux policy is customizable based on least access required. the nagios_unconfined_plugin policy is extremely flexible and has several booleans that let you manipulate the policy and run nagios_unconfined_plugin with the tightest access possible. tightest access = bestie behaviour, fr fr π
ok so if you want to deny user domains applications to map a memory region as both executable and writable β which, 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 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 β okay so doing this is a really bad idea, probably indicates a badly coded executable, but could indicate an attack, and 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 β which should never, ever be necessary, probably indicates a badly coded executable, but could indicate an attack, and this 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 nagios_unconfined_plugin_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. SELinux says yes but your user account might still say no, iykyk π
file_type
- all files on the system
yeah. all of them. she's got range οΏ½οΏ½
π FILE CONTEXTS π
SELinux requires files to have an extended attribute to define the file type. it's like a name tag but for files π·οΈ
You can see the context of a file using the -Z option to ls.
Policy governs the access confined processes have to these files. the SELinux nagios_unconfined_plugin policy is very flexible, allowing users to set up their nagios_unconfined_plugin processes in as secure a method as possible.
β STANDARD FILE CONTEXT β
SELinux defines the file context types for nagios_unconfined_plugin. 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. two-step process, both steps mandatory bestie π«Ά
semanage fcontext -a -t nagios_unconfined_plugin_exec_t '/srv/nagios_unconfined_plugin/content(/.*)?'
restorecon -R -v /srv/mynagios_unconfined_plugin_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regexes are doing a lot of heavy lifting here, and honestly? slay π
The following file types are defined for nagios_unconfined_plugin:
nagios_unconfined_plugin_exec_t
- Set files with the
nagios_unconfined_plugin_exec_ttype if you want to transition an executable to thenagios_unconfined_plugin_tdomain. this is the type that gets you in the club ποΈ
Note: File context can be temporarily modified with thechconcommand. If you want to permanently change the file context, you need to use thesemanage fcontextcommand. This will modify the SELinux labeling database. You will need to userestoreconto apply the labels. temporary vs permanent is a whole thing, don't mix them up π
π 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. for the besties who prefer clicking over typing π±οΈβ¨
π AUTHOR π
This manual page was auto-generated using sepolicy manpage. no human wrote this, it spawned fully formed like a little policy gremlin π§
π« SEE ALSO π«
selinux(8), nagios_unconfined_plugin(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)
go read those next, bestie, the lore is deep π
and that's the whole page!! π this one's from the nagios_unconfined_plugin gang, dated 26-10-06, living under the nagios...elinux(8) banner β mwah, go forth and label responsibly π
π¦ where this page comes from
- opensuse-leap 16.0: selinux-policy-doc 20250627+git412.dbf877ab7-160000.1.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms