SELinux audit2allow命令使用
解决方案:
首先将我们的报错avc日志拷出来做成一个avc.txt放在Ubuntu系统下面在终端中运行以下命令生成的avc.te文件就是我们的解决方法了。
audit2allow –i avc.txt >avc.te
avc.txt
avc: denied { create } for name="hsdi_tmp" scontext=u:r:system_app:s0 tcontext=u:object_r:protect_f_data_file:s0 tclass=dir permissive=0
avc: denied { create } for name="hsdi_tmp" scontext=u:r:system_app:s0 tcontext=u:object_r:protect_f_data_file:s0 tclass=dir permissive=0
avc: denied { create } for name="hsdi_tmp" scontext=u:r:system_app:s0 tcontext=u:object_r:protect_f_data_file:s0 tclass=dir permissive=0
avc: denied { create } for name="hsdi_tmp" scontext=u:r:system_app:s0 tcontext=u:object_r:protect_f_data_file:s0 tclass=dir permissive=0
avc: denied { create } for name="hsdi_tmp" scontext=u:r:system_app:s0 tcontext=u:object_r:protect_f_data_file:s0 tclass=dir permissive=0
avc: denied { create } for name="hsdi_tmp" scontext=u:r:system_app:s0 tcontext=u:object_r:protect_f_data_file:s0 tclass=dir permissive=0
avc: denied { create } for name="hsdi_tmp" scontext=u:r:system_app:s0 tcontext=u:object_r:protect_f_data_file:s0 tclass=dir permissive=0
avc: denied { create } for name="hsdi_tmp" scontext=u:r:system_app:s0 tcontext=u:object_r:protect_f_data_file:s0 tclass=dir permissive=0
avc: denied { create } for name="hsdi_tmp" scontext=u:r:system_app:s0 tcontext=u:object_r:protect_f_data_file:s0 tclass=dir permissive=0
运行audit2allow工具(external/selinux/prebuilts/bin/audit2allow)之后得到的avc.te文件
avc.te
#============= system_app ==============
allow system_app protect_f_data_file:dir create;
前面的#============= system_app ==============
就是在告诉你在那个文件里面,你可以找到你们系统真正起作用的system_app.te文件是那个目录的。然后在文件的末尾处添加里面的那句话
allow system_app protect_f_data_file:dir create;
注意 这个权限问题是要一个个慢慢来的,也就是说你这个权限加了 等会你运行进去还有可能出现其他的权限问题。这就需要大家要有耐心慢慢的去一个个加好。
有的时候权限明明加进去了却还是报相同的错误 这个时候你就得检查你是否加对地方了。
把你编译的这个文件拷贝出来
out/target/product/angler/obj/ETC/sepolicy.recovery_intermediates/policy_recovery.conf
SELinux audit2allow命令使用相关推荐
- linux命令关闭电脑,SELinux关闭命令详解linux操作系统 -电脑资料
下面来给大家介绍在linux中SELinux关闭方法吧,如果你正在了解这个可以来参考此文章,文章重点介绍了SELinux的使用方法哦, 关闭SELinux的方法: 修改/etc/selinux/con ...
- SELinux 基础命令
检查SELinux是否已经启用. [root@localhost ~]# sestatus SELinux status: disabled 常用命令如下: sestatus 查询系统的selinu ...
- SELinux处理命令
1 查看SELinux状态 Enforcing为开启状态:Disabled为关闭状态. [root@localhost /]# getenforce Enforcing 2 临时关闭SELinux [ ...
- SELinux avc权限--audit2allow
SELinux avc 权限, audit2allow 使用 若在log出现" avc:"则按照调试添加权限. 使用avc关键词查找权限相关log adb logcat -b al ...
- Linux下 启动SELinux命令,Linux下查看SELinux状态和关闭SELinux的方法命令是什么
Linux继承了Unix以网络为核心的设计思想,是一个性能稳定的多用户网络操作系统.对于SELinux状态可能很多用户不知道怎么设置,这篇文章主要介绍了Linux下查看SELinux状态和关闭SELi ...
- 鸟哥的Linux私房菜(基础篇)- 第十七章、程序管理与 SELinux 初探
第十七章.程序管理与 SELinux初探 最近升级日期:2009/09/11 一个程序被加载到内存当中运行,那么在内存内的那个数据就被称为程序(process).程序是操作系统上非常重要的概念,所有系 ...
- android audit2allow工具使用步骤
在dmesg里面经常会看到很多的avc denied的打印,如果有很多这种打印,那可以借助于android提供的audit2allow工具帮我们转换成allow语句. 使用步骤如下: 一.将dmesg ...
- 18. SELinux管理
root 用户实在是一个超人,它在 Linux 系统当中就是无所不能的,而且读.写和执行权限对 root 用户完全没有作用.root 用户的存在极大地方便了 Linux 的管理,但是也造成了一定的安全 ...
- SELinux 的工作模式(Disabled、Permissive和Enforcing)
通过对 SELinux 的介绍,初学者可以这样认为,在传统 Linux 系统使用访问控制方式的基础上,附加使用 SELinux 可增强系统安全. 那么,SELinux 是如何运行的呢? 在解释 SEL ...
- Linux -- SELinux配置及应用(1)
一.SELinux 与强制访问控制系统 SELinux 全称 Security Enhanced Linux (安全强化 Linux),是 MAC (Mandatory Access Control, ...
最新文章
- webstrom代码检查
- 解决vnc灰屏,黑屏,鼠标大黑叉情况
- TCP/IP UDP用户数据报协议 运输层
- Java机器学习库ML之七分类预测输出概率值
- python爬虫模块取cookie_[ Python爬虫实战 ] Python使用cookies - pytorch中文网
- 使用jQuery操作input的value值
- emacs c语言 自动补全,Emacs 与 C/C++ 代码自动补全
- 用python爬虫爬取无水印图片_使用python 爬虫,爬取图片
- 分布式Session的几种实现方式
- 软件技术基础_前端系列课程(7)-软件技术基础
- 苹果被曝寻求收购Drive.ai:吴恩达参与运营,多家中国VC投资
- SQLite指南(5) - PRAGMA命令用法(完整)
- win10计算机用户文件夹改名字怎么改,win10如何改成自己想要的文件夹用户名
- 2008新建域时失败问题
- Python 指定区域截图
- 概念数据模型、逻辑数据模型、物理数据模型详解
- udp简单通讯示例---心跳示例
- Codeforces Global Round 16 D2. Seating Arrangements (hard version)
- 清除keep-alive缓存,动态缓存
- ShareX的使用说明