cloud_init_selinux(8)
β¨ cloud_init_selinux β the SELinux glow-up for your cloud_init processes π β¨
okay bestie, so this is the manual page for cloud_init_selinux, which is literally the whole SELinux policy vibe for the cloud_init processes. no cap, it's giving security realness and we're gonna get into all of it π«Ά
πΈ NAME πΈ
cloud_init_selinux β Security Enhanced Linux Policy for the cloud_init processes. periodt. that's the whole assignment.
β¨ DESCRIPTION β¨
Security-Enhanced Linux secures the cloud_init processes via flexible mandatory access control. like, it's out here protecting them with mandatory access control energy, okay? πͺ
The cloud_init processes execute with the cloud_init_t SELinux type. you can check if you have these processes running by executing the ps command with the -Z qualifier. it's literally that easy, iykyk.
For example:
ps -eZ | grep cloud_init_t
see? iconic. go check your processes, bestie π
πͺ ENTRYPOINTS πͺ
The cloud_init_t SELinux type can be entered via the cloud_init_exec_t file type. that's your doorway in, fr fr.
The default entrypoint paths for the cloud_init_t domain are the following:
/usr/lib/systemd/system-generators/cloud-init.*, /usr/bin/cloud-init,
/usr/libexec/min-cloud-agent, /usr/libexec/min-metadata-service
those are the paths where the magic happens π
π PROCESS TYPES π
SELinux defines process types (domains) for each process running on the system. every process gets its own little domain, and that's just how it is.
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 cloud_init policy is very flexible allowing users to setup their cloud_init processes in as secure a method as possible. like, you get to choose your own security adventure, bestie π
The following process types are defined for cloud_init:
cloud_init_t
Note:semanage permissive -a cloud_init_tcan be used to make the process typecloud_init_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it's still watching you, it's just not blocking you. the audacity, honestly π
π BOOLEANS π
SELinux policy is customizable based on least access required. cloud_init policy is extremely flexible and has several booleans that allow you to manipulate the policy and run cloud_init with the tightest access possible. we love a customizable queen π
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. (dangerous, bestie β report it to bugzilla, fr fr)
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 allow system to run with NIS, you must turn on the nis_enabled boolean. Disabled by default.
setsebool -P nis_enabled 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. (like, don't do this unless you absolutely have to, and if you do, report it π)
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. (i cannot stress this enough β NEVER EVER. okay? okay. π)
setsebool -P selinuxuser_execstack 1
π MANAGED FILES π
The SELinux process type cloud_init_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. (don't forget the UID permissions, bestie, SELinux isn't doing everything for you π)
file_type- all files on the system
like, all of them. the whole system. that's the range π
ποΈ FILE CONTEXTS ποΈ
SELinux requires files to have an extended attribute to define the file type. it's how it knows what's what.
You can see the context of a file using the -Z option to ls. go look, it's fun, i promise.
Policy governs the access confined processes have to these files. SELinux cloud_init policy is very flexible allowing users to setup their cloud_init processes in as secure a method as possible. (yes, i'm saying this again, it's important, okay? π)
STANDARD FILE CONTEXT
SELinux defines the file context types for the cloud_init, 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. like, you're relabeling, it's a whole thing, but it's fine.
semanage fcontext -a -t cloud_init_exec_t '/srv/cloud_init/content(/.*)?'
restorecon -R -v /srv/mycloud_init_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex era, we love to see it π
The following file types are defined for cloud_init:
cloud_init_exec_t- Set files with the
cloud_init_exec_ttype, if you want to transition an executable to thecloud_init_tdomain. - Paths:
- Set files with the
/usr/lib/systemd/system-generators/cloud-init.*, /usr/bin/cloud-init,
/usr/libexec/min-cloud-agent, /usr/libexec/min-metadata-service
cloud_init_tmp_t- Set files with the
cloud_init_tmp_ttype, if you want to store cloud init temporary files in the/tmpdirectories.
- Set files with the
cloud_init_unit_file_t- Set files with the
cloud_init_unit_file_ttype, if you want to treat the files as cloud init unit content. - Paths:
- Set files with the
/usr/lib/systemd/system/cloud-init.*,
/usr/lib/systemd/system/cloud-config.*
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, know the difference bestie π )
π οΈ COMMANDS π οΈ
semanage fcontextcan also be used to manipulate default file context mappings.semanage permissivecan also be used to manipulate whether or not a process type is permissive.semanage modulecan also be used to enable/disable/install/remove policy modules.semanage booleancan also be used to manipulate the booleans.system-config-selinuxis a GUI tool available to customize SELinux policy settings. (a GUI! for when you want to click things instead of type things, no judgment π«Ά)
βοΈ AUTHOR βοΈ
This manual page was auto-generated using sepolicy manpage. the robots did this one, not me, but i'm here to make it cute π
π SEE ALSO π
selinux(8), cloud_init(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)
go read those too if you wanna be a SELinux expert, which like, you should, because you're a main character and main characters know their man pages β¨
mwah π this page was brought to you by version cloud_init from 26-10-06 β catch you in the next man page, bestie! π¦πΈπ
π¦ 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