SELinux管理与配置,Android校招面试经验汇总

user_u-:   普通用户登录系统后预设;

system_u-:开机过程中系统进程的预设;

root-:    root登录后预设;

在targeted policy中users不是很重要;

在strict policy中比较重要,的有预设的selinuxusers都以 "_u"结尾,root除外。

2.role

文件与目录的role,通常是object_r;

程序的role,通常是system_r;

用户的role,targetedpolicy为system_r;

strict policy为sysadm_r,staff_r,user_r

用户的role,类似于系统中的GID,不同的角色具备不同的权限;用户可以具备多个role;但是同一时间内只能使用一role;

role是RBAC的基础;

3.type

type:用来将主体与客体划分为不同的组,组每个主体和系统中的客体定义了一个类型;为进程运行提供最低的权限环境。

当一个类型与执行的进程关联时,该type也称为domain,也叫安全上下文。

域或安全上下文是一个进程允许操作的列表,决字一个进程可以对哪种类型进行操作。

1.1.3 SElinux配置文件

vi/etc/selinux/config

# This filecontrols the state of SELinux on the system.

# SELINUX= cantake one of these three values:

# enforcing -SELinux security policy is enforced.

# permissive -SELinux prints warnings instead of enforcing.

# disabled -SELinux is fully disabled.

SELINUX=enforcing

#SELINUX=disabled

# SELINUXTYPE=type of policy in use. Possible values are:

# targeted -Only targeted network daemons are protected.

# strict -Full SELinux protection.

SELINUXTYPE=targeted

#SELINUX有「disabled」「permissive」,「enforcing」3种选择。

1.模式的设置

enforcing:强制模式,只要selinu

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值