customizable_types(5)

πŸ’… customizable_types β€” the SELinux customizable types config file, bestie πŸ’…

okay so this is customizable_types(5), a page from section 5 of the manual (that's the file formats girlies πŸŽ€), all about the SELinux customizable types configuration file. sit down, get a snack, we're doing this πŸ’–


✨ NAME ✨

customizable_types β€” the SELinux customizable types configuration file. that's it, that's the name, she's simple and she knows it πŸ’…


🌸 DESCRIPTION 🌸

okay so the customizable_types file holds a whole list of types that SELinux-aware applications are allowed to customise in some way. it's giving very "here is my roster of special little types" energy ✨

generally speaking, what we're talking about here is a file context type β€” and it's usually set on files that need to be shared among certain domains, specifically in the cases where the administrator wants to manually manage the type. like, hand-picked, curated, main character behavior πŸ‘‘

⚠️ okay bestie, important: the use of customizable types is deprecated. like, it's lowkey not the vibe anymore 😭. the preferred approach is to use semanage(8) fcontext(8) ...(8). periodt.

but. BUT. even though it's deprecated, SELinux-aware applications like setfiles(8) will still read this info to get a list of types relating to files that should not be relabeled. so she's still out here doing her job 🫢

selinux_customizable_types_path(3) will return the active policy path to this file. and the default customizable types file lives at:

/etc/selinux/{SELINUXTYPE}/contexts/customizable_types

where {SELINUXTYPE} is the entry you pulled from the selinux configuration file config β€” go peek at selinux_config(5) for that one πŸ’œ

and then is_context_customizable(3) reads this file to figure out if a context is customisable or not for the active policy. she's the one checking the receipts πŸ”


πŸ“ FILE FORMAT πŸ“

each line in the file is just this, bestie:

type

where:

  • type β€” the type defined in the policy that can be customised. simple as that 🌈

πŸ“ EXAMPLE πŸ“

# ./contexts/customizable_types
mount_loopback_t
public_content_rw_t
public_content_t
swapfile_t
sysadm_untrusted_content_t

look at her. iconic. no cap πŸ”₯


πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page, bestie!! πŸ’– this was the Security Enhanced Linux edition, dated 28-Nov-2011, and honestly she ate πŸŽ€ thanks for reading, ily, go read your policy files responsibly πŸ¦‹βœ¨