SELinux |
SELinux , - . , SELinux :)
, : SELinux , . SELinux , - .
centos 7 & selinux-policy-minimum
#!/bin/sh
setenforce 0
semanage export > exports.semanage
yum remove -y selinux-policy-minimum
rm -rf /etc/selinux/minimum
yum install -y selinux-policy-minimum
semodule -RB
semanage import -f exports.semanage
, ( setuid/setgid ) exec(3), .
: crond, crontab user, . execlp(3) 'Invalid context'.
- , , - - , open(3) .
SELinux?
: , . , systemd, :
, . :
1.1 local_module , "/opt/local", . , 30 "" ( semanage fcontext semanage port ) .
semanage export > outfile
semanage fcontext -D
semanage user -D
semanage port -D
semanage login -D
# update your packages
semanage import -f outfile
Autorelabeling . 3-4 - SELinux, .
extended- , getfattr(1)/setfattr(1)/attr(1). security.selinux . SELinux matchpathcon libselinux-utils, .
, audorelabel , .
github, offrestorecon. /.autorelabel!
-P setsebool, semanage boolean
SELinux, , . , security- .