Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
.gitignore | D | 07-Sep-2024 | 179 | 10 | 9 | |
Makefile | D | 07-Sep-2024 | 1 KiB | 30 | 4 | |
README | D | 07-Sep-2024 | 1.9 KiB | 59 | 38 | |
include.h | D | 07-Sep-2024 | 10.5 KiB | 380 | 329 | |
newns.c | D | 07-Sep-2024 | 2.1 KiB | 50 | 26 | |
testall.sh | D | 07-Sep-2024 | 2.2 KiB | 47 | 24 | |
tomoyo_accept_test.c | D | 07-Sep-2024 | 4.9 KiB | 147 | 106 | |
tomoyo_file_test.c | D | 07-Sep-2024 | 8.6 KiB | 305 | 245 | |
tomoyo_filesystem_test.c | D | 07-Sep-2024 | 23.8 KiB | 634 | 545 | |
tomoyo_new_file_test.c | D | 07-Sep-2024 | 17.8 KiB | 628 | 542 | |
tomoyo_new_test.c | D | 07-Sep-2024 | 21.8 KiB | 653 | 573 | |
tomoyo_policy_io_test.c | D | 07-Sep-2024 | 7.3 KiB | 196 | 168 | |
tomoyo_policy_memory_test.c | D | 07-Sep-2024 | 10.9 KiB | 359 | 321 | |
tomoyo_rewrite_test.c | D | 07-Sep-2024 | 4.7 KiB | 170 | 116 |
README
1Always look here for latest version of these tests: 2http://sourceforge.jp/projects/tomoyo/svn/view/trunk/2.3.x/tomoyo-tools/kernel_test/?root=tomoyo 3 4These testcases test the TOMOYO Security Module. And they are not part of 5default LTP build/install/run. 6 7A kernel with TOMOYO configured is required to run the TOMOYO testsuite. 8The securityfs filesystem must be mounted at /sys/kernel/security . 9 10Preparation steps are: 11 121) Download tomoyo-tools package and extract and build and install. 13 14 # 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' 15 # tar -zxf tomoyo-tools.tar.gz 16 # make -C tomoyo-tools/ install 17 18 Programs are installed in /usr/sbin/ with prefix "tomoyo-" and 19 /usr/lib/tomoyo/ directory without prefix "tomoyo-". 20 21 You can make a RPM package by "rpmbuild -bb tomoyo-tools/tomoyo-tools.spec" and 22 a DEB package by "alien -k" after "rpmbuild -bb". 23 242) Run /usr/lib/tomoyo/init_policy . 25 26 This will take several minutes. 27 28 Hiding kernel source directory by "mount -t tmpfs none /usr/src/linux/" 29 would save some time. 30 31 Configuration files are saved in /etc/tomoyo/ directory. 32 You can do "rm -fR /etc/tomoyo/" if you want to uninstall. 33 343) Reboot the system with TOMOYO enabled kernel. 35 36 To make sure TOMOYO is selected, you can add security=tomoyo to kernel's 37 command line. 38 394) Build the tests. 40 41 # (extract the tar ball containing the tests.) 42 # make autotools 43 # ./configure 44 # cd testcases/kernel/security/tomoyo/ 45 # make 46 # find `/bin/pwd` -type f -perm +100 >> /etc/tomoyo/manager.conf 47 # /usr/sbin/tomoyo-loadpolicy m 48 49Test steps are: 50 511) Run the tests from the directory you ran "make". 52 53 # ./testall.sh 54 55 Please don't run the tests inside /tmp/ directory, for /tmp/ directory is 56 hidden by "newns" (a wrapper program to run the test in a new namespace). 57 58 You can use "| grep -vF OK" to pick up only failed tests as testall.sh does. 59