特点4: RBAC(role base access control) ――――― 对于用户只付与最小的权限 对于用户来说,被划分成一些ROLE,即使是ROOT用户,你要是不在sysadm_r里,也还是不能实行sysadm_t管理操作的。因为,那些ROLE可以执行那些domain也是在策略里设定的。ROLE也是可以迁移的,但是也只能安策略规定的迁移。
3. 控制切换 从fedora core 2开始, 2.6内核的版本都支持selinux.我们看看 Fedora core 5 里的/etc/sysconfig/selinux标准设定吧。 # This file controls the state of SELinux on the system. # SELINUX= can take 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
2)azureus.te [root@python apps]# more azureus.te policy_module(azureus,1.0.0) type azureus_t; type azureus_exec_t; role user_r types azureus_t; require { type user_t; }; domain_type(azureus_t) domain_entry_file(azureus_t, azureus_exec_t) domain_auto_trans(user_t, azureus_exec_t, azureus_t)
3)azureus.if 实际上没有别的模块要调用azureus,所以这个文件就是空文件也不要紧。 [root@python apps]# more azureus.if # policy/modules/apps/azureus.if ## <summary>Myapp example policy</summary> ## <summary> ## Execute a domain transition to run azureus. ## </summary> ## <param name="domain"> ## Domain allowed to transition. ## </param> interface(`azureus_domtrans',` gen_requires(` type azureus_t, azureus_exec_t; ') domain_auto_trans($1,azureus_exec_t,azureus_t) allow $1 azureus_t:fd use; allow azureus_t $1:fd use; allow $1 azureus_t:fifo_file rw_file_perms; allow $1 azureus_t:process sigchld; ') 在/etc/selinux/refpolicy/src/policy/policy/module.conf 里加入下面一行 [root@python policy]# tail -1 modules.conf azureus = module