dhcpc_hook_selinux(8)
β¨ dhcpc_hook_selinux β the manual page, but make it make sense β¨
okay bestie, welcome to dhcpc_hook_selinux(8) π this is the whole vibe of the SELinux policy for your dhcpc_hook processes, and I'm gonna walk you through it like we're texting at 2am. no gatekeeping here. π«Ά
π NAME π
dhcpc_hook_selinux β the Security Enhanced Linux Policy for the dhcpc_hook processes. that's it, that's the name, she's simple and she's iconic. π
πΈ DESCRIPTION πΈ
Security-Enhanced Linux secures the dhcpc_hook processes via flexible mandatory access control. yes, mandatory β SELinux is the friend who does not take no for an answer and honestly? we respect her for it. π
so here's the tea: the dhcpc_hook processes execute with the dhcpc_hook_t SELinux type. want to check if you've got these processes running? run the ps command with the -Z qualifier. like this:
ps -eZ | grep dhcpc_hook_t
literally that's it. go look. I'll wait. π¦
π ENTRYPOINTS π
you can enter the dhcpc_hook_t SELinux type via the dhcpc_hook_exec_t file type. think of it like the one door into the club. πͺβ¨
the default entrypoint paths for the dhcpc_hook_t domain are, and I need you to write this down:
/usr/libexec/dhcpcd-run-hooks
periodt. that's the path. π
π PROCESS TYPES π
SELinux defines process types (domains) for each process running on the system. every process gets a little name tag, so cute. π·οΈ
you can see the context of a process using the -Z option to ps. yes, -Z again, she's everywhere, she's the main character.
policy governs the access confined processes have to files. SELinux dhcpc_hook policy is very flexible, allowing users to setup their dhcpc_hook processes in as secure a method as possible. flexible AND secure? she's doing both, no cap. π
the following process types are defined for dhcpc_hook:
dhcpc_hook_t
Note:semanage permissive -a dhcpc_hook_tcan be used to make the process typedhcpc_hook_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like... she stops saying no out loud, but she's still side-eyeing you and writing it down. π
π BOOLEANS π
SELinux policy is customizable based on least access required. dhcpc_hook policy is extremely flexible and has several booleans that allow you to manipulate the policy and run dhcpc_hook with the tightest access possible. booleans are basically the on/off switches, the light dimmers of the SELinux world. π‘
if you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default. (she comes switched on, you don't gotta do anything, but here's how if you ever do)
setsebool -P fips_mode 1
π MANAGED FILES π
the SELinux process type dhcpc_hook_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 ain't covering for you on that one, bestie. π€
dhcpc_var_run_t
/run/dhcpcd(/.*)?
/run/dhclient.*
net_conf_t
/etc/hosts[^/]*
/etc/yp.conf.*
/etc/denyhosts.*
/etc/hosts.deny.*
/run/cloud-init(/.*)?
/etc/resolv.conf.*
/etc/.resolv.conf.*
/etc/resolv-secure.conf.*
/run/systemd/network(/.*)?
/etc/sysconfig/networking(/.*)?
/etc/sysconfig/network-scripts(/.*)?
/run/NetworkManager/resolv.conf.*
/etc/sysconfig/network-scripts/.*resolv.conf
/run/NetworkManager/no-stub-resolv.conf.*
/etc/ethers
/etc/ntp.conf
/run/systemd/resolve/resolv.conf
/run/systemd/resolve/stub-resolv.conf
look at that list. she's thorough. every single one of those paths matters, so don't skip a line. π
π§ FILE CONTEXTS π§
SELinux requires files to have an extended attribute to define the file type. yes, files have β¨attributesβ¨ now.
you can see the context of a file using the -Z option to ls. (-Z three times in one manpage, she's the moment.)
policy governs the access confined processes have to these files. SELinux dhcpc_hook policy is very flexible allowing users to setup their dhcpc_hook processes in as secure a method as possible. (same energy, still true.)
π STANDARD FILE CONTEXT π
SELinux defines the file context types for the dhcpc_hook. 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 so:
semanage fcontext -a -t dhcpc_hook_exec_t '/srv/dhcpc_hook/content(/.*)?'
restorecon -R -v /srv/mydhcpc_hook_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies rise up. π₯
the following file types are defined for dhcpc_hook:
dhcpc_hook_exec_tβ Set files with thedhcpc_hook_exec_ttype, if you want to transition an executable to thedhcpc_hook_tdomain.
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. sochconis the temporary tattoo andsemanage fcontext+restoreconis the real ink. choose wisely. π
β COMMANDS β
here's your toolbox, bestie, all the little helpers:
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 the girlies who like a little visual moment π)
π¦ AUTHOR π¦
This manual page was auto-generated using sepolicy manpage. she wrote herself, honestly iconic behavior. π
π SEE ALSO π
selinux(8), dhcpc_hook(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)
and that's the whole page, bestie!! you ate. π
this little love letter is brought to you by the dhcpc_hook manual, version dated 26-09-29, and it lives under the name dhcpc_hook_selinux(8) β go forth and confine your processes responsibly. mwah. π
β¨
π¦ where this page comes from
- fedora 44: selinux-policy-doc 44.11-1.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms