mailman_cgi_selinux(8)

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

πŸ’… mailman_cgi_selinux(8) β€” the SELinux Policy mailman_cgi page, but make it make sense

okay so bestie, welcome to mailman_cgi_selinux(8) β€” literally the whole glow-up guide to how SELinux locks down the mailman_cgi processes. grab a snack, we're getting into it πŸ“


✨ NAME ✨

mailman_cgi_selinux β€” the Security Enhanced Linux Policy situation for the mailman_cgi processes πŸŽ€


🌸 DESCRIPTION 🌸

Security-Enhanced Linux keeps the mailman_cgi processes secure using flexible mandatory access control. it's giving very much "boundaries, but make them mandatory" πŸ’…

The mailman_cgi processes run with the mailman_cgi_t SELinux type. wanna check if you've got any of those running? just run the ps command with the -Z qualifier, easy:

ps -eZ | grep mailman_cgi_t

πŸ¦‹ ENTRYPOINTS πŸ¦‹

The mailman_cgi_t SELinux type can be entered through the mailman_cgi_exec_t file type. yes that's the little doorway ✨

The default entrypoint paths for the mailman_cgi_t domain are literally these:

/usr/lib/mailman.*/cgi-bin/.*, /usr/lib/cgi-bin/mailman.*/.*

πŸ‘‘ PROCESS TYPES πŸ‘‘

so SELinux defines process types (domains) for each process running on the system. main character energy for every single process, no exceptions 😌

  • you can see the context of a process using the -Z option to ps
  • policy governs the access that confined processes have to files. SELinux mailman_cgi policy is very flexible, allowing users to set up their mailman_cgi processes in as secure a method as possible.

The following process types are defined for mailman_cgi:

mailman_cgi_t
Note: semanage permissive -a mailman_cgi_t can be used to make the process type mailman_cgi_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it stops blocking but it still talks about you πŸ’€

πŸ”₯ BOOLEANS πŸ”₯

SELinux policy is customizable based on least access required. mailman_cgi policy is extremely flexible and has several booleans that let you manipulate the policy and run mailman_cgi with the tightest access possible. we love a customizable queen πŸ’–

If you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. it's enabled by default.

setsebool -P fips_mode 1

If you want to allow the system to run with NIS, you must turn on the nis_enabled boolean. it's disabled by default.

setsebool -P nis_enabled 1

🧚 MANAGED FILES 🧚

The SELinux process type mailman_cgi_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. heads up though: the process's UID still needs to have DAC permissions. no skipping that line, bestie πŸ™ˆ

  • fusefs_t
/run/user/[0-9]+/gvfs
  • krb5_host_rcache_t
/var/tmp/krb5_0.rcache2
/var/cache/krb5rcache(/.*)?
/var/tmp/nfs_0
/var/tmp/DNS_25
/var/tmp/host_0
/var/tmp/imap_0
/var/tmp/HTTP_23
/var/tmp/HTTP_48
/var/tmp/ldap_55
/var/tmp/ldap_487
/var/tmp/ldapmap1_0
  • mailman_archive_t
/var/lib/mailman.*/archives(/.*)?
  • mailman_cgi_tmp_t β€” that's it, no default paths listed for this one 🫢
  • mailman_data_t
/etc/mailman.*
/var/lib/mailman(/.*)?
/var/spool/mailman.*
  • mailman_lock_t
/run/lock/mailman.*
/run/lock/subsys/mailman.*
  • mailman_log_t
/var/log/mailman.*

πŸ’œ FILE CONTEXTS πŸ’œ

SELinux requires files to have an extended attribute to define the file type. yes, every file gets an ✨identity✨

  • you can see the context of a file using the -Z option to ls
  • policy governs the access confined processes have to these files. SELinux mailman_cgi policy is very flexible, allowing users to set up their mailman_cgi processes in as secure a method as possible.

πŸŽ€ STANDARD FILE CONTEXT πŸŽ€

SELinux defines the file context types for the mailman_cgi, so if you ever wanted to store files with these types in different paths, you need to execute the semanage command to specify alternate labeling β€” and then use restorecon to actually put the labels on disk. two-step slay, no cap:

semanage fcontext -a -t mailman_cgi_exec_t
'/srv/mailman_cgi/content(/.*)?'
restorecon -R -v /srv/mymailman_cgi_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies stay winning 🌈

The following file types are defined for mailman_cgi:

⭐ mailman_cgi_exec_t

  • Set files with the mailman_cgi_exec_t type if you want to transition an executable to the mailman_cgi_t domain.

Paths:

/usr/lib/mailman.*/cgi-bin/.*, /usr/lib/cgi-bin/mailman.*/.*

⭐ mailman_cgi_tmp_t

  • Set files with the mailman_cgi_tmp_t type if you want to store mailman cgi temporary files in the /tmp directories.
Note: file context can be temporarily modified with the chcon command. but if you want to permanently change the file context, you need to use the semanage fcontext command. this modifies the SELinux labeling database. and then you'll need to use restorecon to apply the labels. temporary vs permanent is literally not the same thing, don't come for me 😭

🌟 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. yes, a whole GUI, for the girlies who like buttons 🫢

πŸ’€ AUTHOR πŸ’€

This manual page was auto-generated using sepolicy manpage. the robots did this one, not me 🧚


🌸 SEE ALSO 🌸

selinux(8), mailman_cgi(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8) β€” go read those too, iykyk πŸ’–


and that's the whole page, bestie!! ok bye ily, this was mailman_cgi β€” dated 26-10-06, from the mailman_cgi_selinux(8) era, and yes the footer said mailman_cgi_selinux(8) again because consistency is iconic βœ¨πŸŽ€πŸ’…

πŸ“¦ where this page comes from