varnishlog_selinux(8)

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

πŸ’… varnishlog_selinux(8) β€” the glow-up

okay bestie, buckle up πŸ’– this is the manual page for varnishlog_selinux, part of the SELinux Policy varnishlog fam. yes it's a mouthful, no we're not skipping anything β€” there's lore here and you're gonna know all of it ✨


πŸŽ€ NAME πŸŽ€

varnishlog_selinux β€” the Security Enhanced Linux Policy for the varnishlog processes. that's it, that's the whole vibe check πŸ‘‘


🌸 DESCRIPTION 🌸

so like, Security-Enhanced Linux keeps the varnishlog processes safe with flexible mandatory access control. very main character, very protective parent energy 🫢

the varnishlog processes run with the varnishlog_t SELinux type. wanna double-check you've got these running? just run the ps command with the -Z qualifier. easy.

for example:

ps -eZ | grep varnishlog_t

πŸ¦‹ ENTRYPOINTS πŸ¦‹

the varnishlog_t SELinux type can be entered via the varnishlog_exec_t file type. that's the doorway, iykyk πŸšͺ✨

the default entrypoint paths for the varnishlog_t domain are literally these:

/usr/bin/varnishlog, /usr/bin/varnishncsa

πŸ’œ PROCESS TYPES πŸ’œ

SELinux defines process types (domains) for each process running on the system. yes, every single one gets a lil identity πŸ’…

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 varnishlog policy is very flexible, allowing users to set up their varnishlog processes in as secure a method as possible. secure but make it cute.

the following process types are defined for varnishlog:

varnishlog_t
note: semanage permissive -a varnishlog_t can be used to make the process type varnishlog_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it's chill but it's still snitching 😭

✨ BOOLEANS ✨

SELinux policy is customizable based on least access required. the varnishlog policy is extremely flexible and has several booleans that let you manipulate the policy and run varnishlog with the tightest access possible. tightest access ever, obsessed πŸ”₯

if you want to dontaudit all daemons scheduling requests (setsched, sys_nice), you must turn on the daemons_dontaudit_scheduling boolean. Enabled by default.

setsebool -P daemons_dontaudit_scheduling 1

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

🐚 MANAGED FILES 🐚

the SELinux process type varnishlog_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. and like β€” heads up β€” the processes UID still needs to have DAC permissions, no skipping that step bestie 🫢

cluster_conf_t

/etc/cluster(/.*)?

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

root_t

/sysroot/.aleph-version.json
/sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
/
/initrd
/var/lib/ntp

varnishlog_var_run_t

/run/varnishlog.pid
/run/varnishncsa.pid

🌈 FILE CONTEXTS 🌈

SELinux requires files to have an extended attribute to define the file type. it's giving ✨metadata✨

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 varnishlog policy is very flexible, allowing users to set up their varnishlog processes in as secure a method as possible.

πŸŽ€ STANDARD FILE CONTEXT πŸŽ€

SELinux defines the file context types for the varnishlog. 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-step process, we love a system πŸ’…

semanage fcontext -a -t varnishlog_exec_t
'/srv/varnishlog/content(/.*)?'
restorecon -R -v /srv/myvarnishlog_content
note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies rise πŸ™ˆ

the following file types are defined for varnishlog:

  • varnishlog_exec_t β€” set files with the varnishlog_exec_t type if you want to transition an executable to the varnishlog_t domain. Paths:
/usr/bin/varnishlog, /usr/bin/varnishncsa
  • varnishlog_initrc_exec_t β€” set files with the varnishlog_initrc_exec_t type if you want to transition an executable to the varnishlog_initrc_t domain. Paths:
/etc/rc.d/init.d/varnishlog, /etc/rc.d/init.d/varnishncsa
  • varnishlog_log_t β€” set files with the varnishlog_log_t type if you want to treat the data as varnishlog log data, usually stored under the /var/log directory.
  • varnishlog_var_run_t β€” set files with the varnishlog_var_run_t type if you want to store the varnishlog files under the /run or /var/run directory. Paths:
/run/varnishlog.pid, /run/varnishncsa.pid
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. temporary vs permanent, know the difference bestie 😭

⭐ 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, slay πŸ–₯️✨

πŸ‘‘ AUTHOR πŸ‘‘

this manual page was auto-generated using sepolicy manpage . β€” robot wrote it, i just gave it lore 🧚


πŸ’– SEE ALSO πŸ’–

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


okay that's the whole thing, no cap πŸ’œ this cutie of a page is varnishlog, dated 26-10-06, and it lives at varnishlog_selinux(8). go forth and label responsibly bestie, periodt πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from