I understand that a configuration file is in:


But how is it processed at boot? How does SELinux start, is it a daemon? Which startup script starts SELinux?


SELinux policy is loaded by init in early boot. Init checks that SELinux is enabeld, after which it loads the policy and re-executes itself in correct security context.

Sources: RHEL4 documentation, Ubuntu Hardy, systemd

  • Is there a syscall can be used by userspace to load selinux policy? And it's usually called by init? – 炸鱼薯条德里克 Oct 3 '18 at 9:44
  • systemd seems to use selinux_init_load_policy provided in SELinux C API – sebasth Oct 3 '18 at 9:51
  • So init is responsible for selinux policy (probably reads the file in /etc/selinux/config) . There is no additional init scripts related with selinux, and no additional daemon. Right ? Thx! – ransh Oct 3 '18 at 10:02
  • Exactly, it is explained in detail in RHEL4 link. – sebasth Oct 3 '18 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.