LinuxÒÁµéÔ°ÂÛ̳'s Archiver

testeen ·¢±íÓÚ 2004-11-7 11:56

´Ó°²×°ºÃµÄgentooת»»µ½gentoo selinux

ÏòGentoo SELinuxת»»£¨ÏµÍ³Îļþ¸ñʽ±ØÐëÊÇext2/3,xfs£©

1.
# rm -f /etc/make.profile
# ln -sf /usr/portage/profiles/selinux/2004.1/x86 /etc/make.profile

2.Update Kernel Headers
# emerge -s linux-headers
Èç¹û°²×°ÁËgentoolkit ¿ÉÒÔÕâÑù£º
# qpkg -I -v linux-headers
Èç¹ûlinux-headers°æ±¾Ð¡ÓÚ2.4.20£¬±ØÐ밲װеÄ
# emerge \>=sys-kernel/linux-headers-2.4.20

3.Éý¼¶glibc
emerge glibc

4.emerge SELinuxµÄÄÚºË
# emerge hardened-dev-sources
make menucofnigʱ£º

[code]
Under "Code maturity level options"
[*] Prompt for development and/or incomplete code/drivers

Under "General setup"
[*] Auditing support

Under "File systems"
<*> Second extended fs support (If using ext2)
[*]   Ext2 extended attributes
[ ]     Ext2 POSIX Access Control Lists
[*]     Ext2 Security Labels
<*> Ext3 journalling file system support (If using ext3)
[*]   Ext3 extended attributes
[ ]     Ext3 POSIX Access Control Lists
[*]     Ext3 Security labels
<*> XFS filesystem support (If using XFS)
[ ]   Realtime support (EXPERIMENTAL)
[ ]   Quota support
[ ]   ACL support
[*]   Security Labels

[ ] /dev file system support (EXPERIMENTAL)
[*] /dev/pts file system for Unix98 PTYs (This option does not appear in 2.6, it is always on)
[*]   /dev/pts Extended Attributes
[*]     /dev/pts Security Labels   

Under "Security options"
[*] Enable different security models
[*] Socket and Networking Security Hooks
<*> Capabilities Support
[*] NSA SELinux Support
[ ]   NSA SELinux boot parameter
[ ]   NSA SELinux runtime disable
[*]   NSA SELinux Development Support
[ ]   NSA SELinux MLS policy (EXPERIMENTAL)

[/code]

5.ÖØÐ´/etc/fstab
¼ÓÈë:
none /dev/pts devpts gid=5,mode=620 0 0
none /selinux selinuxfs defaults 0 0
½¨Á¢¹ÒÔØµØµã£º
# mkdir /selinux
# mkdir /sys

6.Òýµ¼³ÌÐò±ØÐë¼ÓÈë
gentoo=nodevfs
ÖØÆô£¬

7.°²×°SELinux±ØÒªµÄÌ×¼þ
# emerge libselinux checkpolicy policycoreutils
# emerge selinux-base-policy
# cd /etc/security/selinux/src/policy
# make load

8.°²×°´òÓÐSELinuxµÄϵͳÌ×¼þ
# emerge sysvinit pam coreutils findutils openssh pam-login procps psmisc shadow util-linux python-selinux
ÆäËû¿ÉÑ¡µÄÓÐ
app-admin/logrotate
sys-apps/fcron
sys-apps/vixie-cron
sys-libs/pwdb

9.Ð¶ÔØ²»ÐèÒªµÄ¶«Î÷
# emerge -C textutils fileutils sh-utils

10.Label Filesystems£º
# cd /etc/security/selinux/src/policy
# make relabel
ÖØÆôÔÙ´Î
# cd /etc/security/selinux/src/policy
# make relabel

ok,done!

ghosttrain ·¢±íÓÚ 2004-11-8 13:09

ÔÚת»»µ½SELinuxºó, ÔÚÒ»°ãµÄʹÓû·¾³ÖÐÊÇ·ñ»áÓиü¶àÏÞÖÆ?!
¿ÉϧÎÒµÄϵͳÊÇreiserfs, ûÓлú»á³¢ÊÔ:)

Ò³: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.