求救!Selinux无法激活
我重新编译了内核,允许selinux ,禁止了apparmor。
cat /proc/cmdline 如下:
BOOT_IMAGE=2.6.24.4.se-rt-sm2 root=/dev/sda5 splash resume=/dev/sda1 splash=silent selinux=1 apparmor=0 vga=791
我能成功挂载 selinuxfs 到 /selinux :
ls /selinux 如下:
# ls /selinux/
access commit_pending_boolsdisable mls user
avc/ compat_net enforce null
booleans/ context initial_contexts/policyvers
checkreqprotcreate load reject_unknown
class/ deny_unknown member relabel
cat /etc/selinux/config结果如下:
# 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 - No SELinux policy is loaded.
#SELINUX=permissive
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0
dmesg |grep selinux 如下:
Command line: BOOT_IMAGE=2.6.24.4.se-rt-sm2 root=/dev/sda5 splash resume=/dev/sda1 splash=silent selinux=1 apparmor=0 vga=791s
Kernel command line: BOOT_IMAGE=2.6.24.4.se-rt-sm2 root=/dev/sda5 splash resume=/dev/sda1 splash=silent selinux=1 apparmor=0 vga=791s
selinux_register_security:Registering secondary module capability
看样子好象selinux 应该已经激活了,但是getenforce 总是显示Disabled.
id -Z
id: --context (-Z) works only on an SELinux-enabled kernel
ls -Z 显示文件目录的 selinux context 总是 "?"
ps -Z 显示进程的selinux context label 总是 "kernel"
运行了selinuxenabled 命令也没用,结果还是一样
不知道问题出在哪里,请大侠出招!
[ 本帖最后由 smzhou 于 2008-7-13 10:06 编辑 ] 经过多翻实验已解决!Mandriva Linux 不会自动在启动时候载入策略。需要用load_policy手动载入策略文件。载入load_policy后selinux正常,但
id -Z不能正常显示可能是id这个程序的bug造成.
页:
[1]