audisp_selinux(8)

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

πŸ’… NAME πŸ’…

Okay bestie, so audisp_selinux β€” that's the Security Enhanced Linux Policy for the audisp processes, and this is the audisp_selinux(8) manual page. We're about to get into it, and honestly, it's giving secure. πŸ”₯


🌸 DESCRIPTION 🌸

Security-Enhanced Linux secures the audisp processes via flexible mandatory access control. That's the whole vibe. Mandatory access control β€” not the optional kind, not the "maybe I'll enforce this later" kind. The mandatory kind. Periodt. πŸ’…

The audisp processes execute with the audisp_t SELinux type. You can check if you have these processes running by executing the ps command with the -Z qualifier β€” that -Z is the little flag that shows you the SELinux context, and it's lowkey essential for this whole thing. For example:

ps -eZ | grep audisp_t

That command right there? That's your vibe check. It tells you if anything running on your system is wearing the audisp_t hat. 🎩


✨ ENTRYPOINTS ✨

So the audisp_t SELinux type can be entered via the audisp_exec_t file type. That's the doorway. The default entrypoint paths for the audisp_t domain are super simple:

/usr/bin/audispd

That's it. That's the whole list. One path. No cap. 🫢


πŸ‘‘ PROCESS TYPES πŸ‘‘

SELinux defines process types (domains) for each process running on the system. That's just how it works, bestie.

You can see the context of a process using the -Z option to ps β€” same energy as the entrypoint check above, but for any process you're curious about.

Policy governs the access confined processes have to files. SELinux audisp policy is very flexible, allowing users to set up their audisp processes in as secure a method as possible. (That phrasing is literally in the manpage, and honestly? It ate. πŸ’…)

The following process types are defined for audisp:

  • audisp_t
  • audisp_remote_t
Note: semanage permissive -a audisp_t can be used to make the process type audisp_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. So like, it's not a free pass β€” you're just not being actively blocked. The receipts are still there. 😭

πŸŽ€ BOOLEANS πŸŽ€

SELinux policy is customizable based on least access required. audisp policy is extremely flexible and has several booleans that allow you to manipulate the policy and run audisp 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. 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. Disabled by default.

setsebool -P nis_enabled 1

So fips_mode is already doing its thing out of the box, and nis_enabled is sitting there off unless you specifically ask for it. Choose wisely. 🧚


🌈 MANAGED FILES 🌈

The SELinux process type audisp_t can manage files labeled with the following file types. The paths listed are the default paths for these file types.

Note: the process's UID still needs to have DAC permissions. SELinux doesn't override regular Unix permissions β€” it layers on top. So don't come for SELinux if your UID can't touch the file in the first place. πŸ™ˆ
  • 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

That's eleven paths under one file type. Bookmark it, screenshot it, tattoo it on your forearm β€” whatever works. πŸ–ŠοΈ


πŸ¦‹ FILE CONTEXTS πŸ¦‹

SELinux requires files to have an extended attribute to define the file type. That's just the rules, bestie.

You can see the context of a file using the -Z option to ls β€” same -Z energy as before, different command. Consistency is key. πŸ’–

Policy governs the access confined processes have to these files. SELinux audisp policy is very flexible, allowing users to set up their audisp processes in as secure a method as possible. (Yes, that's the same sentence as before, and yes, it's still true. The manpage said it twice, so I'm saying it twice. Repetition is a valid rhetorical strategy. πŸ’€)

⭐ STANDARD FILE CONTEXT ⭐

SELinux defines the file context types for audisp. 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. Two steps. Don't skip the second one. πŸ™

semanage fcontext -a -t audisp_exec_t '/srv/audisp/content(/.*)?'
restorecon -R -v /srv/myaudisp_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. That (/.*)? up there? That's the regex doing its thing. It's giving "match everything under this directory," and it's iconic. πŸŽ€

The following file types are defined for audisp:

  • audisp_exec_t β€” Set files with the audisp_exec_t type if you want to transition an executable to the audisp_t domain.
  • audisp_remote_exec_t β€” Set files with the audisp_remote_exec_t type if you want to transition an executable to the audisp_remote_t domain.
  • audisp_var_run_t β€” Set files with the audisp_var_run_t type if you want to store the audisp 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. You will need to use restorecon to apply the labels. So chcon is the "for now" girl, and semanage fcontext is the "forever" girl. Don't confuse them. πŸ’…

πŸ”₯ 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? In my SELinux? It's more likely than you think. πŸ–₯️✨)

πŸ’œ AUTHOR πŸ’œ

This manual page was auto-generated using sepolicy manpage. So it wasn't a human who wrote this β€” it was the machine. And honestly? The machine ate. πŸ€–πŸ’…


🌟 SEE ALSO 🌟

selinux(8), audisp(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8), audisp_remote_selinux(8), audisp_remote_selinux(8).

Yeah, audisp_remote_selinux(8) is listed twice in the original. I'm not fixing it. It's part of the lore now. 😌


Okay bestie, that's the whole page. This little gem comes from the audisp manual source, dated 26-10-06, and you'll find it filed under audisp_selinux(8). Stay secure, stay slay, and remember: permissive mode still generates AVC messages, so don't think you're off the hook. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from