You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.9 KiB
59 lines
1.9 KiB
Always look here for latest version of these tests:
|
|
http://sourceforge.jp/projects/tomoyo/svn/view/trunk/2.3.x/tomoyo-tools/kernel_test/?root=tomoyo
|
|
|
|
These testcases test the TOMOYO Security Module. And they are not part of
|
|
default LTP build/install/run.
|
|
|
|
A kernel with TOMOYO configured is required to run the TOMOYO testsuite.
|
|
The securityfs filesystem must be mounted at /sys/kernel/security .
|
|
|
|
Preparation steps are:
|
|
|
|
1) Download tomoyo-tools package and extract and build and install.
|
|
|
|
# wget -O tomoyo-tools.tar.gz 'http://sourceforge.jp/projects/tomoyo/svn/view/trunk/2.3.x/tomoyo-tools.tar.gz?root=tomoyo&view=tar'
|
|
# tar -zxf tomoyo-tools.tar.gz
|
|
# make -C tomoyo-tools/ install
|
|
|
|
Programs are installed in /usr/sbin/ with prefix "tomoyo-" and
|
|
/usr/lib/tomoyo/ directory without prefix "tomoyo-".
|
|
|
|
You can make a RPM package by "rpmbuild -bb tomoyo-tools/tomoyo-tools.spec" and
|
|
a DEB package by "alien -k" after "rpmbuild -bb".
|
|
|
|
2) Run /usr/lib/tomoyo/init_policy .
|
|
|
|
This will take several minutes.
|
|
|
|
Hiding kernel source directory by "mount -t tmpfs none /usr/src/linux/"
|
|
would save some time.
|
|
|
|
Configuration files are saved in /etc/tomoyo/ directory.
|
|
You can do "rm -fR /etc/tomoyo/" if you want to uninstall.
|
|
|
|
3) Reboot the system with TOMOYO enabled kernel.
|
|
|
|
To make sure TOMOYO is selected, you can add security=tomoyo to kernel's
|
|
command line.
|
|
|
|
4) Build the tests.
|
|
|
|
# (extract the tar ball containing the tests.)
|
|
# make autotools
|
|
# ./configure
|
|
# cd testcases/kernel/security/tomoyo/
|
|
# make
|
|
# find `/bin/pwd` -type f -perm +100 >> /etc/tomoyo/manager.conf
|
|
# /usr/sbin/tomoyo-loadpolicy m
|
|
|
|
Test steps are:
|
|
|
|
1) Run the tests from the directory you ran "make".
|
|
|
|
# ./testall.sh
|
|
|
|
Please don't run the tests inside /tmp/ directory, for /tmp/ directory is
|
|
hidden by "newns" (a wrapper program to run the test in a new namespace).
|
|
|
|
You can use "| grep -vF OK" to pick up only failed tests as testall.sh does.
|