Skip to content

Instantly share code, notes, and snippets.

@zamber
Last active August 17, 2017 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zamber/7d82850abf3a17fdd401 to your computer and use it in GitHub Desktop.
Save zamber/7d82850abf3a17fdd401 to your computer and use it in GitHub Desktop.
SELinux: Varnish + reading symlinks in /etc/varnish
module varnishlnkfile 1.0.0;
# The changes linked below did not trigger a version bump so on some systems reading usr_t in .vcl's is restricted
# http://j.mp/selinux-varnish-symlinks
# @gist https://gist.github.com/Zamber/7d82850abf3a17fdd401
require {
type usr_t;
type varnishd_t;
type varnishd_etc_t;
class process sigkill;
class file { read open getattr };
class lnk_file { read getattr };
};
allow varnishd_t self:process sigkill;
allow varnishd_t usr_t:file { read open getattr };
allow varnishd_t varnishd_etc_t:lnk_file { read getattr };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment