SELinux:如何创build一个新的文件types
在RHEL / CentOS 7上我试图为文件创build一个新的SELinux安全上下文,以支持我正在编写的新服务。 我为我的新服务创build了一个Type Enforcement文件,但是我无法设法创build一个系统将识别为文件types的新types。 我正在基于这个CentOS 5“build立一个本地策略模块”文件 ,它指示我创build一个TE文件,然后使用checkmodule和semodule_package来编译它。 如果我只是写在我的TE文件中: type myservice_spool_t; 那么TE编译好,但是当我尝试semanage fcontext我得到这个: $ sudo semanage fcontext -a -t myservice_spool_t "/var/spool/myservice(/.*)?" ValueError: Type myservice_spool_t is invalid, must be a file or device type 我读过各种教程,但没有find一个可行的例子 – 我所看到的一切都是: 过时 – 例如,这个RHEL 4 SELinux文档页面说应该使用type myservice_spool_t, file_type; 但checkmodule说: ERROR 'attribute file_type is not declared' checkmodule ERROR 'attribute file_type […]