1 2 3 4 5 | su mount -oloop,offset=32256 $ORIG/gentoo.img /mnt cd /mnt/usr/src cvs -z3 -d:pserver:anonymous@cvs.sf.net:/cvsroot/selinux co -P \ nsa/selinux-usr |
1 2 3 4 5 6 7 8 9 10 | chroot /mnt cd /usr/src/nsa/selinux-usr/ cd libsepol/ make && make install cd ../libselinux/ make && make install cd ../checkpolicy/ make && make install cd ../policycoreutils/ make && make install |
1 2 3 | cd setfiles make make install |
1 2 3 4 5 | cd /usr/src/mdp checkpolicy -o policy.bin policy.conf cp policy.bin /etc/ exit # exit chroot exit # exit root shell |
1 2 3 4 | mkdir /selinux cd /usr/src/mdp setfiles file_contexts / poweroff |
1 2 3 4 5 | (su) mount -oloop,offset=32256 $ORIG/gentoo.img /mnt cp showctx.c /mnt/usr/src umount /mnt exit |
1 2 3 | /secret user_u:base_r:secret_t /secret/helloworld user_u:base_r:base_t /secret/.* user_u:base_r:secret_t |
1 2 3 4 5 6 | cat >> /etc/rc.d/selinux-enforce << EOF #!/bin/sh echo 1 > /selinux/enforce EOF chmod ugo+x /etc/rc.d/selinux-enforce rc-update add default selinux-enforce |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |