• Home
Name Date Size #Lines LOC

..--

.gitignoreD07-Sep-2024179 109

MakefileD07-Sep-20241 KiB304

READMED07-Sep-20241.9 KiB5938

include.hD07-Sep-202410.5 KiB380329

newns.cD07-Sep-20242.1 KiB5026

testall.shD07-Sep-20242.2 KiB4724

tomoyo_accept_test.cD07-Sep-20244.9 KiB147106

tomoyo_file_test.cD07-Sep-20248.6 KiB305245

tomoyo_filesystem_test.cD07-Sep-202423.8 KiB634545

tomoyo_new_file_test.cD07-Sep-202417.8 KiB628542

tomoyo_new_test.cD07-Sep-202421.8 KiB653573

tomoyo_policy_io_test.cD07-Sep-20247.3 KiB196168

tomoyo_policy_memory_test.cD07-Sep-202410.9 KiB359321

tomoyo_rewrite_test.cD07-Sep-20244.7 KiB170116

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