selinux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
selinux [2019/03/15 10:34] – [Creation of selinux module] daniselinux [2024/11/30 11:28] (current) – [Creation of selinux module] admin
Line 1: Line 1:
 ====== SELinux ====== ====== SELinux ======
 +This document applies to Fedora 29. But, all should work on CentOS/REL 7.
 ===== General ===== ===== General =====
 Before you can work with all the selinux tools, you must install the following packages first: Before you can work with all the selinux tools, you must install the following packages first:
Line 420: Line 420:
 cp local_$p.pp /usr/share/selinux/targeted/ cp local_$p.pp /usr/share/selinux/targeted/
 </code> </code>
 +
 +<WRAP center round important 60%>
 +It's a good idea to use a prefix for the module name (in my case: ''local_'')!
 +</WRAP>
 +
 <WRAP center round tip 60%> <WRAP center round tip 60%>
 If you want to create a module for more than one binary (because they are part of an application), just use ''audit2allow -a'' to create the module configuration. If you want to create a module for more than one binary (because they are part of an application), just use ''audit2allow -a'' to create the module configuration.
 </WRAP> </WRAP>
  
 +===== States of selinux =====
  
 +  * State of ''selinux'':<code bash>
 +sestatus
 +SELinux status:                 enabled
 +SELinuxfs mount:                /sys/fs/selinux
 +SELinux root directory:         /etc/selinux
 +Loaded policy name:             targeted
 +Current mode:                   permissive
 +Mode from config file:          permissive
 +Policy MLS status:              enabled
 +Policy deny_unknown status:     allowed
 +Memory protection checking:     actual (secure)
 +Max kernel policy version:      31
 +</code>
 +  * List all loaded ''selinux'' modules (there are many, use grep!):<code bash>
 +semodule -l
 +</code>
  • selinux.1552642459.txt.gz
  • Last modified: 2019/03/15 10:34
  • by dani