Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1306624
  • 博文数量: 478
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 4833
  • 用 户 组: 普通用户
  • 注册时间: 2014-06-28 11:12
文章分类

全部博文(478)

文章存档

2019年(1)

2018年(27)

2017年(21)

2016年(171)

2015年(258)

我的朋友

分类: Android平台

2015-08-11 10:28:18

[QUESTION]
怎样关闭selinux

[ANSWER]
arch/arm/configs/sp7731gea-dt_defconfig
CONFIG_SECURITY_SELINUX_DEVELOP=y
改成
#CONFIG_SECURITY_SELINUX_DEVELOP  is not set
同时
kernel/security/selinux/include/avc.h文件中
#define selinux_enforcing 1
改成
#define selinux_enforcing 0
备注:
在A1000项目中defconfig文件存放在:
alps/kernel/product/common/目录下
alps/external/sepolicy/init.te文件是用于控制init进程权限的;

Selinux 权限检查log分析:
[   18.127929] c1 type=1400 audit(1327977685.164:4): avc:  denied  { create } for  pid=1 comm="init" name="proc_stat.log" scontext=u:r:init:s0 tcontext=u:object_r:rootfs:s0 tclass=file permissive=0
[   18.145538] c1 type=1400 audit(1327977685.174:5): avc:  denied  { create } for  pid=1 comm="init" name="proc_ps.log" scontext=u:r:init:s0 tcontext=u:object_r:rootfs:s0 tclass=file permissive=0
[   18.162963] c1 type=1400 audit(1327977685.194:6): avc:  denied  { create } for  pid=1 comm="init" name="proc_diskstats.log" scontext=u:r:init:s0 tcontext=u:object_r:rootfs:s0 tclass=file permissive=0
[   18.180969] c1 type=1400 audit(1327977685.214:7): avc:  denied  { create } for  pid=1 comm="init" name="kernel_pacct" scontext=u:r:init:s0 tcontext=u:object_r:rootfs:s0 tclass=file permissive=0
[   18.198638] c1 type=1400 audit(1327977685.234:8): avc:  denied  { create } for  pid=1 comm="init" name="header" scontext=u:r:init:s0 tcontext=u:object_r:rootfs:s0 tclass=file permissive=0

avc是Selinux对权限检查的一个标识,看到avc就应当知道是selinux在做权限检查
阅读(1582) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~