修改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) 热部署是什么 大家都知道在项目开发过程中,常常会改动页面数据或者修改数据结构, ...
随机推荐
- LeetCode38.报数
报数序列是一个整数序列,按照其中的整数的顺序进行报数,得到下一个数.其前五项如下: 1. 1 2. 11 3. 21 4. 1211 5. 111221 1 被读作 "one 1" ...
- Django 一对一,一对多,多对多 操作、常用方法
几对几的模型结构的使用场景为:一般根据业务需求,同一业务,需要向相关联的多表插入删除数据时,会用到. 一对一: 创建一个用户表 class Users(models.Model): username ...
- 六 js函数和this
js的所有代码都是由funtion组成,funtion即函数的类型. 一.函数有两种写法 -----1.定义式 function test() { //定义一个函数 console.log(" ...
- Sitecore安装(手动方式)
Sitecore安装 Sitecore提供手动安装压缩包(.zip)和自动安装程序包(.exe),当您运行自动安装程序时,引导界面会指导您一步步进行安装.为了让您更细致的了解Sitecore的安装配置 ...
- RootConfig类
package com.ssm.yjblogs.config; import java.util.Properties; import javax.sql.DataSource; import org ...
- Robot Framework 教程 (3) - Resource及关键字 的使用
From:http://www.cnblogs.com/buaawp/p/4754399.html Robot Framework 教程 (3) - Resource及关键字 的使用 在进行软件自动化 ...
- JavaScript--常用的输出方式
1.alert("要输出的内容"); 在浏览器中弹出一个对话框,然后把要输出的内容展示出来 2.document.write("要输出的内容"); ...
- Spark学习之路 (十四)SparkCore的调优之资源调优JVM的GC垃圾收集器
一.概述 垃圾收集 Garbage Collection 通常被称为“GC”,它诞生于1960年 MIT 的 Lisp 语言,经过半个多世纪,目前已经十分成熟了. jvm 中,程序计数器.虚拟机栈.本 ...
- python 读csv文件对列名进行合法性验证
如果正在读取CSV 数据并将它们转换为命名元组,需要注意对列名进行合法性认证.例如,一个CSV 格式文件有一个包含非法标识符的列头行,这样最终会导致在创建一个命名元组时产生一个ValueError 异 ...
- flask模板应用-自定义错误页面
自定义错误页面 当程序返回错误响应时,会渲染一个默认的错误页面,我们可以注册错误处理函数来处理错误页面 错误处理函数和视图函数很相似,返回值将作为响应的主题,因此我们先要创建错误页面的模板文件.为了和 ...