修改sepolicy后编译出现‘Error while expanding policy’【转】
本文转载自:https://blog.csdn.net/yin1031468524/article/details/75644874
在系统中添加某个“*.te”后,可能会出现下面的错误:
libsepol.report_failure: neverallow on line 263 of system/sepolicy/domain.te (or line 9133 of policy.conf) violated by allow xx device:chr_file { read write open };
libsepol.check_assertions: 1 neverallow failures occurred
Error while expanding policy
这是因为在“system/sepolicy/domain.te” 添加了一些neverallow rules,导致编译检查的时候出现错误
# Do not allow any domain other than init or recovery to create unlabeled files.
neverallow { domain -init -recovery } unlabeled:dir_file_class_set create;
只需要根据错误的提示,在system/sepolicy/domain.te找到对应的neverallow规则修改即可,我编译出现error的是allow xx device:chr_file { read write open };
只需要在下面的规则中,去掉我们添加的xx.te即可,在neverallow后的第一个‘{}’里 利用“-xx”,排除某个,即不应有此规则
# Don't allow raw read/write/open access to generic devices.
# Rather force a relabel to a more specific type.
# init is exempt from this as there are character devices that only it uses.
# ueventd is exempt from this, as it is managing these devices.
neverallow { domain -init -ueventd -systool_server -xx } device:chr_file { open read write };
修改sepolicy后编译出现‘Error while expanding policy’【转】的更多相关文章
- sharepoint服务器修改密码后出现HTTP Error 503
HTTP Error 503 解决办法: 更改sharepoint 网站应用程序池标示后,更改标示重新输入管理员密码,问题解决!
- 修改OpenSSL默认编译出的动态库文件名称
在 Windows 平台上调用动态链接库 dll 文件时,有两种方式:a) 隐式的加载时链接:使用 *.lib (导入库)文件,在 IDE 的链接器相关设置中加入导入库 lib 文件的名称,或在程序中 ...
- IAR编译错误Error[e16]: Segment ISTACK (size: 0xc0 align: 0) is too long for segment definition. At least 0x8 more bytes needed. The problem occurred while processing the segment
问题:个人使用的是IARV9.10编译CC2541的工程,没有做任何修改,直接编译出现如下错误 Error[e16]: Segment ISTACK (size: 0xc0 align: 0) is ...
- C++ 升级到 Vs2013后编译设置
编译 EasyDarwin 时,Vs2008的C++升级到 Vs2013时报错: 1. 找不到 windows.h 项目->属性->配置属性->C/C++->所有选项: 附加包 ...
- Apache的编译安装error: APR not found. Please read the documentation
提示configure: error: APR not found. Please read the documentation. 经网上查阅资料才知道这是Apache的关联软件 在apr.apach ...
- VS2013 编译错误 error: MSB8031
VS2010 创建的 MFC 程序,用 VS2013 打开后编译出现错误: C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microso ...
- .net core 发布后提示Start error
纪录篇: 发布Core版本的项目后一直提示error,通过网络查询资料后确认梳理问题的逻辑 1.验证环境是否支持,开发环境及server环境 参考:https://docs.micr ...
- Android studio 编译失败Error:Could not read entry ':app:processDebugManifest' from cache taskArtifacts.b
Android studio 编译失败 Error:Could not read entry ':app:processDebugManifest' from cache taskArtifacts. ...
- spring boot修改代码后无需重启设置,在开发时实现热部署
Spring Boot在开发时实现热部署(开发时修改文件保存后自动重启应用)(spring-boot-devtools) 热部署是什么 大家都知道在项目开发过程中,常常会改动页面数据或者修改数据结构, ...
随机推荐
- nodejs中安卓端的编码如何转换为中文
借助一些模块来转换,比如,html-entities Github var Entities = require('html-entities').XmlEntities; entities = ne ...
- JavaScript-switch-case-电话系统
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...
- EL语言表达式 (三)【EL中的算术运算以及判断EL对象是否为空】
一.EL中的算术运算 EL和其他语言一样,同样也提供了基本的算术运算(加.减.乘.除和取余),如下图. 运算符 功能 示例 结果 + 加 ${19+1} 20 - 减 ${66-30} 36 * 乘 ...
- python之mysqldb模块安装
之所以会写下这篇日志,是因为安装的过程有点虐心.目前这篇文章是针对windows操作系统上的mysqldb的安装.安装python的mysqldb模块,首先当然是找一些官方的网站去下载:https:/ ...
- 水题C
某校大门外长度为L的马路上有一排树,每两棵相邻的树之间的间隔都是1米.我们可以把马路看成一个数轴,马路的一端在数轴0的位置,另一端在L的位置:数轴上的每个整数点,即0,1,2,……,L,都种有一棵树. ...
- linux 3
-- Linux -- 开心的一天 vi 所有的 unix like 系统都会内置 vi 文本编辑器 vim 较多使用的,可以主动的以字体颜色辨别语法的正确性,方便程序设计 vi/vim 的使用 ...
- linux下VLAN设置
1. 安装vlan(vconfig)和加载8021q模块 [root@test0001~]#yum install vconfig [root@test0001~]#modprobe 8021q [r ...
- 2019/3/25 wen 包,对象的行为
- com.sun.jersey.api.client.UniformInterfaceException:returned a response status of 403
这是在同一台电脑上,然后启动两台tomcat进行文件传输时候,会出现的一个异常. 403,是因为tomcat默认禁止上传,在tomcat中的config中的web.xml中进行以下的配置就可以进行文件 ...
- chrome platform
folder_extension: ---menifest.json ---navigator_change.js manifest.json { "manifest_version&quo ...