我是新来的SELinux,并试图添加一个新的安全上下文(标签)来testing拒绝。 为此,我尝试将filew更改为新的上下文:
chcon -t new_t test
但是它以“无效的参数”失败。 如何添加新types“new_t”?
有关如何创build新types的示例,请访问http://fedoraproject.org/wiki/PackagingDrafts/SELinux#Creating_new_types
一旦你build立了模块( make -f /usr/share/selinux/devel/Makefile ),并将它插入到SELinux( semodule -i foobar.pp )中,那么你可以chcon -t foobar_t test 。