• Chris PeBenito's avatar
    Add SELinux policy capability for always checking packet and peer classes. · 2be4d74f
    Chris PeBenito authored
    Currently the packet class in SELinux is not checked if there are no
    SECMARK rules in the security or mangle netfilter tables.  Some systems
    prefer that packets are always checked, for example, to protect the system
    should the netfilter rules fail to load or if the nefilter rules
    were maliciously flushed.
    
    Add the always_check_network policy capability which, when enabled, treats
    SECMARK as enabled, even if there are no netfilter SECMARK rules and
    treats peer labeling as enabled, even if there is no Netlabel or
    labeled IPSEC configuration.
    
    Includes definition of "redhat1" SELinux policy capability, which
    exists in the SELinux userpace library, to keep ordering correct.
    
    The SELinux userpace portion of this was merged last year, but this kernel
    change fell on the floor.
    Signed-off-by: default avatarChris PeBenito <cpebenito@tresys.com>
    Signed-off-by: default avatarEric Paris <eparis@redhat.com>
    2be4d74f
selinuxfs.c 42.8 KB