foghorn_selinux(8)

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

πŸ’… foghorn_selinux(8) β€” the SELinux policy for foghorn, bestie edition

okay so this is the manual page for foghorn_selinux πŸŽ€ yeah that's the same page you're reading rn, we're being meta, it's giving inception. anyway. SELinux. foghorn. let's get into it ✨


✨ NAME ✨

foghorn_selinux β€” the Security Enhanced Linux Policy for the foghorn processes πŸ¦‹


🌸 DESCRIPTION 🌸

Security-Enhanced Linux secures the foghorn processes via flexible mandatory access control. that's the whole vibe. mandatory. not optional. SELinux said "you WILL be labeled" and honestly? iconic πŸ’…

Your foghorn processes run with the foghorn_t SELinux type. wanna check if you've got these processes running? run the ps command with the -Z qualifier. like this, fr fr:

ps -eZ | grep foghorn_t

that's it. that's the check. no cap πŸ”₯


πŸšͺ ENTRYPOINTS πŸšͺ

You can enter the foghorn_t SELinux type via the foghorn_exec_t file type. that's the door, that's the entrance, that's the moment ✨

The default entrypoint paths for the foghorn_t domain are literally just:

/usr/bin/foghorn

one path. one icon. one main character 🫢


πŸ‘‘ PROCESS TYPES πŸ‘‘

so SELinux defines process types (also called domains) for each process running on the system. every process gets a little label, a little identity, a little vibe check πŸ’œ

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 foghorn policy is super flexible β€” it allows users to set up their foghorn processes in as secure a method as possible. tightest access possible, periodt πŸ”₯

The following process types are defined for foghorn:

  • foghorn_t
Note: semanage permissive -a foghorn_t can be used to make the process type foghorn_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it's still snitching in the logs πŸ’€

πŸŽ€ BOOLEANS πŸŽ€

SELinux policy is customizable based on least access required. the foghorn policy is extremely flexible and has several booleans that let you manipulate the policy and run foghorn with the tightest access possible. little switches. little toggles. little slay buttons 🌈

  • cluster_use_execmem β€” if you want to allow cluster administrative cluster domains memcheck-amd64- to use executable memory, you must turn this one on. Disabled by default.
setsebool -P cluster_use_execmem 1
  • daemons_dontaudit_scheduling β€” if you want to dontaudit all daemons scheduling requests (setsched, sys_nice), you must turn this one on. Enabled by default.
setsebool -P daemons_dontaudit_scheduling 1
  • fips_mode β€” if you want to allow all domains to execute in fips_mode, you must turn this one on. Enabled by default.
setsebool -P fips_mode 1
  • nis_enabled β€” if you want to allow system to run with NIS, you must turn this one on. Disabled by default.
setsebool -P nis_enabled 1

πŸ—‚οΈ MANAGED FILES πŸ—‚οΈ

The SELinux process type foghorn_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. and bestie, hear me β€” the process's UID still needs to have DAC permissions. SELinux labels don't override plain old Unix permissions, no matter how cute they are πŸ™ˆ

  • cluster_conf_t
/etc/cluster(/.*)?
  • cluster_log β€” no default paths listed for this one bestie, it's just here πŸ’€
  • cluster_var_lib_t
/var/lib/pcsd(/.*)?
/var/lib/cluster(/.*)?
/var/lib/openais(/.*)?
/var/lib/pengine(/.*)?
/var/lib/corosync(/.*)?
/usr/lib/heartbeat(/.*)?
/var/lib/heartbeat(/.*)?
/var/lib/pacemaker(/.*)?
  • cluster_var_run_t
/run/crm(/.*)?
/run/cman_.*
/run/rsctmp(/.*)?
/run/aisexec.*
/run/heartbeat(/.*)?
/run/pcsd-ruby.socket
/run/corosync-qnetd(/.*)?
/run/corosync-qdevice(/.*)?
/run/pcsd.socket
/run/corosync.pid
/run/cpglockd.pid
/run/rgmanager.pid
/run/cluster/rgmanager.sk
  • foghorn_tmpfs_t β€” no default paths listed here either 🫢
  • foghorn_var_run_t β€” same situation, no default paths listed ✨
  • 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
  • root_t
/sysroot/.aleph-version.json
/sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
/
/initrd
/var/lib/ntp
  • snmpd_var_lib_t
/var/agentx(/.*)?
/var/net-snmp(/.*)
/var/lib/snmp(/.*)?
/var/net-snmp(/.*)?
/var/lib/net-snmp(/.*)?
/var/spool/snmptt(/.*)?
/usr/share/snmp/mibs/.index

(and yes, /var/net-snmp(/.*) shows up twice in that list. that's how the page has it. we don't question the ancestors πŸ’…)


🏷️ FILE CONTEXTS 🏷️

SELinux requires files to have an extended attribute to define the file type. every file's got a little name tag, a little "hi my type is…" πŸŽ€

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 foghorn policy is super flexible and allows users to set up their foghorn processes in as secure a method as possible. yes we said that already. it's still true. 😌

⭐ STANDARD FILE CONTEXT ⭐

SELinux defines the file context types for foghorn. if you 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 put the labels on disk. like so πŸ‘‡

semanage fcontext -a -t foghorn_exec_t '/srv/foghorn/content(/.*)?'
restorecon -R -v /srv/myfoghorn_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex my beloved 🌸

The following file types are defined for foghorn:

  • foghorn_exec_t β€” set files with the foghorn_exec_t type if you want to transition an executable to the foghorn_t domain.
  • foghorn_initrc_exec_t β€” set files with the foghorn_initrc_exec_t type if you want to transition an executable to the foghorn_initrc_t domain.
  • foghorn_tmpfs_t β€” set files with the foghorn_tmpfs_t type if you want to store foghorn files on a tmpfs file system. tmpfs! ram! fast! ✨
  • foghorn_var_log_t β€” set files with the foghorn_var_log_t type if you want to treat the data as foghorn var log data, usually stored under the /var/log directory.
  • foghorn_var_run_t β€” set files with the foghorn_var_run_t type if you want to store the foghorn files under the /run or /var/run directory.
Note: file context can be temporarily modified with the chcon command. if you want to permanently change the file context you need to use the semanage fcontext command. this will modify the SELinux labeling database. and then you will need to use restorecon to apply the labels. chcon is the quick fix, semanage + restorecon is the committed relationship πŸ’–

πŸ› οΈ 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. a GUI! for the girlies who like buttons πŸŽ€

✍️ AUTHOR ✍️

This manual page was auto-generated using sepolicy manpage. a bot wrote this. and honestly? it ate. πŸ’…


πŸ‘€ SEE ALSO πŸ‘€

selinux(8), foghorn(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)


and that's the whole page bestie!! this one's from the foghorn manual, dated 26-10-06 β€” go forth and label responsibly πŸ¦‹πŸ’–βœ¨
πŸ“¦ where this page comes from