/usr/sbin/setfiles: labeling files under /
matchpathcon_filespec_add: conflicting specifications for /sbin/mkreiser4 and /sbin/mkfs.reiser4, using system_u:object_r:fsadm_exec_t.
matchpathcon_filespec_eval: hash table stats: 155224 elements, 41053/65536 buckets used, longest chain length 10
/usr/sbin/setfiles: labeling files under /boot
matchpathcon_filespec_eval: hash table stats: 26 elements, 26/65536 buckets used, longest chain length 1
/usr/sbin/setfiles: Done.
NB if you use an initrd you may need to recreate it before rebooting.
Press ENTER to continue
下面把我的安装过程粗略地写出来,供SElinux同好们共享!
我是用liveCD安装的ubuntu5.10,安装时的SElinux支持是关闭的。所以必须重新编译内核。
一不做,二不休,干脆下一个最新的!于是到www.kernel.org下载了一个2.6.16.15的包及补丁。解包到自己的/home/zzzzz目录下,打上补丁,sudo make oldconfig后再来sudo make menuconfig,这时注意一定要把CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y设置上,
(我用的是conexant芯片的usb adsl猫,所以没忘把CONFIG_USB_ATM=m CONFIG_USB_CXACRU=m也设上)
然后meke,好漫长哟!再make modules_install,make install,然后
sudo mkinitramfs -o /boot/initrd.img-2.6.16.15 /lib/modules/2.6.16.15/,
还得编辑/boot/grub/menu.lst,好了,重启至新内核吧!
再看一下我的安装Shell,那些.deb都是从dapper下载的。
#!/bin/bash
apt-get install m4 || exit 1
dpkg -i selinux-doc_1.24-1_all.deb || exit 1
dpkg -i libsepol1_1.10-1_i386.deb || exit 1
dpkg -i libsepol1-dev_1.10-1_i386.deb || exit 1
dpkg -i libselinux1_1.28-2ubuntu2_i386.deb || exit 1
dpkg -i libselinux1-dev_1.28-2ubuntu2_i386.deb || exit 1
dpkg -i selinux-utils_1.28-2ubuntu2_i386.deb || exit 1
dpkg -i libsemanage1_1.4-3_i386.deb
dpkg -i libsemanage1-dev_1.4-3_i386.deb
dpkg -i python2.4-semanage_1.4-3_i386.deb
dpkg -i python2.4-selinux_1.28-2ubuntu2_i386.deb
dpkg -i policycoreutils_1.28-3_i386.deb
dpkg -i cron_3.0pl1-92ubuntu1_i386.deb
dpkg -i logrotate_3.7.1-2_i386.deb
dpkg -i sysv-rc_2.86.ds1-6ubuntu26_all.deb
dpkg -i sysvinit_2.86.ds1-6ubuntu26_i386.deb
dpkg -i checkpolicy_1.28-1_i386.deb
dpkg -i libpam-modules_0.79-3ubuntu12_i386.deb || exit 1
dpkg -i sepol-utils_1.10-1_i386.deb || exit 1
dpkg -i selinux-policy-default_1.26-7_all.deb || exit 1
echo "安装Selinux成功!"
到了装selinux-policy-default时会很讨厌,会有很多的[Y/n/d],你尽管地选Y吧,没坏处
安装成功后执行一下下面的命令:
$ sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: enforcing
Policy version: 20
Policy from config file: .

其实也挺简单的,关键是要内核的支持。