<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://cblfs.clfs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kumaneko</id>
	<title>CBLFS - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://cblfs.clfs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kumaneko"/>
	<link rel="alternate" type="text/html" href="https://cblfs.clfs.org/Special:Contributions/Kumaneko"/>
	<updated>2026-04-22T20:44:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>?title=TOMOYO&amp;diff=20142</id>
		<title>TOMOYO</title>
		<link rel="alternate" type="text/html" href="?title=TOMOYO&amp;diff=20142"/>
		<updated>2010-05-04T01:09:45Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;text-align: left; background-color: AliceBlue;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Download Tools Source:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/43376/ccs-tools-1.7.2-20100401.tar.gz (for TOMOYO 1.7)&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30298/ccs-tools-1.6.8-20100115.tar.gz (for TOMOYO 2.2)&lt;br /&gt;
|-&lt;br /&gt;
!Download Kernel Patch:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/43375/ccs-patch-{{TOMOYO-Version}}.tar.gz&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{Package-Introduction|The fundamental concept of TOMOYO Linux is &amp;quot;tracking process invocation history&amp;quot;. TOMOYO Linux splits domains using &amp;quot;process invocation history&amp;quot; and the process transits to a different domain whenever execution of a program (i.e. do_execve()) is requested. By transiting to a different domain whenever execution of a program is requested, each domain will have the minimal permissions that are essential for processes in that domain to do their roles. For more information, see http://tomoyo.sourceforge.jp/wiki-e/?WhatIs .|http://tomoyo.sourceforge.jp/}}&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* None (no more package required for LFS Linux.)&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO aware kernels =&lt;br /&gt;
&lt;br /&gt;
== Kernel 2.6.33.3 with TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Download the ccs-patch-{{TOMOYO-Version}}.tar.gz file and put it in kernel source directory, Patch the kernel source:&lt;br /&gt;
&lt;br /&gt;
 tar xzvf ccs-patch-{{TOMOYO-Version}}.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 patch -Np1 -i patches/ccs-patch-2.6.33.diff&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select as below.&lt;br /&gt;
&lt;br /&gt;
 [*] CCSecurity support&lt;br /&gt;
 (2048) Default maximal count for learning mode&lt;br /&gt;
 (/sbin/ccs-init) Default policy loader&lt;br /&gt;
 (/sbin/ccs-start) Alternative activation trigger&lt;br /&gt;
 (/sbin/modprobe /sbin/hotplug) Built-in domain initializer programs&lt;br /&gt;
 [*]   Auditing interface support&lt;br /&gt;
 (1024)  Default maximal count for grant log&lt;br /&gt;
 (1024)  Default maximal count for reject log&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Download 2.6.30 (or later) from http://www.kernel.org/ and extract it.&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select &amp;quot;TOMOYO Linux support&amp;quot; as shown below.&lt;br /&gt;
&lt;br /&gt;
 [ ] Enable access key retention support&lt;br /&gt;
 [*] Enable different security models&lt;br /&gt;
 -*- Enable the securityfs filesystem&lt;br /&gt;
 [ ] Socket and Networking Security Hooks&lt;br /&gt;
 -*- Security hooks for pathname based access control&lt;br /&gt;
 [ ] File POSIX Capabilities&lt;br /&gt;
 (0) Low address space to protect from user allocation&lt;br /&gt;
 [*] TOMOYO Linux Support&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO Tools =&lt;br /&gt;
&lt;br /&gt;
Download the ccs-tools-1.6.8-20100115.tar.gz (for TOMOYO 2.2) or ccs-tools-1.7.2-20100401.tar.gz (for TOMOYO 1.7) file and put it somewhere.&lt;br /&gt;
&lt;br /&gt;
Change directory to ccstools/ .&lt;br /&gt;
&lt;br /&gt;
== Non-Multilib ==&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
== Multilib ==&lt;br /&gt;
&lt;br /&gt;
=== 32Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== N32 ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib32@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILDN32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== 64Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib64@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD64}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
= Configuring =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Run init_policy to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/init_policy&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
You can save audit logs if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/rc.d/init.d/ccs-auditd &amp;lt;&amp;lt; EOF&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 /usr/sbin/ccs-auditd /dev/null /var/log/tomoyo/reject_log.txt&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/rc.d/init.d/ccs-auditd&lt;br /&gt;
&lt;br /&gt;
 for i in 2 3 4 5; do&lt;br /&gt;
 ln -sv ../init.d/ccs-auditd /etc/rc.d/rc${i}.d/S99ccs-auditd; done&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /var/log/tomoyo&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Run tomoyo_init_policy.sh to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/tomoyo_init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
= Booting TOMOYO Linux =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
You can use boot parameter CCS=&amp;lt;name&amp;gt; to load profile /etc/ccs/profile-&amp;lt;name&amp;gt;.conf .&lt;br /&gt;
Without CCS= parameter or &amp;lt;name&amp;gt; is &amp;quot;default&amp;quot;, /etc/ccs/profile.conf will be loaded.&lt;br /&gt;
You can use CCS=ask to let user select from available profiles in /etc/ccs/ at boot time&lt;br /&gt;
You can use CCS=disable to boot as usual Linux (i.e. without TOMOYO protection).&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Same as TOMOYO {{TOMOYO-Version}}, except that the policies are loaded from /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
But, be sure to add security=tomoyo parameter.&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default security=tomoyo&lt;br /&gt;
&lt;br /&gt;
= Configuring Policy to Guard Linux as Needed =&lt;br /&gt;
&lt;br /&gt;
Login to the system as root user, and run editpolicy included in TOMOYO Linux tools.&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/ccs-editpolicy&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
| /sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-init, tomoyo-init&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-editpolicy, ccs-setlevel, ccs-setprofile, ccs-ccstree, ccs-savepolicy, ccs-auditd, ccs-findtemp, ccs-sortpolicy, ccs-ld-watch, ccs-queryd, ccs-checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/lib/ccs&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|tomoyo_init_policy.sh, init_policy.sh, editpolicy, setlevel, setprofile, ccstree, savepolicy, makesyaoranconf, ccs-auditd, ccs-notifyd, findtemp, sortpolicy, ld-watch, ccs-queryd, checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Short Descriptions ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-editpolicy&lt;br /&gt;
|Edits the current policy in /proc/ccs/ or /sys/kernel/security/tomoyo/ directory&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setlevel&lt;br /&gt;
|Changes the current control level (i.e. writing to /proc/ccs/profile or /sys/kernel/security/tomoyo/profile ) and displays the new control level.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setprofile&lt;br /&gt;
|Assigns a profile to domains.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-pstree (for TOMOYO 1.7) ccs-ccstree (for TOMOYO 2.2)&lt;br /&gt;
|Lists the domainnames of currently running processes belong to and the profile numbers the domains currently assigned to.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-savepolicy&lt;br /&gt;
|Saves the on-memory policy onto disk.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-auditd&lt;br /&gt;
|Reads from /proc/ccs/grant_log and /proc/ccs/reject_log and writes to the location given in the commandline parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-sortpolicy&lt;br /&gt;
|Remove duplicated entry from logs written by &amp;quot;ccs-auditd&amp;quot;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-findtemp&lt;br /&gt;
|Reads domain policy from standard input and checks the existence of pathnames, and dumps the nonexistent pathnames.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-ld-watch&lt;br /&gt;
|Appends shared libraries to exception policy automatically using &amp;quot;allow_read&amp;quot; directive when the location of shared libraries in /etc/ld.so.cache has changed.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-queryd&lt;br /&gt;
|Detects policy violation and displays the access request. You can tell the system whether the access request should be granted (or granted and policy should be appended to grant the access request) or rejected after you validate the access request.&lt;br /&gt;
&lt;br /&gt;
By running this program while updating packages, you can avoid errors due to insufficient permissions.&lt;br /&gt;
&lt;br /&gt;
Never grant access requests unconditionally. The cause of policy violation is not always updating packages, but may by malicious requests by attackers. If you grant access requests caused by malicious requests by attackers, the system gets intruded.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-checkpolicy&lt;br /&gt;
|Reads policy files from standard input and checks syntaxes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-init&lt;br /&gt;
|Loads policy files from /etc/ccs/ directory. Put this program as /sbin/ccs-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!tomoyo-init&lt;br /&gt;
|Loads policy files from /etc/tomoyo/ directory. Put this program as /sbin/tomoyo-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=TOMOYO&amp;diff=20012</id>
		<title>TOMOYO</title>
		<link rel="alternate" type="text/html" href="?title=TOMOYO&amp;diff=20012"/>
		<updated>2010-04-12T13:02:54Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;text-align: left; background-color: AliceBlue;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Download Tools Source:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/43376/ccs-tools-1.7.2-20100401.tar.gz (for TOMOYO 1.7)&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30298/ccs-tools-1.6.8-20100115.tar.gz (for TOMOYO 2.2)&lt;br /&gt;
|-&lt;br /&gt;
!Download Kernel Patch:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/43375/ccs-patch-{{TOMOYO-Version}}.tar.gz&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{Package-Introduction|The fundamental concept of TOMOYO Linux is &amp;quot;tracking process invocation history&amp;quot;. TOMOYO Linux splits domains using &amp;quot;process invocation history&amp;quot; and the process transits to a different domain whenever execution of a program (i.e. do_execve()) is requested. By transiting to a different domain whenever execution of a program is requested, each domain will have the minimal permissions that are essential for processes in that domain to do their roles. For more information, see http://tomoyo.sourceforge.jp/wiki-e/?WhatIs .|http://tomoyo.sourceforge.jp/}}&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* None (no more package required for LFS Linux.)&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO aware kernels =&lt;br /&gt;
&lt;br /&gt;
== Kernel 2.6.33.2 with TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Download the ccs-patch-{{TOMOYO-Version}}.tar.gz file and put it in kernel source directory, Patch the kernel source:&lt;br /&gt;
&lt;br /&gt;
 tar xzvf ccs-patch-{{TOMOYO-Version}}.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 patch -Np1 -i patches/ccs-patch-2.6.33.diff&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select as below.&lt;br /&gt;
&lt;br /&gt;
 [*] CCSecurity support&lt;br /&gt;
 (2048) Default maximal count for learning mode&lt;br /&gt;
 (/sbin/ccs-init) Default policy loader&lt;br /&gt;
 (/sbin/ccs-start) Alternative activation trigger&lt;br /&gt;
 (/sbin/modprobe /sbin/hotplug) Built-in domain initializer programs&lt;br /&gt;
 [*]   Auditing interface support&lt;br /&gt;
 (1024)  Default maximal count for grant log&lt;br /&gt;
 (1024)  Default maximal count for reject log&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Download 2.6.30 (or later) from http://www.kernel.org/ and extract it.&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select &amp;quot;TOMOYO Linux support&amp;quot; as shown below.&lt;br /&gt;
&lt;br /&gt;
 [ ] Enable access key retention support&lt;br /&gt;
 [*] Enable different security models&lt;br /&gt;
 -*- Enable the securityfs filesystem&lt;br /&gt;
 [ ] Socket and Networking Security Hooks&lt;br /&gt;
 -*- Security hooks for pathname based access control&lt;br /&gt;
 [ ] File POSIX Capabilities&lt;br /&gt;
 (0) Low address space to protect from user allocation&lt;br /&gt;
 [*] TOMOYO Linux Support&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO Tools =&lt;br /&gt;
&lt;br /&gt;
Download the ccs-tools-1.6.8-20100115.tar.gz (for TOMOYO 2.2) or ccs-tools-1.7.2-20100401.tar.gz (for TOMOYO 1.7) file and put it somewhere.&lt;br /&gt;
&lt;br /&gt;
Change directory to ccstools/ .&lt;br /&gt;
&lt;br /&gt;
== Non-Multilib ==&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
== Multilib ==&lt;br /&gt;
&lt;br /&gt;
=== 32Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== N32 ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib32@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILDN32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== 64Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib64@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD64}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
= Configuring =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Run init_policy to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/init_policy&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
You can save audit logs if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/rc.d/init.d/ccs-auditd &amp;lt;&amp;lt; EOF&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 /usr/sbin/ccs-auditd /dev/null /var/log/tomoyo/reject_log.txt&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/rc.d/init.d/ccs-auditd&lt;br /&gt;
&lt;br /&gt;
 for i in 2 3 4 5; do&lt;br /&gt;
 ln -sv ../init.d/ccs-auditd /etc/rc.d/rc${i}.d/S99ccs-auditd; done&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /var/log/tomoyo&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Run tomoyo_init_policy.sh to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/tomoyo_init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
= Booting TOMOYO Linux =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
You can use boot parameter CCS=&amp;lt;name&amp;gt; to load profile /etc/ccs/profile-&amp;lt;name&amp;gt;.conf .&lt;br /&gt;
Without CCS= parameter or &amp;lt;name&amp;gt; is &amp;quot;default&amp;quot;, /etc/ccs/profile.conf will be loaded.&lt;br /&gt;
You can use CCS=ask to let user select from available profiles in /etc/ccs/ at boot time&lt;br /&gt;
You can use CCS=disable to boot as usual Linux (i.e. without TOMOYO protection).&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Same as TOMOYO {{TOMOYO-Version}}, except that the policies are loaded from /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
But, be sure to add security=tomoyo parameter.&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default security=tomoyo&lt;br /&gt;
&lt;br /&gt;
= Configuring Policy to Guard Linux as Needed =&lt;br /&gt;
&lt;br /&gt;
Login to the system as root user, and run editpolicy included in TOMOYO Linux tools.&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/ccs-editpolicy&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
| /sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-init, tomoyo-init&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-editpolicy, ccs-setlevel, ccs-setprofile, ccs-ccstree, ccs-savepolicy, ccs-auditd, ccs-findtemp, ccs-sortpolicy, ccs-ld-watch, ccs-queryd, ccs-checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/lib/ccs&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|tomoyo_init_policy.sh, init_policy.sh, editpolicy, setlevel, setprofile, ccstree, savepolicy, makesyaoranconf, ccs-auditd, ccs-notifyd, findtemp, sortpolicy, ld-watch, ccs-queryd, checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Short Descriptions ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-editpolicy&lt;br /&gt;
|Edits the current policy in /proc/ccs/ or /sys/kernel/security/tomoyo/ directory&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setlevel&lt;br /&gt;
|Changes the current control level (i.e. writing to /proc/ccs/profile or /sys/kernel/security/tomoyo/profile ) and displays the new control level.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setprofile&lt;br /&gt;
|Assigns a profile to domains.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-pstree (for TOMOYO 1.7) ccs-ccstree (for TOMOYO 2.2)&lt;br /&gt;
|Lists the domainnames of currently running processes belong to and the profile numbers the domains currently assigned to.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-savepolicy&lt;br /&gt;
|Saves the on-memory policy onto disk.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-auditd&lt;br /&gt;
|Reads from /proc/ccs/grant_log and /proc/ccs/reject_log and writes to the location given in the commandline parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-sortpolicy&lt;br /&gt;
|Remove duplicated entry from logs written by &amp;quot;ccs-auditd&amp;quot;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-findtemp&lt;br /&gt;
|Reads domain policy from standard input and checks the existence of pathnames, and dumps the nonexistent pathnames.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-ld-watch&lt;br /&gt;
|Appends shared libraries to exception policy automatically using &amp;quot;allow_read&amp;quot; directive when the location of shared libraries in /etc/ld.so.cache has changed.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-queryd&lt;br /&gt;
|Detects policy violation and displays the access request. You can tell the system whether the access request should be granted (or granted and policy should be appended to grant the access request) or rejected after you validate the access request.&lt;br /&gt;
&lt;br /&gt;
By running this program while updating packages, you can avoid errors due to insufficient permissions.&lt;br /&gt;
&lt;br /&gt;
Never grant access requests unconditionally. The cause of policy violation is not always updating packages, but may by malicious requests by attackers. If you grant access requests caused by malicious requests by attackers, the system gets intruded.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-checkpolicy&lt;br /&gt;
|Reads policy files from standard input and checks syntaxes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-init&lt;br /&gt;
|Loads policy files from /etc/ccs/ directory. Put this program as /sbin/ccs-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!tomoyo-init&lt;br /&gt;
|Loads policy files from /etc/tomoyo/ directory. Put this program as /sbin/tomoyo-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=Template:TOMOYO-Version&amp;diff=20011</id>
		<title>Template:TOMOYO-Version</title>
		<link rel="alternate" type="text/html" href="?title=Template:TOMOYO-Version&amp;diff=20011"/>
		<updated>2010-04-12T13:01:01Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;1.7.2-20100412&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=TOMOYO&amp;diff=19986</id>
		<title>TOMOYO</title>
		<link rel="alternate" type="text/html" href="?title=TOMOYO&amp;diff=19986"/>
		<updated>2010-03-26T15:30:31Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;text-align: left; background-color: AliceBlue;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Download Tools Source:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/43376/ccs-tools-1.7.1-20100110.tar.gz (for TOMOYO 1.7)&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30298/ccs-tools-1.6.8-20100115.tar.gz (for TOMOYO 2.2)&lt;br /&gt;
|-&lt;br /&gt;
!Download Kernel Patch:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/43375/ccs-patch-{{TOMOYO-Version}}.tar.gz&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{Package-Introduction|The fundamental concept of TOMOYO Linux is &amp;quot;tracking process invocation history&amp;quot;. TOMOYO Linux splits domains using &amp;quot;process invocation history&amp;quot; and the process transits to a different domain whenever execution of a program (i.e. do_execve()) is requested. By transiting to a different domain whenever execution of a program is requested, each domain will have the minimal permissions that are essential for processes in that domain to do their roles. For more information, see http://tomoyo.sourceforge.jp/wiki-e/?WhatIs .|http://tomoyo.sourceforge.jp/}}&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* None (no more package required for LFS Linux.)&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO aware kernels =&lt;br /&gt;
&lt;br /&gt;
== Kernel 2.6.33.1 with TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Download the ccs-patch-{{TOMOYO-Version}}.tar.gz file and put it in kernel source directory, Patch the kernel source:&lt;br /&gt;
&lt;br /&gt;
 tar xzvf ccs-patch-{{TOMOYO-Version}}.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 patch -Np1 -i patches/ccs-patch-2.6.33.diff&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select as below.&lt;br /&gt;
&lt;br /&gt;
 [*] CCSecurity support&lt;br /&gt;
 (2048) Default maximal count for learning mode&lt;br /&gt;
 (/sbin/ccs-init) Default policy loader&lt;br /&gt;
 (/sbin/ccs-start) Alternative activation trigger&lt;br /&gt;
 (/sbin/modprobe /sbin/hotplug) Built-in domain initializer programs&lt;br /&gt;
 [*]   Auditing interface support&lt;br /&gt;
 (1024)  Default maximal count for grant log&lt;br /&gt;
 (1024)  Default maximal count for reject log&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Download 2.6.30 (or later) from http://www.kernel.org/ and extract it.&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select &amp;quot;TOMOYO Linux support&amp;quot; as shown below.&lt;br /&gt;
&lt;br /&gt;
 [ ] Enable access key retention support&lt;br /&gt;
 [*] Enable different security models&lt;br /&gt;
 -*- Enable the securityfs filesystem&lt;br /&gt;
 [ ] Socket and Networking Security Hooks&lt;br /&gt;
 -*- Security hooks for pathname based access control&lt;br /&gt;
 [ ] File POSIX Capabilities&lt;br /&gt;
 (0) Low address space to protect from user allocation&lt;br /&gt;
 [*] TOMOYO Linux Support&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO Tools =&lt;br /&gt;
&lt;br /&gt;
Download the ccs-tools-1.6.8-20100115.tar.gz (for TOMOYO 2.2) or ccs-tools-1.7.1-20100110.tar.gz (for TOMOYO 1.7) file and put it somewhere.&lt;br /&gt;
&lt;br /&gt;
Change directory to ccstools/ .&lt;br /&gt;
&lt;br /&gt;
== Non-Multilib ==&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
== Multilib ==&lt;br /&gt;
&lt;br /&gt;
=== 32Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== N32 ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib32@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILDN32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== 64Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib64@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD64}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
= Configuring =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Run init_policy to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/init_policy&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
You can save audit logs if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/rc.d/init.d/ccs-auditd &amp;lt;&amp;lt; EOF&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 /usr/sbin/ccs-auditd /dev/null /var/log/tomoyo/reject_log.txt&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/rc.d/init.d/ccs-auditd&lt;br /&gt;
&lt;br /&gt;
 for i in 2 3 4 5; do&lt;br /&gt;
 ln -sv ../init.d/ccs-auditd /etc/rc.d/rc${i}.d/S99ccs-auditd; done&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /var/log/tomoyo&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Run tomoyo_init_policy.sh to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/tomoyo_init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
= Booting TOMOYO Linux =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
You can use boot parameter CCS=&amp;lt;name&amp;gt; to load profile /etc/ccs/profile-&amp;lt;name&amp;gt;.conf .&lt;br /&gt;
Without CCS= parameter or &amp;lt;name&amp;gt; is &amp;quot;default&amp;quot;, /etc/ccs/profile.conf will be loaded.&lt;br /&gt;
You can use CCS=ask to let user select from available profiles in /etc/ccs/ at boot time&lt;br /&gt;
You can use CCS=disable to boot as usual Linux (i.e. without TOMOYO protection).&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Same as TOMOYO {{TOMOYO-Version}}, except that the policies are loaded from /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
But, be sure to add security=tomoyo parameter.&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default security=tomoyo&lt;br /&gt;
&lt;br /&gt;
= Configuring Policy to Guard Linux as Needed =&lt;br /&gt;
&lt;br /&gt;
Login to the system as root user, and run editpolicy included in TOMOYO Linux tools.&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/ccs-editpolicy&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
| /sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-init, tomoyo-init&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-editpolicy, ccs-setlevel, ccs-setprofile, ccs-ccstree, ccs-savepolicy, ccs-auditd, ccs-findtemp, ccs-sortpolicy, ccs-ld-watch, ccs-queryd, ccs-checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/lib/ccs&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|tomoyo_init_policy.sh, init_policy.sh, editpolicy, setlevel, setprofile, ccstree, savepolicy, makesyaoranconf, ccs-auditd, ccs-notifyd, findtemp, sortpolicy, ld-watch, ccs-queryd, checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Short Descriptions ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-editpolicy&lt;br /&gt;
|Edits the current policy in /proc/ccs/ or /sys/kernel/security/tomoyo/ directory&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setlevel&lt;br /&gt;
|Changes the current control level (i.e. writing to /proc/ccs/profile or /sys/kernel/security/tomoyo/profile ) and displays the new control level.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setprofile&lt;br /&gt;
|Assigns a profile to domains.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-pstree (for TOMOYO 1.7) ccs-ccstree (for TOMOYO 2.2)&lt;br /&gt;
|Lists the domainnames of currently running processes belong to and the profile numbers the domains currently assigned to.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-savepolicy&lt;br /&gt;
|Saves the on-memory policy onto disk.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-auditd&lt;br /&gt;
|Reads from /proc/ccs/grant_log and /proc/ccs/reject_log and writes to the location given in the commandline parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-sortpolicy&lt;br /&gt;
|Remove duplicated entry from logs written by &amp;quot;ccs-auditd&amp;quot;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-findtemp&lt;br /&gt;
|Reads domain policy from standard input and checks the existence of pathnames, and dumps the nonexistent pathnames.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-ld-watch&lt;br /&gt;
|Appends shared libraries to exception policy automatically using &amp;quot;allow_read&amp;quot; directive when the location of shared libraries in /etc/ld.so.cache has changed.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-queryd&lt;br /&gt;
|Detects policy violation and displays the access request. You can tell the system whether the access request should be granted (or granted and policy should be appended to grant the access request) or rejected after you validate the access request.&lt;br /&gt;
&lt;br /&gt;
By running this program while updating packages, you can avoid errors due to insufficient permissions.&lt;br /&gt;
&lt;br /&gt;
Never grant access requests unconditionally. The cause of policy violation is not always updating packages, but may by malicious requests by attackers. If you grant access requests caused by malicious requests by attackers, the system gets intruded.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-checkpolicy&lt;br /&gt;
|Reads policy files from standard input and checks syntaxes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-init&lt;br /&gt;
|Loads policy files from /etc/ccs/ directory. Put this program as /sbin/ccs-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!tomoyo-init&lt;br /&gt;
|Loads policy files from /etc/tomoyo/ directory. Put this program as /sbin/tomoyo-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=Template:TOMOYO-Version&amp;diff=19985</id>
		<title>Template:TOMOYO-Version</title>
		<link rel="alternate" type="text/html" href="?title=Template:TOMOYO-Version&amp;diff=19985"/>
		<updated>2010-03-26T15:28:34Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;1.7.1-20100326&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=TOMOYO&amp;diff=19908</id>
		<title>TOMOYO</title>
		<link rel="alternate" type="text/html" href="?title=TOMOYO&amp;diff=19908"/>
		<updated>2010-02-14T07:23:09Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;text-align: left; background-color: AliceBlue;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Download Tools Source:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/43376/ccs-tools-1.7.1-20100110.tar.gz (for TOMOYO 1.7)&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30298/ccs-tools-1.6.8-20100115.tar.gz (for TOMOYO 2.2)&lt;br /&gt;
|-&lt;br /&gt;
!Download Kernel Patch:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/43375/ccs-patch-{{TOMOYO-Version}}.tar.gz&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{Package-Introduction|The fundamental concept of TOMOYO Linux is &amp;quot;tracking process invocation history&amp;quot;. TOMOYO Linux splits domains using &amp;quot;process invocation history&amp;quot; and the process transits to a different domain whenever execution of a program (i.e. do_execve()) is requested. By transiting to a different domain whenever execution of a program is requested, each domain will have the minimal permissions that are essential for processes in that domain to do their roles. For more information, see http://tomoyo.sourceforge.jp/wiki-e/?WhatIs .|http://tomoyo.sourceforge.jp/}}&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* None (no more package required for LFS Linux.)&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO aware kernels =&lt;br /&gt;
&lt;br /&gt;
== Kernel 2.6.32.8 with TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Download the ccs-patch-{{TOMOYO-Version}}.tar.gz file and put it in kernel source directory, Patch the kernel source:&lt;br /&gt;
&lt;br /&gt;
 tar xzvf ccs-patch-{{TOMOYO-Version}}.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 patch -Np1 -i patches/ccs-patch-2.6.32.diff&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select as below.&lt;br /&gt;
&lt;br /&gt;
 [*] CCSecurity support&lt;br /&gt;
 (2048) Default maximal count for learning mode&lt;br /&gt;
 (/sbin/ccs-init) Default policy loader&lt;br /&gt;
 (/sbin/ccs-start) Alternative activation trigger&lt;br /&gt;
 (/sbin/modprobe /sbin/hotplug) Built-in domain initializer programs&lt;br /&gt;
 [*]   Auditing interface support&lt;br /&gt;
 (1024)  Default maximal count for grant log&lt;br /&gt;
 (1024)  Default maximal count for reject log&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Download 2.6.30 (or later) from http://www.kernel.org/ and extract it.&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select &amp;quot;TOMOYO Linux support&amp;quot; as shown below.&lt;br /&gt;
&lt;br /&gt;
 [ ] Enable access key retention support&lt;br /&gt;
 [*] Enable different security models&lt;br /&gt;
 -*- Enable the securityfs filesystem&lt;br /&gt;
 [ ] Socket and Networking Security Hooks&lt;br /&gt;
 -*- Security hooks for pathname based access control&lt;br /&gt;
 [ ] File POSIX Capabilities&lt;br /&gt;
 (0) Low address space to protect from user allocation&lt;br /&gt;
 [*] TOMOYO Linux Support&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO Tools =&lt;br /&gt;
&lt;br /&gt;
Download the ccs-tools-1.6.8-20100115.tar.gz (for TOMOYO 2.2) or ccs-tools-1.7.1-20100110.tar.gz (for TOMOYO 1.7) file and put it somewhere.&lt;br /&gt;
&lt;br /&gt;
Change directory to ccstools/ .&lt;br /&gt;
&lt;br /&gt;
== Non-Multilib ==&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
== Multilib ==&lt;br /&gt;
&lt;br /&gt;
=== 32Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== N32 ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib32@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILDN32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== 64Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib64@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD64}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
= Configuring =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Run init_policy to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/init_policy&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
You can save audit logs if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/rc.d/init.d/ccs-auditd &amp;lt;&amp;lt; EOF&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 /usr/sbin/ccs-auditd /dev/null /var/log/tomoyo/reject_log.txt&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/rc.d/init.d/ccs-auditd&lt;br /&gt;
&lt;br /&gt;
 for i in 2 3 4 5; do&lt;br /&gt;
 ln -sv ../init.d/ccs-auditd /etc/rc.d/rc${i}.d/S99ccs-auditd; done&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /var/log/tomoyo&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Run tomoyo_init_policy.sh to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/tomoyo_init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
= Booting TOMOYO Linux =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
You can use boot parameter CCS=&amp;lt;name&amp;gt; to load profile /etc/ccs/profile-&amp;lt;name&amp;gt;.conf .&lt;br /&gt;
Without CCS= parameter or &amp;lt;name&amp;gt; is &amp;quot;default&amp;quot;, /etc/ccs/profile.conf will be loaded.&lt;br /&gt;
You can use CCS=ask to let user select from available profiles in /etc/ccs/ at boot time&lt;br /&gt;
You can use CCS=disable to boot as usual Linux (i.e. without TOMOYO protection).&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Same as TOMOYO {{TOMOYO-Version}}, except that the policies are loaded from /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
But, be sure to add security=tomoyo parameter.&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default security=tomoyo&lt;br /&gt;
&lt;br /&gt;
= Configuring Policy to Guard Linux as Needed =&lt;br /&gt;
&lt;br /&gt;
Login to the system as root user, and run editpolicy included in TOMOYO Linux tools.&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/ccs-editpolicy&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
| /sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-init, tomoyo-init&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-editpolicy, ccs-setlevel, ccs-setprofile, ccs-ccstree, ccs-savepolicy, ccs-auditd, ccs-findtemp, ccs-sortpolicy, ccs-ld-watch, ccs-queryd, ccs-checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/lib/ccs&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|tomoyo_init_policy.sh, init_policy.sh, editpolicy, setlevel, setprofile, ccstree, savepolicy, makesyaoranconf, ccs-auditd, ccs-notifyd, findtemp, sortpolicy, ld-watch, ccs-queryd, checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Short Descriptions ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-editpolicy&lt;br /&gt;
|Edits the current policy in /proc/ccs/ or /sys/kernel/security/tomoyo/ directory&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setlevel&lt;br /&gt;
|Changes the current control level (i.e. writing to /proc/ccs/profile or /sys/kernel/security/tomoyo/profile ) and displays the new control level.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setprofile&lt;br /&gt;
|Assigns a profile to domains.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-pstree (for TOMOYO 1.7) ccs-ccstree (for TOMOYO 2.2)&lt;br /&gt;
|Lists the domainnames of currently running processes belong to and the profile numbers the domains currently assigned to.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-savepolicy&lt;br /&gt;
|Saves the on-memory policy onto disk.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-auditd&lt;br /&gt;
|Reads from /proc/ccs/grant_log and /proc/ccs/reject_log and writes to the location given in the commandline parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-sortpolicy&lt;br /&gt;
|Remove duplicated entry from logs written by &amp;quot;ccs-auditd&amp;quot;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-findtemp&lt;br /&gt;
|Reads domain policy from standard input and checks the existence of pathnames, and dumps the nonexistent pathnames.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-ld-watch&lt;br /&gt;
|Appends shared libraries to exception policy automatically using &amp;quot;allow_read&amp;quot; directive when the location of shared libraries in /etc/ld.so.cache has changed.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-queryd&lt;br /&gt;
|Detects policy violation and displays the access request. You can tell the system whether the access request should be granted (or granted and policy should be appended to grant the access request) or rejected after you validate the access request.&lt;br /&gt;
&lt;br /&gt;
By running this program while updating packages, you can avoid errors due to insufficient permissions.&lt;br /&gt;
&lt;br /&gt;
Never grant access requests unconditionally. The cause of policy violation is not always updating packages, but may by malicious requests by attackers. If you grant access requests caused by malicious requests by attackers, the system gets intruded.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-checkpolicy&lt;br /&gt;
|Reads policy files from standard input and checks syntaxes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-init&lt;br /&gt;
|Loads policy files from /etc/ccs/ directory. Put this program as /sbin/ccs-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!tomoyo-init&lt;br /&gt;
|Loads policy files from /etc/tomoyo/ directory. Put this program as /sbin/tomoyo-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=Template:TOMOYO-Version&amp;diff=19907</id>
		<title>Template:TOMOYO-Version</title>
		<link rel="alternate" type="text/html" href="?title=Template:TOMOYO-Version&amp;diff=19907"/>
		<updated>2010-02-14T07:20:23Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;1.7.1-20100214&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=TOMOYO&amp;diff=19844</id>
		<title>TOMOYO</title>
		<link rel="alternate" type="text/html" href="?title=TOMOYO&amp;diff=19844"/>
		<updated>2010-01-10T12:24:03Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;text-align: left; background-color: AliceBlue;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Download Tools Source:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/43376/ccs-tools-1.7.1-20100110.tar.gz (for TOMOYO 1.7)&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30298/ccs-tools-1.6.8-20091111.tar.gz (for TOMOYO 2.2)&lt;br /&gt;
|-&lt;br /&gt;
!Download Kernel Patch:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/43375/ccs-patch-{{TOMOYO-Version}}.tar.gz&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{Package-Introduction|The fundamental concept of TOMOYO Linux is &amp;quot;tracking process invocation history&amp;quot;. TOMOYO Linux splits domains using &amp;quot;process invocation history&amp;quot; and the process transits to a different domain whenever execution of a program (i.e. do_execve()) is requested. By transiting to a different domain whenever execution of a program is requested, each domain will have the minimal permissions that are essential for processes in that domain to do their roles. For more information, see http://tomoyo.sourceforge.jp/wiki-e/?WhatIs .|http://tomoyo.sourceforge.jp/}}&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* None (no more package required for LFS Linux.)&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO aware kernels =&lt;br /&gt;
&lt;br /&gt;
== Kernel 2.6.32.2 with TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Download the ccs-patch-{{TOMOYO-Version}}.tar.gz file and put it in kernel source directory, Patch the kernel source:&lt;br /&gt;
&lt;br /&gt;
 tar xzvf ccs-patch-{{TOMOYO-Version}}.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 patch -Np1 -i patches/ccs-patch-2.6.32.diff&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select as below.&lt;br /&gt;
&lt;br /&gt;
 [*] CCSecurity support&lt;br /&gt;
 (2048) Default maximal count for learning mode&lt;br /&gt;
 (/sbin/ccs-init) Default policy loader&lt;br /&gt;
 (/sbin/ccs-start) Alternative activation trigger&lt;br /&gt;
 (/sbin/modprobe /sbin/hotplug) Built-in domain initializer programs&lt;br /&gt;
 [*]   Auditing interface support&lt;br /&gt;
 (1024)  Default maximal count for grant log&lt;br /&gt;
 (1024)  Default maximal count for reject log&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Download 2.6.30 (or later) from http://www.kernel.org/ and extract it.&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select &amp;quot;TOMOYO Linux support&amp;quot; as shown below.&lt;br /&gt;
&lt;br /&gt;
 [ ] Enable access key retention support&lt;br /&gt;
 [*] Enable different security models&lt;br /&gt;
 -*- Enable the securityfs filesystem&lt;br /&gt;
 [ ] Socket and Networking Security Hooks&lt;br /&gt;
 -*- Security hooks for pathname based access control&lt;br /&gt;
 [ ] File POSIX Capabilities&lt;br /&gt;
 (0) Low address space to protect from user allocation&lt;br /&gt;
 [*] TOMOYO Linux Support&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO Tools =&lt;br /&gt;
&lt;br /&gt;
Download the ccs-tools-1.6.8-20091111.tar.gz (for TOMOYO 2.2) or ccs-tools-1.7.1-20100110.tar.gz (for TOMOYO 1.7) file and put it somewhere.&lt;br /&gt;
&lt;br /&gt;
Change directory to ccstools/ .&lt;br /&gt;
&lt;br /&gt;
== Non-Multilib ==&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
== Multilib ==&lt;br /&gt;
&lt;br /&gt;
=== 32Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== N32 ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib32@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILDN32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== 64Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib64@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD64}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
= Configuring =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Run init_policy to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/init_policy&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
You can save audit logs if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/rc.d/init.d/ccs-auditd &amp;lt;&amp;lt; EOF&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 /usr/sbin/ccs-auditd /dev/null /var/log/tomoyo/reject_log.txt&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/rc.d/init.d/ccs-auditd&lt;br /&gt;
&lt;br /&gt;
 for i in 2 3 4 5; do&lt;br /&gt;
 ln -sv ../init.d/ccs-auditd /etc/rc.d/rc${i}.d/S99ccs-auditd; done&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /var/log/tomoyo&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Run tomoyo_init_policy.sh to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/tomoyo_init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
= Booting TOMOYO Linux =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
You can use boot parameter CCS=&amp;lt;name&amp;gt; to load profile /etc/ccs/profile-&amp;lt;name&amp;gt;.conf .&lt;br /&gt;
Without CCS= parameter or &amp;lt;name&amp;gt; is &amp;quot;default&amp;quot;, /etc/ccs/profile.conf will be loaded.&lt;br /&gt;
You can use CCS=ask to let user select from available profiles in /etc/ccs/ at boot time&lt;br /&gt;
You can use CCS=disable to boot as usual Linux (i.e. without TOMOYO protection).&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Same as TOMOYO {{TOMOYO-Version}}, except that the policies are loaded from /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
But, be sure to add security=tomoyo parameter.&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default security=tomoyo&lt;br /&gt;
&lt;br /&gt;
= Configuring Policy to Guard Linux as Needed =&lt;br /&gt;
&lt;br /&gt;
Login to the system as root user, and run editpolicy included in TOMOYO Linux tools.&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/ccs-editpolicy&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
| /sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-init, tomoyo-init&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-editpolicy, ccs-setlevel, ccs-setprofile, ccs-ccstree, ccs-savepolicy, ccs-auditd, ccs-findtemp, ccs-sortpolicy, ccs-ld-watch, ccs-queryd, ccs-checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/lib/ccs&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|tomoyo_init_policy.sh, init_policy.sh, editpolicy, setlevel, setprofile, ccstree, savepolicy, makesyaoranconf, ccs-auditd, ccs-notifyd, findtemp, sortpolicy, ld-watch, ccs-queryd, checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Short Descriptions ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-editpolicy&lt;br /&gt;
|Edits the current policy in /proc/ccs/ or /sys/kernel/security/tomoyo/ directory&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setlevel&lt;br /&gt;
|Changes the current control level (i.e. writing to /proc/ccs/profile or /sys/kernel/security/tomoyo/profile ) and displays the new control level.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setprofile&lt;br /&gt;
|Assigns a profile to domains.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-pstree (for TOMOYO 1.7) ccs-ccstree (for TOMOYO 2.2)&lt;br /&gt;
|Lists the domainnames of currently running processes belong to and the profile numbers the domains currently assigned to.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-savepolicy&lt;br /&gt;
|Saves the on-memory policy onto disk.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-auditd&lt;br /&gt;
|Reads from /proc/ccs/grant_log and /proc/ccs/reject_log and writes to the location given in the commandline parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-sortpolicy&lt;br /&gt;
|Remove duplicated entry from logs written by &amp;quot;ccs-auditd&amp;quot;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-findtemp&lt;br /&gt;
|Reads domain policy from standard input and checks the existence of pathnames, and dumps the nonexistent pathnames.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-ld-watch&lt;br /&gt;
|Appends shared libraries to exception policy automatically using &amp;quot;allow_read&amp;quot; directive when the location of shared libraries in /etc/ld.so.cache has changed.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-queryd&lt;br /&gt;
|Detects policy violation and displays the access request. You can tell the system whether the access request should be granted (or granted and policy should be appended to grant the access request) or rejected after you validate the access request.&lt;br /&gt;
&lt;br /&gt;
By running this program while updating packages, you can avoid errors due to insufficient permissions.&lt;br /&gt;
&lt;br /&gt;
Never grant access requests unconditionally. The cause of policy violation is not always updating packages, but may by malicious requests by attackers. If you grant access requests caused by malicious requests by attackers, the system gets intruded.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-checkpolicy&lt;br /&gt;
|Reads policy files from standard input and checks syntaxes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-init&lt;br /&gt;
|Loads policy files from /etc/ccs/ directory. Put this program as /sbin/ccs-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!tomoyo-init&lt;br /&gt;
|Loads policy files from /etc/tomoyo/ directory. Put this program as /sbin/tomoyo-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=Template:TOMOYO-Version&amp;diff=19733</id>
		<title>Template:TOMOYO-Version</title>
		<link rel="alternate" type="text/html" href="?title=Template:TOMOYO-Version&amp;diff=19733"/>
		<updated>2009-12-20T08:27:18Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;1.7.1-20091220&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=TOMOYO&amp;diff=19732</id>
		<title>TOMOYO</title>
		<link rel="alternate" type="text/html" href="?title=TOMOYO&amp;diff=19732"/>
		<updated>2009-12-20T08:26:45Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;text-align: left; background-color: AliceBlue;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Download Tools Source:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/43376/ccs-tools-1.7.1-20091111.tar.gz (for TOMOYO 1.7)&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30298/ccs-tools-1.6.8-20091111.tar.gz (for TOMOYO 2.2)&lt;br /&gt;
|-&lt;br /&gt;
!Download Kernel Patch:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/43375/ccs-patch-{{TOMOYO-Version}}.tar.gz&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{Package-Introduction|The fundamental concept of TOMOYO Linux is &amp;quot;tracking process invocation history&amp;quot;. TOMOYO Linux splits domains using &amp;quot;process invocation history&amp;quot; and the process transits to a different domain whenever execution of a program (i.e. do_execve()) is requested. By transiting to a different domain whenever execution of a program is requested, each domain will have the minimal permissions that are essential for processes in that domain to do their roles. For more information, see http://tomoyo.sourceforge.jp/wiki-e/?WhatIs .|http://tomoyo.sourceforge.jp/}}&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* None (no more package required for LFS Linux.)&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO aware kernels =&lt;br /&gt;
&lt;br /&gt;
== Kernel 2.6.32.2 with TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Download the ccs-patch-{{TOMOYO-Version}}.tar.gz file and put it in kernel source directory, Patch the kernel source:&lt;br /&gt;
&lt;br /&gt;
 tar xzvf ccs-patch-{{TOMOYO-Version}}.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 patch -Np1 -i patches/ccs-patch-2.6.32.diff&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select as below.&lt;br /&gt;
&lt;br /&gt;
 [*] CCSecurity support&lt;br /&gt;
 (2048) Default maximal count for learning mode&lt;br /&gt;
 (/sbin/ccs-init) Default policy loader&lt;br /&gt;
 (/sbin/ccs-start) Alternative activation trigger&lt;br /&gt;
 (/sbin/modprobe /sbin/hotplug) Built-in domain initializer programs&lt;br /&gt;
 [*]   Auditing interface support&lt;br /&gt;
 (1024)  Default maximal count for grant log&lt;br /&gt;
 (1024)  Default maximal count for reject log&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Download 2.6.30 (or later) from http://www.kernel.org/ and extract it.&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select &amp;quot;TOMOYO Linux support&amp;quot; as shown below.&lt;br /&gt;
&lt;br /&gt;
 [ ] Enable access key retention support&lt;br /&gt;
 [*] Enable different security models&lt;br /&gt;
 -*- Enable the securityfs filesystem&lt;br /&gt;
 [ ] Socket and Networking Security Hooks&lt;br /&gt;
 -*- Security hooks for pathname based access control&lt;br /&gt;
 [ ] File POSIX Capabilities&lt;br /&gt;
 (0) Low address space to protect from user allocation&lt;br /&gt;
 [*] TOMOYO Linux Support&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO Tools =&lt;br /&gt;
&lt;br /&gt;
Download the ccs-tools-1.6.8-20091111.tar.gz (for TOMOYO 2.2) or ccs-tools-1.7.1-20091111.tar.gz (for TOMOYO 1.7) file and put it somewhere.&lt;br /&gt;
&lt;br /&gt;
Change directory to ccstools/ .&lt;br /&gt;
&lt;br /&gt;
== Non-Multilib ==&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
== Multilib ==&lt;br /&gt;
&lt;br /&gt;
=== 32Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== N32 ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib32@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILDN32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== 64Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib64@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD64}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
= Configuring =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Run init_policy to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/init_policy&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
You can save audit logs if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/rc.d/init.d/ccs-auditd &amp;lt;&amp;lt; EOF&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 /usr/sbin/ccs-auditd /dev/null /var/log/tomoyo/reject_log.txt&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/rc.d/init.d/ccs-auditd&lt;br /&gt;
&lt;br /&gt;
 for i in 2 3 4 5; do&lt;br /&gt;
 ln -sv ../init.d/ccs-auditd /etc/rc.d/rc${i}.d/S99ccs-auditd; done&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /var/log/tomoyo&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Run tomoyo_init_policy.sh to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/tomoyo_init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
= Booting TOMOYO Linux =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
You can use boot parameter CCS=&amp;lt;name&amp;gt; to load profile /etc/ccs/profile-&amp;lt;name&amp;gt;.conf .&lt;br /&gt;
Without CCS= parameter or &amp;lt;name&amp;gt; is &amp;quot;default&amp;quot;, /etc/ccs/profile.conf will be loaded.&lt;br /&gt;
You can use CCS=ask to let user select from available profiles in /etc/ccs/ at boot time&lt;br /&gt;
You can use CCS=disable to boot as usual Linux (i.e. without TOMOYO protection).&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Same as TOMOYO {{TOMOYO-Version}}, except that the policies are loaded from /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
But, be sure to add security=tomoyo parameter.&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default security=tomoyo&lt;br /&gt;
&lt;br /&gt;
= Configuring Policy to Guard Linux as Needed =&lt;br /&gt;
&lt;br /&gt;
Login to the system as root user, and run editpolicy included in TOMOYO Linux tools.&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/ccs-editpolicy&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
| /sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-init, tomoyo-init&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-editpolicy, ccs-setlevel, ccs-setprofile, ccs-ccstree, ccs-savepolicy, ccs-auditd, ccs-findtemp, ccs-sortpolicy, ccs-ld-watch, ccs-queryd, ccs-checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/lib/ccs&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|tomoyo_init_policy.sh, init_policy.sh, editpolicy, setlevel, setprofile, ccstree, savepolicy, makesyaoranconf, ccs-auditd, ccs-notifyd, findtemp, sortpolicy, ld-watch, ccs-queryd, checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Short Descriptions ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-editpolicy&lt;br /&gt;
|Edits the current policy in /proc/ccs/ or /sys/kernel/security/tomoyo/ directory&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setlevel&lt;br /&gt;
|Changes the current control level (i.e. writing to /proc/ccs/profile or /sys/kernel/security/tomoyo/profile ) and displays the new control level.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setprofile&lt;br /&gt;
|Assigns a profile to domains.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-pstree (for TOMOYO 1.7) ccs-ccstree (for TOMOYO 2.2)&lt;br /&gt;
|Lists the domainnames of currently running processes belong to and the profile numbers the domains currently assigned to.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-savepolicy&lt;br /&gt;
|Saves the on-memory policy onto disk.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-auditd&lt;br /&gt;
|Reads from /proc/ccs/grant_log and /proc/ccs/reject_log and writes to the location given in the commandline parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-sortpolicy&lt;br /&gt;
|Remove duplicated entry from logs written by &amp;quot;ccs-auditd&amp;quot;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-findtemp&lt;br /&gt;
|Reads domain policy from standard input and checks the existence of pathnames, and dumps the nonexistent pathnames.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-ld-watch&lt;br /&gt;
|Appends shared libraries to exception policy automatically using &amp;quot;allow_read&amp;quot; directive when the location of shared libraries in /etc/ld.so.cache has changed.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-queryd&lt;br /&gt;
|Detects policy violation and displays the access request. You can tell the system whether the access request should be granted (or granted and policy should be appended to grant the access request) or rejected after you validate the access request.&lt;br /&gt;
&lt;br /&gt;
By running this program while updating packages, you can avoid errors due to insufficient permissions.&lt;br /&gt;
&lt;br /&gt;
Never grant access requests unconditionally. The cause of policy violation is not always updating packages, but may by malicious requests by attackers. If you grant access requests caused by malicious requests by attackers, the system gets intruded.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-checkpolicy&lt;br /&gt;
|Reads policy files from standard input and checks syntaxes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-init&lt;br /&gt;
|Loads policy files from /etc/ccs/ directory. Put this program as /sbin/ccs-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!tomoyo-init&lt;br /&gt;
|Loads policy files from /etc/tomoyo/ directory. Put this program as /sbin/tomoyo-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=TOMOYO&amp;diff=19629</id>
		<title>TOMOYO</title>
		<link rel="alternate" type="text/html" href="?title=TOMOYO&amp;diff=19629"/>
		<updated>2009-11-12T11:43:20Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;text-align: left; background-color: AliceBlue;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Download Tools Source:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/43376/ccs-tools-1.7.1-20091111.tar.gz (for TOMOYO 1.7)&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30298/ccs-tools-1.6.8-20091111.tar.gz (for TOMOYO 2.2)&lt;br /&gt;
|-&lt;br /&gt;
!Download Kernel Patch:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/43375/ccs-patch-{{TOMOYO-Version}}.tar.gz&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{Package-Introduction|The fundamental concept of TOMOYO Linux is &amp;quot;tracking process invocation history&amp;quot;. TOMOYO Linux splits domains using &amp;quot;process invocation history&amp;quot; and the process transits to a different domain whenever execution of a program (i.e. do_execve()) is requested. By transiting to a different domain whenever execution of a program is requested, each domain will have the minimal permissions that are essential for processes in that domain to do their roles. For more information, see http://tomoyo.sourceforge.jp/wiki-e/?WhatIs .|http://tomoyo.sourceforge.jp/}}&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* None (no more package required for LFS Linux.)&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO aware kernels =&lt;br /&gt;
&lt;br /&gt;
== Kernel 2.6.32-rc6 with TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Download the ccs-patch-{{TOMOYO-Version}}.tar.gz file and put it in kernel source directory, Patch the kernel source:&lt;br /&gt;
&lt;br /&gt;
 tar xzvf ccs-patch-{{TOMOYO-Version}}.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 patch -Np1 -i patches/ccs-patch-2.6.32.diff&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select as below.&lt;br /&gt;
&lt;br /&gt;
 [*] CCSecurity support&lt;br /&gt;
 (2048) Default maximal count for learning mode&lt;br /&gt;
 (/sbin/ccs-init) Default policy loader&lt;br /&gt;
 (/sbin/ccs-start) Alternative activation trigger&lt;br /&gt;
 (/sbin/modprobe /sbin/hotplug) Built-in domain initializer programs&lt;br /&gt;
 [*]   Auditing interface support&lt;br /&gt;
 (1024)  Default maximal count for grant log&lt;br /&gt;
 (1024)  Default maximal count for reject log&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Download 2.6.30 (or later) from http://www.kernel.org/ and extract it.&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select &amp;quot;TOMOYO Linux support&amp;quot; as shown below.&lt;br /&gt;
&lt;br /&gt;
 [ ] Enable access key retention support&lt;br /&gt;
 [*] Enable different security models&lt;br /&gt;
 -*- Enable the securityfs filesystem&lt;br /&gt;
 [ ] Socket and Networking Security Hooks&lt;br /&gt;
 -*- Security hooks for pathname based access control&lt;br /&gt;
 [ ] File POSIX Capabilities&lt;br /&gt;
 (0) Low address space to protect from user allocation&lt;br /&gt;
 [*] TOMOYO Linux Support&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO Tools =&lt;br /&gt;
&lt;br /&gt;
Download the ccs-tools-1.6.8-20091111.tar.gz (for TOMOYO 2.2) or ccs-tools-1.7.1-20091111.tar.gz (for TOMOYO 1.7) file and put it somewhere.&lt;br /&gt;
&lt;br /&gt;
Change directory to ccstools/ .&lt;br /&gt;
&lt;br /&gt;
== Non-Multilib ==&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
== Multilib ==&lt;br /&gt;
&lt;br /&gt;
=== 32Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== N32 ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib32@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILDN32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== 64Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib64@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD64}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
= Configuring =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Run init_policy to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/init_policy&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
You can save audit logs if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/rc.d/init.d/ccs-auditd &amp;lt;&amp;lt; EOF&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 /usr/sbin/ccs-auditd /dev/null /var/log/tomoyo/reject_log.txt&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/rc.d/init.d/ccs-auditd&lt;br /&gt;
&lt;br /&gt;
 for i in 2 3 4 5; do&lt;br /&gt;
 ln -sv ../init.d/ccs-auditd /etc/rc.d/rc${i}.d/S99ccs-auditd; done&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /var/log/tomoyo&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Run tomoyo_init_policy.sh to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/tomoyo_init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
= Booting TOMOYO Linux =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
You can use boot parameter CCS=&amp;lt;name&amp;gt; to load profile /etc/ccs/profile-&amp;lt;name&amp;gt;.conf .&lt;br /&gt;
Without CCS= parameter or &amp;lt;name&amp;gt; is &amp;quot;default&amp;quot;, /etc/ccs/profile.conf will be loaded.&lt;br /&gt;
You can use CCS=ask to let user select from available profiles in /etc/ccs/ at boot time&lt;br /&gt;
You can use CCS=disable to boot as usual Linux (i.e. without TOMOYO protection).&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Same as TOMOYO {{TOMOYO-Version}}, except that the policies are loaded from /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
But, be sure to add security=tomoyo parameter.&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default security=tomoyo&lt;br /&gt;
&lt;br /&gt;
= Configuring Policy to Guard Linux as Needed =&lt;br /&gt;
&lt;br /&gt;
Login to the system as root user, and run editpolicy included in TOMOYO Linux tools.&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/ccs-editpolicy&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
| /sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-init, tomoyo-init&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-editpolicy, ccs-setlevel, ccs-setprofile, ccs-ccstree, ccs-savepolicy, ccs-auditd, ccs-findtemp, ccs-sortpolicy, ccs-ld-watch, ccs-queryd, ccs-checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/lib/ccs&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|tomoyo_init_policy.sh, init_policy.sh, editpolicy, setlevel, setprofile, ccstree, savepolicy, makesyaoranconf, ccs-auditd, ccs-notifyd, findtemp, sortpolicy, ld-watch, ccs-queryd, checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Short Descriptions ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-editpolicy&lt;br /&gt;
|Edits the current policy in /proc/ccs/ or /sys/kernel/security/tomoyo/ directory&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setlevel&lt;br /&gt;
|Changes the current control level (i.e. writing to /proc/ccs/profile or /sys/kernel/security/tomoyo/profile ) and displays the new control level.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setprofile&lt;br /&gt;
|Assigns a profile to domains.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-pstree (for TOMOYO 1.7) ccs-ccstree (for TOMOYO 2.2)&lt;br /&gt;
|Lists the domainnames of currently running processes belong to and the profile numbers the domains currently assigned to.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-savepolicy&lt;br /&gt;
|Saves the on-memory policy onto disk.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-auditd&lt;br /&gt;
|Reads from /proc/ccs/grant_log and /proc/ccs/reject_log and writes to the location given in the commandline parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-sortpolicy&lt;br /&gt;
|Remove duplicated entry from logs written by &amp;quot;ccs-auditd&amp;quot;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-findtemp&lt;br /&gt;
|Reads domain policy from standard input and checks the existence of pathnames, and dumps the nonexistent pathnames.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-ld-watch&lt;br /&gt;
|Appends shared libraries to exception policy automatically using &amp;quot;allow_read&amp;quot; directive when the location of shared libraries in /etc/ld.so.cache has changed.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-queryd&lt;br /&gt;
|Detects policy violation and displays the access request. You can tell the system whether the access request should be granted (or granted and policy should be appended to grant the access request) or rejected after you validate the access request.&lt;br /&gt;
&lt;br /&gt;
By running this program while updating packages, you can avoid errors due to insufficient permissions.&lt;br /&gt;
&lt;br /&gt;
Never grant access requests unconditionally. The cause of policy violation is not always updating packages, but may by malicious requests by attackers. If you grant access requests caused by malicious requests by attackers, the system gets intruded.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-checkpolicy&lt;br /&gt;
|Reads policy files from standard input and checks syntaxes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-init&lt;br /&gt;
|Loads policy files from /etc/ccs/ directory. Put this program as /sbin/ccs-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!tomoyo-init&lt;br /&gt;
|Loads policy files from /etc/tomoyo/ directory. Put this program as /sbin/tomoyo-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=Template:TOMOYO-Version&amp;diff=19628</id>
		<title>Template:TOMOYO-Version</title>
		<link rel="alternate" type="text/html" href="?title=Template:TOMOYO-Version&amp;diff=19628"/>
		<updated>2009-11-12T11:39:12Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;1.7.1-20091111&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=TOMOYO&amp;diff=19627</id>
		<title>TOMOYO</title>
		<link rel="alternate" type="text/html" href="?title=TOMOYO&amp;diff=19627"/>
		<updated>2009-11-12T11:38:32Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;text-align: left; background-color: AliceBlue;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Download Tools Source:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/43376/ccs-tools-1.7.1-20091111.tar.gz&lt;br /&gt;
|-&lt;br /&gt;
!Download Kernel Patch:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/43375/ccs-patch-{{TOMOYO-Version}}.tar.gz&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{Package-Introduction|The fundamental concept of TOMOYO Linux is &amp;quot;tracking process invocation history&amp;quot;. TOMOYO Linux splits domains using &amp;quot;process invocation history&amp;quot; and the process transits to a different domain whenever execution of a program (i.e. do_execve()) is requested. By transiting to a different domain whenever execution of a program is requested, each domain will have the minimal permissions that are essential for processes in that domain to do their roles. For more information, see http://tomoyo.sourceforge.jp/wiki-e/?WhatIs .|http://tomoyo.sourceforge.jp/}}&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* None (no more package required for LFS Linux.)&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO aware kernels =&lt;br /&gt;
&lt;br /&gt;
== Kernel 2.6.32-rc6 with TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Download the ccs-patch-{{TOMOYO-Version}}.tar.gz file and put it in kernel source directory, Patch the kernel source:&lt;br /&gt;
&lt;br /&gt;
 tar xzvf ccs-patch-{{TOMOYO-Version}}.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 patch -Np1 -i patches/ccs-patch-2.6.32.diff&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select as below.&lt;br /&gt;
&lt;br /&gt;
 [*] CCSecurity support&lt;br /&gt;
 (2048) Default maximal count for learning mode&lt;br /&gt;
 (/sbin/ccs-init) Default policy loader&lt;br /&gt;
 (/sbin/ccs-start) Alternative activation trigger&lt;br /&gt;
 (/sbin/modprobe /sbin/hotplug) Built-in domain initializer programs&lt;br /&gt;
 [*]   Auditing interface support&lt;br /&gt;
 (1024)  Default maximal count for grant log&lt;br /&gt;
 (1024)  Default maximal count for reject log&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Download 2.6.30 (or later) from http://www.kernel.org/ and extract it.&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select &amp;quot;TOMOYO Linux support&amp;quot; as shown below.&lt;br /&gt;
&lt;br /&gt;
 [ ] Enable access key retention support&lt;br /&gt;
 [*] Enable different security models&lt;br /&gt;
 -*- Enable the securityfs filesystem&lt;br /&gt;
 [ ] Socket and Networking Security Hooks&lt;br /&gt;
 -*- Security hooks for pathname based access control&lt;br /&gt;
 [ ] File POSIX Capabilities&lt;br /&gt;
 (0) Low address space to protect from user allocation&lt;br /&gt;
 [*] TOMOYO Linux Support&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO Tools =&lt;br /&gt;
&lt;br /&gt;
Download the ccs-tools-1.6.8-20091111.tar.gz file from http://jaist.dl.sourceforge.jp/tomoyo/30298/ccs-tools-1.6.8-20091111.tar.gz and put it somewhere.&lt;br /&gt;
&lt;br /&gt;
Change directory to ccstools/ .&lt;br /&gt;
&lt;br /&gt;
== Non-Multilib ==&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
== Multilib ==&lt;br /&gt;
&lt;br /&gt;
=== 32Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== N32 ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib32@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILDN32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== 64Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib64@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD64}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
= Configuring =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Run init_policy to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/init_policy&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
You can save audit logs if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/rc.d/init.d/ccs-auditd &amp;lt;&amp;lt; EOF&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 /usr/sbin/ccs-auditd /dev/null /var/log/tomoyo/reject_log.txt&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/rc.d/init.d/ccs-auditd&lt;br /&gt;
&lt;br /&gt;
 for i in 2 3 4 5; do&lt;br /&gt;
 ln -sv ../init.d/ccs-auditd /etc/rc.d/rc${i}.d/S99ccs-auditd; done&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /var/log/tomoyo&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Run tomoyo_init_policy.sh to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/tomoyo_init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
= Booting TOMOYO Linux =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
You can use boot parameter CCS=&amp;lt;name&amp;gt; to load profile /etc/ccs/profile-&amp;lt;name&amp;gt;.conf .&lt;br /&gt;
Without CCS= parameter or &amp;lt;name&amp;gt; is &amp;quot;default&amp;quot;, /etc/ccs/profile.conf will be loaded.&lt;br /&gt;
You can use CCS=ask to let user select from available profiles in /etc/ccs/ at boot time&lt;br /&gt;
You can use CCS=disable to boot as usual Linux (i.e. without TOMOYO protection).&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Same as TOMOYO {{TOMOYO-Version}}, except that the policies are loaded from /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
But, be sure to add security=tomoyo parameter.&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default security=tomoyo&lt;br /&gt;
&lt;br /&gt;
= Configuring Policy to Guard Linux as Needed =&lt;br /&gt;
&lt;br /&gt;
Login to the system as root user, and run editpolicy included in TOMOYO Linux tools.&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/ccs-editpolicy&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
| /sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-init, tomoyo-init&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-editpolicy, ccs-setlevel, ccs-setprofile, ccs-ccstree, ccs-savepolicy, ccs-auditd, ccs-findtemp, ccs-sortpolicy, ccs-ld-watch, ccs-queryd, ccs-checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/lib/ccs&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|tomoyo_init_policy.sh, init_policy.sh, editpolicy, setlevel, setprofile, ccstree, savepolicy, makesyaoranconf, ccs-auditd, ccs-notifyd, findtemp, sortpolicy, ld-watch, ccs-queryd, checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Short Descriptions ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-editpolicy&lt;br /&gt;
|Edits the current policy in /proc/ccs/ or /sys/kernel/security/tomoyo/ directory&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setlevel&lt;br /&gt;
|Changes the current control level (i.e. writing to /proc/ccs/profile or /sys/kernel/security/tomoyo/profile ) and displays the new control level.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setprofile&lt;br /&gt;
|Assigns a profile to domains.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-pstree (for TOMOYO 1.7) ccs-ccstree (for TOMOYO 2.2)&lt;br /&gt;
|Lists the domainnames of currently running processes belong to and the profile numbers the domains currently assigned to.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-savepolicy&lt;br /&gt;
|Saves the on-memory policy onto disk.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-auditd&lt;br /&gt;
|Reads from /proc/ccs/grant_log and /proc/ccs/reject_log and writes to the location given in the commandline parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-sortpolicy&lt;br /&gt;
|Remove duplicated entry from logs written by &amp;quot;ccs-auditd&amp;quot;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-findtemp&lt;br /&gt;
|Reads domain policy from standard input and checks the existence of pathnames, and dumps the nonexistent pathnames.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-ld-watch&lt;br /&gt;
|Appends shared libraries to exception policy automatically using &amp;quot;allow_read&amp;quot; directive when the location of shared libraries in /etc/ld.so.cache has changed.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-queryd&lt;br /&gt;
|Detects policy violation and displays the access request. You can tell the system whether the access request should be granted (or granted and policy should be appended to grant the access request) or rejected after you validate the access request.&lt;br /&gt;
&lt;br /&gt;
By running this program while updating packages, you can avoid errors due to insufficient permissions.&lt;br /&gt;
&lt;br /&gt;
Never grant access requests unconditionally. The cause of policy violation is not always updating packages, but may by malicious requests by attackers. If you grant access requests caused by malicious requests by attackers, the system gets intruded.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-checkpolicy&lt;br /&gt;
|Reads policy files from standard input and checks syntaxes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-init&lt;br /&gt;
|Loads policy files from /etc/ccs/ directory. Put this program as /sbin/ccs-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!tomoyo-init&lt;br /&gt;
|Loads policy files from /etc/tomoyo/ directory. Put this program as /sbin/tomoyo-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=Template:TOMOYO-Version&amp;diff=18649</id>
		<title>Template:TOMOYO-Version</title>
		<link rel="alternate" type="text/html" href="?title=Template:TOMOYO-Version&amp;diff=18649"/>
		<updated>2009-07-12T04:49:25Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;1.6.8-20090703&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=TOMOYO&amp;diff=18648</id>
		<title>TOMOYO</title>
		<link rel="alternate" type="text/html" href="?title=TOMOYO&amp;diff=18648"/>
		<updated>2009-07-12T04:48:23Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;text-align: left; background-color: AliceBlue;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Download Tools Source:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30298/ccs-tools-1.6.8-20090623.tar.gz&lt;br /&gt;
|-&lt;br /&gt;
!Download Kernel Patch:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30297/ccs-patch-{{TOMOYO-Version}}.tar.gz&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{Package-Introduction|The fundamental concept of TOMOYO Linux is &amp;quot;tracking process invocation history&amp;quot;. TOMOYO Linux splits domains using &amp;quot;process invocation history&amp;quot; and the process transits to a different domain whenever execution of a program (i.e. do_execve()) is requested. By transiting to a different domain whenever execution of a program is requested, each domain will have the minimal permissions that are essential for processes in that domain to do their roles. For more information, see http://tomoyo.sourceforge.jp/wiki-e/?WhatIs .|http://tomoyo.sourceforge.jp/}}&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* None (no more package required for LFS Linux.)&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO aware kernels =&lt;br /&gt;
&lt;br /&gt;
== Kernel 2.6.30.1 with TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Download the ccs-patch-{{TOMOYO-Version}}.tar.gz file and put it in kernel source directory, Patch the kernel source:&lt;br /&gt;
&lt;br /&gt;
 tar xzvf ccs-patch-{{TOMOYO-Version}}.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 patch -Np1 -i patches/ccs-patch-2.6.30.diff&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;File systems&amp;quot; screen and select as below.&lt;br /&gt;
&lt;br /&gt;
 [*] SAKURA (Domain-Free Mandatory Access Control) support&lt;br /&gt;
 [*] TOMOYO (Domain-Based Mandatory Access Control) support&lt;br /&gt;
 (2048) Default maximal count for learning mode&lt;br /&gt;
 (/sbin/modprobe /sbin/hotplug) Built-in domain initializer programs&lt;br /&gt;
 [*]   Auditing interface support&lt;br /&gt;
 (1024)  Default maximal count for grant log&lt;br /&gt;
 (1024)  Default maximal count for reject log&lt;br /&gt;
 &amp;lt;M&amp;gt; SYAORAN (Tamper-Proof Device Filesystem) support&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Download 2.6.30 (or later) from http://www.kernel.org/ and extract it.&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select &amp;quot;TOMOYO Linux support&amp;quot; as shown below.&lt;br /&gt;
&lt;br /&gt;
 [ ] Enable access key retention support&lt;br /&gt;
 [*] Enable different security models&lt;br /&gt;
 -*- Enable the securityfs filesystem&lt;br /&gt;
 [ ] Socket and Networking Security Hooks&lt;br /&gt;
 -*- Security hooks for pathname based access control&lt;br /&gt;
 [ ] File POSIX Capabilities&lt;br /&gt;
 (0) Low address space to protect from user allocation&lt;br /&gt;
 [*] TOMOYO Linux Support&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO Tools =&lt;br /&gt;
&lt;br /&gt;
Download the ccs-tools-1.6.8-20090623.tar.gz file and put it somewhere.&lt;br /&gt;
&lt;br /&gt;
Change directory to ccstools/ .&lt;br /&gt;
&lt;br /&gt;
== Non-Multilib ==&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
== Multilib ==&lt;br /&gt;
&lt;br /&gt;
=== 32Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== N32 ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib32@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILDN32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== 64Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib64@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD64}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
= Configuring =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Run init_policy.sh to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
You can save audit logs if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/rc.d/init.d/ccs-auditd &amp;lt;&amp;lt; EOF&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 /usr/lib/ccs/ccs-auditd /dev/null /var/log/tomoyo/reject_log.txt&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/rc.d/init.d/ccs-auditd&lt;br /&gt;
&lt;br /&gt;
 for i in 2 3 4 5; do&lt;br /&gt;
 ln -sv ../init.d/ccs-auditd /etc/rc.d/rc${i}.d/S99ccs-auditd; done&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /var/log/tomoyo&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Run tomoyo_init_policy.sh to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/tomoyo_init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
= Booting TOMOYO Linux =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
You can use boot parameter CCS=&amp;lt;name&amp;gt; to load profile /etc/ccs/profile-&amp;lt;name&amp;gt;.conf .&lt;br /&gt;
Without CCS= parameter or &amp;lt;name&amp;gt; is &amp;quot;default&amp;quot;, /etc/ccs/profile.conf will be loaded.&lt;br /&gt;
You can use CCS=ask to let user select from available profiles in /etc/ccs/ at boot time&lt;br /&gt;
You can use CCS=disable to boot as usual Linux (i.e. without TOMOYO protection).&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Same as TOMOYO {{TOMOYO-Version}}, except that the policies are loaded from /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
But, be sure to add security=tomoyo parameter.&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default security=tomoyo&lt;br /&gt;
&lt;br /&gt;
= Configuring Policy to Guard Linux as Needed =&lt;br /&gt;
&lt;br /&gt;
Login to the system as root user, and run editpolicy included in TOMOYO Linux tools.&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/ccs-editpolicy&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
| /sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-init, tomoyo-init&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-editpolicy, ccs-setlevel, ccs-setprofile, ccs-ccstree, ccs-savepolicy, ccs-auditd, ccs-findtemp, ccs-sortpolicy, ccs-ld-watch, ccs-queryd, ccs-checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/lib/ccs&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|tomoyo_init_policy.sh, init_policy.sh, editpolicy, setlevel, setprofile, ccstree, savepolicy, makesyaoranconf, ccs-auditd, ccs-notifyd, findtemp, sortpolicy, ld-watch, ccs-queryd, checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Short Descriptions ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-editpolicy&lt;br /&gt;
|Edits the current policy in /proc/ccs/ or /sys/kernel/security/tomoyo/ directory&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setlevel&lt;br /&gt;
|Changes the current control level (i.e. writing to /proc/ccs/profile or /sys/kernel/security/tomoyo/profile ) and displays the new control level.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setprofile&lt;br /&gt;
|Assigns a profile to domains.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-ccstree&lt;br /&gt;
|Lists the domainnames of currently running processes belong to and the profile numbers the domains currently assigned to.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-savepolicy&lt;br /&gt;
|Saves the on-memory policy onto disk.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!makesyaoranconf&lt;br /&gt;
|Generates syaoran.conf, the configuration file for SYAORAN (the Tamper-Proof /dev filesystem). You can use SYAORAN filesystem if you want to run the system with read-only root fs or you want to prevent device files from tampering.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-auditd&lt;br /&gt;
|Reads from /proc/ccs/grant_log and /proc/ccs/reject_log and writes to the location given in the commandline parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-sortpolicy&lt;br /&gt;
|Remove duplicated entry from logs written by &amp;quot;ccs-auditd&amp;quot;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-findtemp&lt;br /&gt;
|Reads domain policy from standard input and checks the existence of pathnames, and dumps the nonexistent pathnames.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-ld-watch&lt;br /&gt;
|Appends shared libraries to exception policy automatically using &amp;quot;allow_read&amp;quot; directive when the location of shared libraries in /etc/ld.so.cache has changed.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-queryd&lt;br /&gt;
|Detects policy violation and displays the access request. You can tell the system whether the access request should be granted (or granted and policy should be appended to grant the access request) or rejected after you validate the access request.&lt;br /&gt;
&lt;br /&gt;
By running this program while updating packages, you can avoid errors due to insufficient permissions.&lt;br /&gt;
&lt;br /&gt;
Never grant access requests unconditionally. The cause of policy violation is not always updating packages, but may by malicious requests by attackers. If you grant access requests caused by malicious requests by attackers, the system gets intruded.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-checkpolicy&lt;br /&gt;
|Reads policy files from standard input and checks syntaxes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-init&lt;br /&gt;
|Loads policy files from /etc/ccs/ directory. Put this program as /sbin/ccs-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!tomoyo-init&lt;br /&gt;
|Loads policy files from /etc/tomoyo/ directory. Put this program as /sbin/tomoyo-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=TOMOYO&amp;diff=18377</id>
		<title>TOMOYO</title>
		<link rel="alternate" type="text/html" href="?title=TOMOYO&amp;diff=18377"/>
		<updated>2009-06-07T11:40:44Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;text-align: left; background-color: AliceBlue;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Download Tools Source:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30298/ccs-tools-1.6.8-20090528.tar.gz&lt;br /&gt;
|-&lt;br /&gt;
!Download Kernel Patch:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30297/ccs-patch-{{TOMOYO-Version}}.tar.gz&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{Package-Introduction|The fundamental concept of TOMOYO Linux is &amp;quot;tracking process invocation history&amp;quot;. TOMOYO Linux splits domains using &amp;quot;process invocation history&amp;quot; and the process transits to a different domain whenever execution of a program (i.e. do_execve()) is requested. By transiting to a different domain whenever execution of a program is requested, each domain will have the minimal permissions that are essential for processes in that domain to do their roles. For more information, see http://tomoyo.sourceforge.jp/wiki-e/?WhatIs .|http://tomoyo.sourceforge.jp/}}&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* None (no more package required for LFS Linux.)&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO aware kernels =&lt;br /&gt;
&lt;br /&gt;
== Kernel 2.6.29.4 with TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Download the ccs-patch-{{TOMOYO-Version}}.tar.gz file and put it in kernel source directory, Patch the kernel source:&lt;br /&gt;
&lt;br /&gt;
 tar xzvf ccs-patch-{{TOMOYO-Version}}.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 patch -Np1 -i patches/ccs-patch-2.6.29.diff&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;File systems&amp;quot; screen and select as below.&lt;br /&gt;
&lt;br /&gt;
 [*] SAKURA (Domain-Free Mandatory Access Control) support&lt;br /&gt;
 [*] TOMOYO (Domain-Based Mandatory Access Control) support&lt;br /&gt;
 (2048) Default maximal count for learning mode&lt;br /&gt;
 (/sbin/modprobe /sbin/hotplug) Built-in domain initializer programs&lt;br /&gt;
 [*]   Auditing interface support&lt;br /&gt;
 (1024)  Default maximal count for grant log&lt;br /&gt;
 (1024)  Default maximal count for reject log&lt;br /&gt;
 &amp;lt;M&amp;gt; SYAORAN (Tamper-Proof Device Filesystem) support&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
== Kernel 2.6.30-rc8 with TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Download 2.6.30-rc8 (or later) from http://www.kernel.org/ and extract it.&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select &amp;quot;TOMOYO Linux support&amp;quot; as shown below.&lt;br /&gt;
&lt;br /&gt;
 [ ] Enable access key retention support&lt;br /&gt;
 [*] Enable different security models&lt;br /&gt;
 -*- Enable the securityfs filesystem&lt;br /&gt;
 [ ] Socket and Networking Security Hooks&lt;br /&gt;
 -*- Security hooks for pathname based access control&lt;br /&gt;
 [ ] File POSIX Capabilities&lt;br /&gt;
 (0) Low address space to protect from user allocation&lt;br /&gt;
 [*] TOMOYO Linux Support&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO Tools =&lt;br /&gt;
&lt;br /&gt;
Download the ccs-tools-1.6.8-20090528.tar.gz file and put it somewhere.&lt;br /&gt;
&lt;br /&gt;
Change directory to ccstools/ .&lt;br /&gt;
&lt;br /&gt;
== Non-Multilib ==&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
== Multilib ==&lt;br /&gt;
&lt;br /&gt;
=== 32Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== N32 ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib32@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILDN32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== 64Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib64@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD64}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
= Configuring =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Run init_policy.sh to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
You can save audit logs if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/rc.d/init.d/ccs-auditd &amp;lt;&amp;lt; EOF&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 /usr/lib/ccs/ccs-auditd /dev/null /var/log/tomoyo/reject_log.txt&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/rc.d/init.d/ccs-auditd&lt;br /&gt;
&lt;br /&gt;
 for i in 2 3 4 5; do&lt;br /&gt;
 ln -sv ../init.d/ccs-auditd /etc/rc.d/rc${i}.d/S99ccs-auditd; done&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /var/log/tomoyo&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Run tomoyo_init_policy.sh to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/tomoyo_init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
= Booting TOMOYO Linux =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
You can use boot parameter CCS=&amp;lt;name&amp;gt; to load profile /etc/ccs/profile-&amp;lt;name&amp;gt;.conf .&lt;br /&gt;
Without CCS= parameter or &amp;lt;name&amp;gt; is &amp;quot;default&amp;quot;, /etc/ccs/profile.conf will be loaded.&lt;br /&gt;
You can use CCS=ask to let user select from available profiles in /etc/ccs/ at boot time&lt;br /&gt;
You can use CCS=disable to boot as usual Linux (i.e. without TOMOYO protection).&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Same as TOMOYO {{TOMOYO-Version}}, except that the policies are loaded from /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
But, be sure to add security=tomoyo parameter.&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default security=tomoyo&lt;br /&gt;
&lt;br /&gt;
= Configuring Policy to Guard Linux as Needed =&lt;br /&gt;
&lt;br /&gt;
Login to the system as root user, and run editpolicy included in TOMOYO Linux tools.&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/ccs-editpolicy&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
| /sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-init, tomoyo-init&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-editpolicy, ccs-setlevel, ccs-setprofile, ccs-ccstree, ccs-savepolicy, ccs-auditd, ccs-findtemp, ccs-sortpolicy, ccs-ld-watch, ccs-queryd, ccs-checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/lib/ccs&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|tomoyo_init_policy.sh, init_policy.sh, editpolicy, setlevel, setprofile, ccstree, savepolicy, makesyaoranconf, ccs-auditd, ccs-notifyd, findtemp, sortpolicy, ld-watch, ccs-queryd, checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Short Descriptions ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-editpolicy&lt;br /&gt;
|Edits the current policy in /proc/ccs/ or /sys/kernel/security/tomoyo/ directory&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setlevel&lt;br /&gt;
|Changes the current control level (i.e. writing to /proc/ccs/profile or /sys/kernel/security/tomoyo/profile ) and displays the new control level.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setprofile&lt;br /&gt;
|Assigns a profile to domains.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-ccstree&lt;br /&gt;
|Lists the domainnames of currently running processes belong to and the profile numbers the domains currently assigned to.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-savepolicy&lt;br /&gt;
|Saves the on-memory policy onto disk.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!makesyaoranconf&lt;br /&gt;
|Generates syaoran.conf, the configuration file for SYAORAN (the Tamper-Proof /dev filesystem). You can use SYAORAN filesystem if you want to run the system with read-only root fs or you want to prevent device files from tampering.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-auditd&lt;br /&gt;
|Reads from /proc/ccs/grant_log and /proc/ccs/reject_log and writes to the location given in the commandline parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-sortpolicy&lt;br /&gt;
|Remove duplicated entry from logs written by &amp;quot;ccs-auditd&amp;quot;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-findtemp&lt;br /&gt;
|Reads domain policy from standard input and checks the existence of pathnames, and dumps the nonexistent pathnames.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-ld-watch&lt;br /&gt;
|Appends shared libraries to exception policy automatically using &amp;quot;allow_read&amp;quot; directive when the location of shared libraries in /etc/ld.so.cache has changed.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-queryd&lt;br /&gt;
|Detects policy violation and displays the access request. You can tell the system whether the access request should be granted (or granted and policy should be appended to grant the access request) or rejected after you validate the access request.&lt;br /&gt;
&lt;br /&gt;
By running this program while updating packages, you can avoid errors due to insufficient permissions.&lt;br /&gt;
&lt;br /&gt;
Never grant access requests unconditionally. The cause of policy violation is not always updating packages, but may by malicious requests by attackers. If you grant access requests caused by malicious requests by attackers, the system gets intruded.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-checkpolicy&lt;br /&gt;
|Reads policy files from standard input and checks syntaxes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-init&lt;br /&gt;
|Loads policy files from /etc/ccs/ directory. Put this program as /sbin/ccs-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!tomoyo-init&lt;br /&gt;
|Loads policy files from /etc/tomoyo/ directory. Put this program as /sbin/tomoyo-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=Template:TOMOYO-Version&amp;diff=18376</id>
		<title>Template:TOMOYO-Version</title>
		<link rel="alternate" type="text/html" href="?title=Template:TOMOYO-Version&amp;diff=18376"/>
		<updated>2009-06-07T11:39:52Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;1.6.8-20090528&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=TOMOYO&amp;diff=18087</id>
		<title>TOMOYO</title>
		<link rel="alternate" type="text/html" href="?title=TOMOYO&amp;diff=18087"/>
		<updated>2009-04-12T01:58:42Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;text-align: left; background-color: AliceBlue;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Download Tools Source:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30298/ccs-tools-1.6.7-20090401.tar.gz&lt;br /&gt;
|-&lt;br /&gt;
!Download Kernel Patch:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30297/ccs-patch-{{TOMOYO-Version}}.tar.gz&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{Package-Introduction|The fundamental concept of TOMOYO Linux is &amp;quot;tracking process invocation history&amp;quot;. TOMOYO Linux splits domains using &amp;quot;process invocation history&amp;quot; and the process transits to a different domain whenever execution of a program (i.e. do_execve()) is requested. By transiting to a different domain whenever execution of a program is requested, each domain will have the minimal permissions that are essential for processes in that domain to do their roles. For more information, see http://tomoyo.sourceforge.jp/wiki-e/?WhatIs .|http://tomoyo.sourceforge.jp/}}&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* None (no more package required for LFS Linux.)&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO aware kernels =&lt;br /&gt;
&lt;br /&gt;
== Kernel 2.6.29.1 with TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Download the ccs-patch-{{TOMOYO-Version}}.tar.gz file and put it in kernel source directory, Patch the kernel source:&lt;br /&gt;
&lt;br /&gt;
 tar xzvf ccs-patch-{{TOMOYO-Version}}.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 patch -Np1 -i patches/ccs-patch-2.6.29.diff&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;File systems&amp;quot; screen and select as below.&lt;br /&gt;
&lt;br /&gt;
 [*] SAKURA (Domain-Free Mandatory Access Control) support&lt;br /&gt;
 [*] TOMOYO (Domain-Based Mandatory Access Control) support&lt;br /&gt;
 (2048) Default maximal count for learning mode&lt;br /&gt;
 (/sbin/modprobe /sbin/hotplug) Built-in domain initializer programs&lt;br /&gt;
 [*]   Auditing interface support&lt;br /&gt;
 (1024)  Default maximal count for grant log&lt;br /&gt;
 (1024)  Default maximal count for reject log&lt;br /&gt;
 &amp;lt;M&amp;gt; SYAORAN (Tamper-Proof Device Filesystem) support&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
== Kernel 2.6.30-rc1 with TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Download 2.6.30-rc1 (or later) from http://www.kernel.org/ and extract it.&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;make menuconfig&amp;quot; and go to &amp;quot;Security options&amp;quot; screen and select &amp;quot;TOMOYO Linux support&amp;quot; as shown below.&lt;br /&gt;
&lt;br /&gt;
 [ ] Enable access key retention support&lt;br /&gt;
 [*] Enable different security models&lt;br /&gt;
 -*- Enable the securityfs filesystem&lt;br /&gt;
 [ ] Socket and Networking Security Hooks&lt;br /&gt;
 -*- Security hooks for pathname based access control&lt;br /&gt;
 [ ] File POSIX Capabilities&lt;br /&gt;
 (0) Low address space to protect from user allocation&lt;br /&gt;
 [*] TOMOYO Linux Support&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.&lt;br /&gt;
&lt;br /&gt;
= Building TOMOYO Tools =&lt;br /&gt;
&lt;br /&gt;
Download the ccs-tools-1.6.7-20090401.tar.gz file and put it somewhere.&lt;br /&gt;
&lt;br /&gt;
Change directory to ccstools/ .&lt;br /&gt;
&lt;br /&gt;
== Non-Multilib ==&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
== Multilib ==&lt;br /&gt;
&lt;br /&gt;
=== 32Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== N32 ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib32@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILDN32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== 64Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib64@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD64}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
= Configuring =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Run init_policy.sh to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
You can save audit logs if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/rc.d/init.d/ccs-auditd &amp;lt;&amp;lt; EOF&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 /usr/lib/ccs/ccs-auditd /dev/null /var/log/tomoyo/reject_log.txt&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/rc.d/init.d/ccs-auditd&lt;br /&gt;
&lt;br /&gt;
 for i in 2 3 4 5; do&lt;br /&gt;
 ln -sv ../init.d/ccs-auditd /etc/rc.d/rc${i}.d/S99ccs-auditd; done&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /var/log/tomoyo&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/ccs/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Run tomoyo_init_policy.sh to perform initial configuration.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/tomoyo_init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
You can start your system from Learning Mode if you do below steps.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
= Booting TOMOYO Linux =&lt;br /&gt;
&lt;br /&gt;
== TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
You can use boot parameter CCS=&amp;lt;name&amp;gt; to load profile /etc/ccs/profile-&amp;lt;name&amp;gt;.conf .&lt;br /&gt;
Without CCS= parameter or &amp;lt;name&amp;gt; is &amp;quot;default&amp;quot;, /etc/ccs/profile.conf will be loaded.&lt;br /&gt;
You can use CCS=ask to let user select from available profiles in /etc/ccs/ at boot time&lt;br /&gt;
You can use CCS=disable to boot as usual Linux (i.e. without TOMOYO protection).&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default&lt;br /&gt;
&lt;br /&gt;
== TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Same as TOMOYO {{TOMOYO-Version}}, except that the policies are loaded from /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
But, be sure to add security=tomoyo parameter.&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default security=tomoyo&lt;br /&gt;
&lt;br /&gt;
= Configuring Policy to Guard Linux as Needed =&lt;br /&gt;
&lt;br /&gt;
Login to the system as root user, and run editpolicy included in TOMOYO Linux tools.&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/ccs-editpolicy&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
| /sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-init, tomoyo-init&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-editpolicy, ccs-setlevel, ccs-setprofile, ccs-ccstree, ccs-savepolicy, ccs-auditd, ccs-findtemp, ccs-sortpolicy, ccs-ld-watch, ccs-queryd, ccs-checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/lib/ccs&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|tomoyo_init_policy.sh, init_policy.sh, editpolicy, setlevel, setprofile, ccstree, savepolicy, makesyaoranconf, ccs-auditd, ccs-notifyd, findtemp, sortpolicy, ld-watch, ccs-queryd, checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Short Descriptions ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-editpolicy&lt;br /&gt;
|Edits the current policy in /proc/ccs/ or /sys/kernel/security/tomoyo/ directory&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setlevel&lt;br /&gt;
|Changes the current control level (i.e. writing to /proc/ccs/profile or /sys/kernel/security/tomoyo/profile ) and displays the new control level.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setprofile&lt;br /&gt;
|Assigns a profile to domains.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-ccstree&lt;br /&gt;
|Lists the domainnames of currently running processes belong to and the profile numbers the domains currently assigned to.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-savepolicy&lt;br /&gt;
|Saves the on-memory policy onto disk.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!makesyaoranconf&lt;br /&gt;
|Generates syaoran.conf, the configuration file for SYAORAN (the Tamper-Proof /dev filesystem). You can use SYAORAN filesystem if you want to run the system with read-only root fs or you want to prevent device files from tampering.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-auditd&lt;br /&gt;
|Reads from /proc/ccs/grant_log and /proc/ccs/reject_log and writes to the location given in the commandline parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-sortpolicy&lt;br /&gt;
|Remove duplicated entry from logs written by &amp;quot;ccs-auditd&amp;quot;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-findtemp&lt;br /&gt;
|Reads domain policy from standard input and checks the existence of pathnames, and dumps the nonexistent pathnames.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-ld-watch&lt;br /&gt;
|Appends shared libraries to exception policy automatically using &amp;quot;allow_read&amp;quot; directive when the location of shared libraries in /etc/ld.so.cache has changed.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-queryd&lt;br /&gt;
|Detects policy violation and displays the access request. You can tell the system whether the access request should be granted (or granted and policy should be appended to grant the access request) or rejected after you validate the access request.&lt;br /&gt;
&lt;br /&gt;
By running this program while updating packages, you can avoid errors due to insufficient permissions.&lt;br /&gt;
&lt;br /&gt;
Never grant access requests unconditionally. The cause of policy violation is not always updating packages, but may by malicious requests by attackers. If you grant access requests caused by malicious requests by attackers, the system gets intruded.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-checkpolicy&lt;br /&gt;
|Reads policy files from standard input and checks syntaxes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-init&lt;br /&gt;
|Loads policy files from /etc/ccs/ directory. Put this program as /sbin/ccs-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!tomoyo-init&lt;br /&gt;
|Loads policy files from /etc/tomoyo/ directory. Put this program as /sbin/tomoyo-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=TOMOYO&amp;diff=18086</id>
		<title>TOMOYO</title>
		<link rel="alternate" type="text/html" href="?title=TOMOYO&amp;diff=18086"/>
		<updated>2009-04-12T01:25:41Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: Update for TOMOYO 1.6.7 and TOMOYO 2.2.0&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;text-align: left; background-color: AliceBlue;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Download Tools Source:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30298/ccs-tools-1.6.7-20090401.tar.gz&lt;br /&gt;
|-&lt;br /&gt;
!Download Kernel Patch:&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30297/ccs-patch-{{TOMOYO-Version}}.tar.gz&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{Package-Introduction|The fundamental concept of TOMOYO Linux is &amp;quot;tracking process invocation history&amp;quot;.  TOMOYO Linux splits domains using &amp;quot;process invocation history&amp;quot; and the process transits to a different domain whenever execution of a program (i.e. do_execve()) is requested. By transiting to a different domain whenever execution of a program is requested, each domain will  have the minimal permissions that are essential for processes in that domain to do their  roles. For more information, see http://tomoyo.sourceforge.jp/wiki-e/?WhatIs.|http://tomoyo.sourceforge.jp/en/2.2.x/}}&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* None   (no more package required for LFS Linux.)&lt;br /&gt;
&lt;br /&gt;
== Rebuild Kernel ==&lt;br /&gt;
&lt;br /&gt;
=== Version 2.6.29.1 Kernel and TOMOYO {{TOMOYO-Version}} ===&lt;br /&gt;
&lt;br /&gt;
Download the ccs-patch-{{TOMOYO-Version}}.tar.gz file and put it in kernel source directory, Patch the kernel source:&lt;br /&gt;
&lt;br /&gt;
 tar xzvf ccs-patch-{{TOMOYO-Version}}.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 patch -Np1 -i patches/ccs-patch-2.6.29.diff&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.  Ensure you enable the TOMOYO features.&lt;br /&gt;
&lt;br /&gt;
=== Version 2.6.30-rc1 Kernel and TOMOYO 2.2 ===&lt;br /&gt;
&lt;br /&gt;
Download 2.6.30-rc1 or later and extract it.&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.  Ensure you enable the TOMOYO features.  Go to &amp;quot;Security options&amp;quot; screen and select &amp;quot;TOMOYO Linux support&amp;quot; as shown below.&lt;br /&gt;
&lt;br /&gt;
 [ ] Enable access key retention support&lt;br /&gt;
 [*] Enable different security models&lt;br /&gt;
 -*- Enable the securityfs filesystem&lt;br /&gt;
 [ ] Socket and Networking Security Hooks&lt;br /&gt;
 -*- Security hooks for pathname based access control&lt;br /&gt;
 [ ] File POSIX Capabilities&lt;br /&gt;
 (0) Low address space to protect from user allocation&lt;br /&gt;
 [*] TOMOYO Linux Support&lt;br /&gt;
&lt;br /&gt;
= Build TOMOYO Tools =&lt;br /&gt;
&lt;br /&gt;
Download the ccs-tools-1.6.7-20090401.tar.gz file and put it somewhere.&lt;br /&gt;
&lt;br /&gt;
Change directory to ccstools/ .&lt;br /&gt;
&lt;br /&gt;
== Non-Multilib ==&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
== Multilib ==&lt;br /&gt;
&lt;br /&gt;
=== 32Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== N32 ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib32@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILDN32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== 64Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib64@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD64}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
= Configuring =&lt;br /&gt;
&lt;br /&gt;
== Configuring TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Run init_policy.sh to perform initial configuration for ccs patch&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
== Configuring TOMOYO 2.2.0 ==&lt;br /&gt;
&lt;br /&gt;
Run tomoyo_init_policy.sh to perform initial configuration for TOMOYO 2.x.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/tomoyo_init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
== Configuring TOMOYO Audit Logging ==&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/rc.d/init.d/ccs-auditd &amp;lt;&amp;lt; EOF&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 /usr/lib/ccs/ccs-auditd /dev/null /var/log/tomoyo/reject_log.txt&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/rc.d/init.d/ccs-auditd&lt;br /&gt;
&lt;br /&gt;
 for i in 2 3 4 5; do&lt;br /&gt;
 ln -sv ../init.d/ccs-auditd /etc/rc.d/rc${i}.d/S99ccs-auditd; done&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /var/log/tomoyo&lt;br /&gt;
&lt;br /&gt;
== Configuring TOMOYO to Begin from Learning Mode ==&lt;br /&gt;
&lt;br /&gt;
Configure TOMOYO Linux to learn system behavior.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
= Boot TOMOYO Linux =&lt;br /&gt;
&lt;br /&gt;
boot parameter CCS=&amp;lt;name&amp;gt; can be used to load profile /etc/ccs/profile-&amp;lt;name&amp;gt;.conf; without CCS being set or CCS=default, /etc/ccs/profile.conf will be loaded; with CCS=ask to let user select from available policies in /etc/ccs/ at boot time; with CCS=disable to boot as usual Linux without TOMOYO protection. &lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default&lt;br /&gt;
&lt;br /&gt;
Add boot parameter security=tomoyo to enable TOMOYO Linux 2.2.0, as shown below.&lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default security=tomoyo&lt;br /&gt;
&lt;br /&gt;
= Configuring Policy to Guard Linux as Needed =&lt;br /&gt;
&lt;br /&gt;
Login to the system as root user, and run editpolicy included in TOMOYO Linux tools.&lt;br /&gt;
&lt;br /&gt;
 /usr/sbin/ccs-editpolicy&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
| /sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-init, tomoyo-init&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/sbin&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|ccs-editpolicy, ccs-setlevel, ccs-setprofile, ccs-ccstree, ccs-savepolicy, ccs-auditd, ccs-findtemp, ccs-sortpolicy, ccs-ld-watch, ccs-queryd, ccs-checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/lib/ccs&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|tomoyo_init_policy.sh, init_policy.sh, editpolicy, setlevel, setprofile, ccstree, savepolicy, makesyaoranconf, ccs-auditd, ccs-notifyd, findtemp, sortpolicy, ld-watch, ccs-queryd, checkpolicy&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Short Descriptions ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-editpolicy&lt;br /&gt;
|Edits the current policy in /proc/ccs/ or /sys/kernel/security/tomoyo/ directory&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setlevel&lt;br /&gt;
|Changes the current control level (i.e. writing to /proc/ccs/profile or /sys/kernel/security/tomoyo/profile ) and displays the new control level.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-setprofile&lt;br /&gt;
|Assigns a profile to domains.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-ccstree&lt;br /&gt;
|Lists the domainnames of currently running processes belong to and the profile numbers the domains currently assigned to.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-savepolicy&lt;br /&gt;
|Saves the on-memory policy onto disk.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!makesyaoranconf&lt;br /&gt;
|Generates syaoran.conf, the configuration file for SYAORAN (the Tamper-Proof /dev filesystem). You can use SYAORAN filesystem if you want to run the system with read-only root fs or you want to prevent device files from tampering.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-auditd&lt;br /&gt;
|Reads from /proc/ccs/grant_log and /proc/ccs/reject_log and writes to the location given in the commandline parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-sortpolicy&lt;br /&gt;
|Remove duplicated entry from logs written by &amp;quot;ccs-auditd&amp;quot;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-findtemp&lt;br /&gt;
|Reads domain policy from standard input and checks the existence of pathnames, and dumps the nonexistent pathnames.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-ld-watch&lt;br /&gt;
|Appends shared libraries to exception policy automatically using &amp;quot;allow_read&amp;quot; directive when the location of shared libraries in /etc/ld.so.cache has changed.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-queryd&lt;br /&gt;
|Detects policy violation and displays the access request. You can tell the system whether the access request should be granted (or granted and policy should be appended to grant the access request) or rejected after you validate the access request.&lt;br /&gt;
&lt;br /&gt;
By running this program while updating packages, you can avoid errors due to insufficient permissions.&lt;br /&gt;
&lt;br /&gt;
Never grant access requests unconditionally. The cause of policy violation is not always updating packages, but may by malicious requests by attackers. If you grant access requests caused by malicious requests by attackers, the system gets intruded.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-checkpolicy&lt;br /&gt;
|Reads policy files from standard input and checks syntaxes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-init&lt;br /&gt;
|Loads policy files from /etc/ccs/ directory. Put this program as /sbin/ccs-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!tomoyo-init&lt;br /&gt;
|Loads policy files from /etc/tomoyo/ directory. Put this program as /sbin/tomoyo-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=Template:TOMOYO-Version&amp;diff=18085</id>
		<title>Template:TOMOYO-Version</title>
		<link rel="alternate" type="text/html" href="?title=Template:TOMOYO-Version&amp;diff=18085"/>
		<updated>2009-04-12T01:04:15Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;1.6.7-20090410&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=TOMOYO&amp;diff=16769</id>
		<title>TOMOYO</title>
		<link rel="alternate" type="text/html" href="?title=TOMOYO&amp;diff=16769"/>
		<updated>2009-02-04T04:48:43Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;text-align: left; background-color: AliceBlue;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Download Source&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30298/ccs-tools-{{TOMOYO-Version}}.tar.gz&lt;br /&gt;
|-&lt;br /&gt;
!Download Patch (TOMOYO {{TOMOYO-Version}} for 2.6.x Kernel):&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30297/ccs-patch-{{TOMOYO-Version}}.tar.gz&lt;br /&gt;
|-&lt;br /&gt;
!Download Patch (TOMOYO 2.1 for 2.6.23 series Kernel):&lt;br /&gt;
|http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/tags/lkml/4/patches.tar.gz?root=tomoyo&amp;amp;view=tar&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{Package-Introduction|The fundamental concept of TOMOYO Linux is &amp;quot;tracking process invocation history&amp;quot;.  TOMOYO Linux splits domains using &amp;quot;process invocation history&amp;quot; and the process transits to a different domain whenever execution of a program (i.e. do_execve()) is requested. By transiting to a different domain whenever execution of a program is requested, each domain will  have the minimal permissions that are essential for processes in that domain to do their  roles. For more information, see http://tomoyo.sourceforge.jp/wiki-e/?WhatIs.|http://tomoyo.sourceforge.jp/en/2.1.x/}}&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* None   no more package required for LFS Linux.&lt;br /&gt;
&lt;br /&gt;
== Rebuild Kernel ==&lt;br /&gt;
&lt;br /&gt;
=== Version 2.6.27.14 Kernel and TOMOYO {{TOMOYO-Version}} ===&lt;br /&gt;
&lt;br /&gt;
download the ccs-patch-{{TOMOYO-Version}}.tar.gz file and put it in kernel source directory, Patch the kernel source:&lt;br /&gt;
&lt;br /&gt;
 tar xvf ccs-patch-{{TOMOYO-Version}}.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 patch -Np1 -i patches/ccs-patch-2.6.27.diff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.  Ensure you enable the TOMOYO features.&lt;br /&gt;
&lt;br /&gt;
=== Version 2.6.23 Kernel and TOMOYO 2.x ===&lt;br /&gt;
&lt;br /&gt;
Extract the TOMOYO 2.x patches to the kernel source directory.&lt;br /&gt;
&lt;br /&gt;
 for i in `cat ../patches/series`; do patch -Np1 &amp;lt; ../patches/$i; done&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.  Ensure you enable the TOMOYO features.  Go to &amp;quot;Security options&amp;quot; screen and unselect &amp;quot;Default Linux Capabilities&amp;quot;, &amp;quot;Root Plug Support&amp;quot;, &amp;quot;NSA SELinux Support&amp;quot; and select &amp;quot;TOMOYO Linux support&amp;quot; as shown below.&lt;br /&gt;
&lt;br /&gt;
 [*] Enable different security models&lt;br /&gt;
 &amp;lt; &amp;gt;   Default Linux Capabilities&lt;br /&gt;
 &amp;lt; &amp;gt;   Root Plug Support&lt;br /&gt;
 [ ] NSA SELinux Support&lt;br /&gt;
 [*] TOMOYO Linux support&lt;br /&gt;
&lt;br /&gt;
= Build TOMOYO Tools =&lt;br /&gt;
&lt;br /&gt;
Download the ccs-tools-{{TOMOYO-Version}}.tar.gz file and put it somewhere.&lt;br /&gt;
&lt;br /&gt;
Change directory to ccstools/ .&lt;br /&gt;
&lt;br /&gt;
== Non-Multilib ==&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
== Multilib ==&lt;br /&gt;
&lt;br /&gt;
=== 32Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== N32 ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib32@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILDN32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== 64Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib64@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD64}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
= Configuring =&lt;br /&gt;
&lt;br /&gt;
== Configuring TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Run init_policy.sh to perform initial configuration for ccs patch&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
== Configuring TOMOYO 2.x ==&lt;br /&gt;
&lt;br /&gt;
Run tomoyo_init_policy.sh to perform initial configuration for TOMOYO 2.x.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/tomoyo_init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
== Configuring TOMOYO Audit Logging ==&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/rc.d/init.d/ccs-auditd &amp;lt;&amp;lt; EOF&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 /usr/lib/ccs/ccs-auditd /dev/null /var/log/tomoyo/reject_log.txt&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/rc.d/init.d/ccs-auditd&lt;br /&gt;
&lt;br /&gt;
 for i in 2 3 4 5; do&lt;br /&gt;
 ln -sv ../init.d/ccs-auditd /etc/rc.d/rc${i}.d/S99ccs-auditd; done&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /var/log/tomoyo&lt;br /&gt;
&lt;br /&gt;
== Configuring TOMOYO to Begin from Learning Mode ==&lt;br /&gt;
&lt;br /&gt;
Configure TOMOYO Linux to learn system behavior.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
= Boot TOMOYO Linux =&lt;br /&gt;
&lt;br /&gt;
boot parameter CCS=&amp;lt;name&amp;gt; can be used to load profile /etc/ccs/profile-&amp;lt;name&amp;gt;.conf; without CCS being set or CCS=default, /etc/ccs/profile.conf will be loaded; with CCS=ask to let user select from available policies in /etc/ccs/ at boot time; with CCS=disable to boot as usual Linux without TOMOYO protection. &lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default&lt;br /&gt;
&lt;br /&gt;
= Configuring Policy to Guard Linux as Needed =&lt;br /&gt;
&lt;br /&gt;
Login to the system as root user, and run editpolicy included in TOMOYO Linux tools.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/editpolicy&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/lib/ccs&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|tomoyo_init_policy.sh, init_policy.sh, editpolicy,  editpolicy_offline, setlevel, setprofile, ccstree, savepolicy, makesyaoranconf, ccs-auditd, findtemp, sortpolicy, ld-watch, ccs-queryd, checkpolicy,  /sbin/{ccs,tomoyo}-init&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Short Descriptions ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!editpolicy&lt;br /&gt;
|Edits the current policy in /proc/ccs/ directory&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!editpolicy_offline&lt;br /&gt;
|Edits the policy in /etc/ccs/ directory.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!setlevel&lt;br /&gt;
|Changes the current control level (i.e. writing to /proc/ccs/profile ) and displays the new control level.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!setprofile&lt;br /&gt;
|Assigns a profile to domains.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccstree&lt;br /&gt;
|Lists the domainnames of currently running processes belong to and the profile numbers the domains currently assigned to.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!savepolicy&lt;br /&gt;
|Saves the on-memory policy onto disk.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!makesyaoranconf&lt;br /&gt;
|Generates syaoran.conf, the configuration file for SYAORAN (the Tamper-Proof /dev filesystem). You can use SYAORAN filesystem if you want to run the system with read-only root fs or you want to prevent device files from tampering.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-auditd&lt;br /&gt;
|Reads from /proc/ccs/grant_log and /proc/ccs/reject_log and writes to the location given in the commandline parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!sortpolicy&lt;br /&gt;
|Remove duplicated entry from logs written by &amp;quot;ccs-auditd&amp;quot;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!findtemp&lt;br /&gt;
|Reads domain policy from standard input and checks the existence of pathnames, and dumps the nonexistent pathnames.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ld-watch&lt;br /&gt;
|Appends shared libraries to exception policy automatically using &amp;quot;allow_read&amp;quot; directive when the location of shared libraries in /etc/ld.so.cache has changed.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-queryd&lt;br /&gt;
|Detects policy violation and displays the access request. You can tell the system whether the access request should be granted (or granted and policy should be appended to grant the access request) or rejected after you validate the access request.&lt;br /&gt;
&lt;br /&gt;
By running this program while updating packages, you can avoid errors due to insufficient permissions.&lt;br /&gt;
&lt;br /&gt;
Never grant access requests unconditionally. The cause of policy violation is not always updating packages, but may by malicious requests by attackers. If you grant access requests caused by malicious requests by attackers, the system gets intruded.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!checkpolicy&lt;br /&gt;
|Reads policy files from standard input and checks syntaxes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-init&lt;br /&gt;
|Loads policy files from /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
Put this program as /sbin/ccs-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=TOMOYO&amp;diff=16768</id>
		<title>TOMOYO</title>
		<link rel="alternate" type="text/html" href="?title=TOMOYO&amp;diff=16768"/>
		<updated>2009-02-04T04:46:59Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;text-align: left; background-color: AliceBlue;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Download Source&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30298/ccs-tools-{{TOMOYO-Version}}.tar.gz&lt;br /&gt;
|-&lt;br /&gt;
!Download Patch (TOMOYO {{TOMOYO-Version}} for 2.6.x Kernel):&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30297/ccs-patch-{{TOMOYO-Version}}.tar.gz&lt;br /&gt;
|-&lt;br /&gt;
!Download Patch (TOMOYO 2.1 for 2.6.23 series Kernel):&lt;br /&gt;
|http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/tags/lkml/4/patches.tar.gz?root=tomoyo&amp;amp;view=tar&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{Package-Introduction|The fundamental concept of TOMOYO Linux is &amp;quot;tracking process invocation history&amp;quot;.  TOMOYO Linux splits domains using &amp;quot;process invocation history&amp;quot; and the process transits to a different domain whenever execution of a program (i.e. do_execve()) is requested. By transiting to a different domain whenever execution of a program is requested, each domain will  have the minimal permissions that are essential for processes in that domain to do their  roles. For more information, see http://tomoyo.sourceforge.jp/wiki-e/?WhatIs.|http://tomoyo.sourceforge.jp/en/2.1.x/}}&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* None   no more package required for LFS Linux.&lt;br /&gt;
&lt;br /&gt;
== Rebuild Kernel ==&lt;br /&gt;
&lt;br /&gt;
=== Version 2.6.27.14 Kernel and TOMOYO {{TOMOYO-Version}} ===&lt;br /&gt;
&lt;br /&gt;
download the ccs-patch-{{TOMOYO-Version}}.tar.gz file and put it in kernel source directory, Patch the kernel source:&lt;br /&gt;
&lt;br /&gt;
 tar xvf ccs-patch-{{TOMOYO-Version}}.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 patch -Np1 -i patches/ccs-patch-2.6.27.diff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.  Ensure you enable the TOMOYO features.&lt;br /&gt;
&lt;br /&gt;
=== Version 2.6.23 Kernel and TOMOYO 2.x ===&lt;br /&gt;
&lt;br /&gt;
Extract the TOMOYO 2.x patches to the kernel source directory.&lt;br /&gt;
&lt;br /&gt;
 for i in `cat ../patches/series`; do patch -Np1 &amp;lt; ../patches/$i; done&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.  Ensure you enable the TOMOYO features.  Go to &amp;quot;Security options&amp;quot; screen and unselect &amp;quot;Default Linux Capabilities&amp;quot;, &amp;quot;Root Plug Support&amp;quot;, &amp;quot;NSA SELinux Support&amp;quot; and select &amp;quot;TOMOYO Linux support&amp;quot; as shown below.&lt;br /&gt;
&lt;br /&gt;
 [*] Enable different security models&lt;br /&gt;
 &amp;lt; &amp;gt;   Default Linux Capabilities&lt;br /&gt;
 &amp;lt; &amp;gt;   Root Plug Support&lt;br /&gt;
 [ ] NSA SELinux Support&lt;br /&gt;
 [*] TOMOYO Linux support&lt;br /&gt;
&lt;br /&gt;
= Build TOMOYO Tools =&lt;br /&gt;
&lt;br /&gt;
Download the ccs-patch-{{TOMOYO-Version}}.tar.gz file and put it somewhere.&lt;br /&gt;
&lt;br /&gt;
Change directory to ccstools/ .&lt;br /&gt;
&lt;br /&gt;
== Non-Multilib ==&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
== Multilib ==&lt;br /&gt;
&lt;br /&gt;
=== 32Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== N32 ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib32@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILDN32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== 64Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib64@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD64}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
= Configuring =&lt;br /&gt;
&lt;br /&gt;
== Configuring TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Run init_policy.sh to perform initial configuration for ccs patch&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
== Configuring TOMOYO 2.x ==&lt;br /&gt;
&lt;br /&gt;
Run tomoyo_init_policy.sh to perform initial configuration for TOMOYO 2.x.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/tomoyo_init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
== Configuring TOMOYO Audit Logging ==&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/rc.d/init.d/ccs-auditd &amp;lt;&amp;lt; EOF&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 /usr/lib/ccs/ccs-auditd /dev/null /var/log/tomoyo/reject_log.txt&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/rc.d/init.d/ccs-auditd&lt;br /&gt;
&lt;br /&gt;
 for i in 2 3 4 5; do&lt;br /&gt;
 ln -sv ../init.d/ccs-auditd /etc/rc.d/rc${i}.d/S99ccs-auditd; done&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /var/log/tomoyo&lt;br /&gt;
&lt;br /&gt;
== Configuring TOMOYO to Begin from Learning Mode ==&lt;br /&gt;
&lt;br /&gt;
Configure TOMOYO Linux to learn system behavior.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
= Boot TOMOYO Linux =&lt;br /&gt;
&lt;br /&gt;
boot parameter CCS=&amp;lt;name&amp;gt; can be used to load profile /etc/ccs/profile-&amp;lt;name&amp;gt;.conf; without CCS being set or CCS=default, /etc/ccs/profile.conf will be loaded; with CCS=ask to let user select from available policies in /etc/ccs/ at boot time; with CCS=disable to boot as usual Linux without TOMOYO protection. &lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default&lt;br /&gt;
&lt;br /&gt;
= Configuring Policy to Guard Linux as Needed =&lt;br /&gt;
&lt;br /&gt;
Login to the system as root user, and run editpolicy included in TOMOYO Linux tools.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/editpolicy&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/lib/ccs&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|tomoyo_init_policy.sh, init_policy.sh, editpolicy,  editpolicy_offline, setlevel, setprofile, ccstree, savepolicy, makesyaoranconf, ccs-auditd, findtemp, sortpolicy, ld-watch, ccs-queryd, checkpolicy,  /sbin/{ccs,tomoyo}-init&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Short Descriptions ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!editpolicy&lt;br /&gt;
|Edits the current policy in /proc/ccs/ directory&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!editpolicy_offline&lt;br /&gt;
|Edits the policy in /etc/ccs/ directory.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!setlevel&lt;br /&gt;
|Changes the current control level (i.e. writing to /proc/ccs/profile ) and displays the new control level.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!setprofile&lt;br /&gt;
|Assigns a profile to domains.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccstree&lt;br /&gt;
|Lists the domainnames of currently running processes belong to and the profile numbers the domains currently assigned to.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!savepolicy&lt;br /&gt;
|Saves the on-memory policy onto disk.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!makesyaoranconf&lt;br /&gt;
|Generates syaoran.conf, the configuration file for SYAORAN (the Tamper-Proof /dev filesystem). You can use SYAORAN filesystem if you want to run the system with read-only root fs or you want to prevent device files from tampering.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-auditd&lt;br /&gt;
|Reads from /proc/ccs/grant_log and /proc/ccs/reject_log and writes to the location given in the commandline parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!sortpolicy&lt;br /&gt;
|Remove duplicated entry from logs written by &amp;quot;ccs-auditd&amp;quot;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!findtemp&lt;br /&gt;
|Reads domain policy from standard input and checks the existence of pathnames, and dumps the nonexistent pathnames.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ld-watch&lt;br /&gt;
|Appends shared libraries to exception policy automatically using &amp;quot;allow_read&amp;quot; directive when the location of shared libraries in /etc/ld.so.cache has changed.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-queryd&lt;br /&gt;
|Detects policy violation and displays the access request. You can tell the system whether the access request should be granted (or granted and policy should be appended to grant the access request) or rejected after you validate the access request.&lt;br /&gt;
&lt;br /&gt;
By running this program while updating packages, you can avoid errors due to insufficient permissions.&lt;br /&gt;
&lt;br /&gt;
Never grant access requests unconditionally. The cause of policy violation is not always updating packages, but may by malicious requests by attackers. If you grant access requests caused by malicious requests by attackers, the system gets intruded.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!checkpolicy&lt;br /&gt;
|Reads policy files from standard input and checks syntaxes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-init&lt;br /&gt;
|Loads policy files from /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
Put this program as /sbin/ccs-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=Template:TOMOYO-Version&amp;diff=16767</id>
		<title>Template:TOMOYO-Version</title>
		<link rel="alternate" type="text/html" href="?title=Template:TOMOYO-Version&amp;diff=16767"/>
		<updated>2009-02-04T04:44:41Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;1.6.6-20090202&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=TOMOYO&amp;diff=16264</id>
		<title>TOMOYO</title>
		<link rel="alternate" type="text/html" href="?title=TOMOYO&amp;diff=16264"/>
		<updated>2008-12-11T01:17:25Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: Updated to 1.6.5&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;text-align: left; background-color: AliceBlue;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Download Source&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30298/ccs-tools-1.6.5-20081111.tar.gz&lt;br /&gt;
|-&lt;br /&gt;
!Download Patch (TOMOYO {{TOMOYO-Version}} for 2.6.x Kernel):&lt;br /&gt;
|http://jaist.dl.sourceforge.jp/tomoyo/30297/ccs-patch-{{TOMOYO-Version}}.tar.gz&lt;br /&gt;
|-&lt;br /&gt;
!Download Patch (TOMOYO 2.1 for 2.6.23 series Kernel):&lt;br /&gt;
|http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi/tags/lkml/4/patches.tar.gz?root=tomoyo&amp;amp;view=tar&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{Package-Introduction|The fundamental concept of TOMOYO Linux is &amp;quot;tracking process invocation history&amp;quot;.  TOMOYO Linux splits domains using &amp;quot;process invocation history&amp;quot; and the process transits to a different domain whenever execution of a program (i.e. do_execve()) is requested. By transiting to a different domain whenever execution of a program is requested, each domain will  have the minimal permissions that are essential for processes in that domain to do their  roles. For more information, see http://tomoyo.sourceforge.jp/wiki-e/?WhatIs.|http://tomoyo.sourceforge.jp/en/2.1.x/}}&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* None   no more package required for LFS Linux.&lt;br /&gt;
&lt;br /&gt;
== Rebuild Kernel ==&lt;br /&gt;
&lt;br /&gt;
=== Version 2.6.27.8 Kernel and TOMOYO {{TOMOYO-Version}} ===&lt;br /&gt;
&lt;br /&gt;
download the ccs-patch-{{TOMOYO-Version}}.tar.gz file and put it in kernel source directory, Patch the kernel source:&lt;br /&gt;
&lt;br /&gt;
 tar xvf ccs-patch-{{TOMOYO-Version}}.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 patch -Np1 -i patches/ccs-patch-2.6.27.diff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.  Ensure you enable the TOMOYO features.&lt;br /&gt;
&lt;br /&gt;
=== Version 2.6.23 Kernel and TOMOYO 2.x ===&lt;br /&gt;
&lt;br /&gt;
Extract the TOMOYO 2.x patches to the kernel source directory.&lt;br /&gt;
&lt;br /&gt;
 for i in `cat ../patches/series`; do patch -Np1 &amp;lt; ../patches/$i; done&lt;br /&gt;
&lt;br /&gt;
Compile and install a new TOMOYO aware kernel.  Ensure you enable the TOMOYO features.  Go to &amp;quot;Security options&amp;quot; screen and unselect &amp;quot;Default Linux Capabilities&amp;quot;, &amp;quot;Root Plug Support&amp;quot;, &amp;quot;NSA SELinux Support&amp;quot; and select &amp;quot;TOMOYO Linux support&amp;quot; as shown below.&lt;br /&gt;
&lt;br /&gt;
 [*] Enable different security models&lt;br /&gt;
 &amp;lt; &amp;gt;   Default Linux Capabilities&lt;br /&gt;
 &amp;lt; &amp;gt;   Root Plug Support&lt;br /&gt;
 [ ] NSA SELinux Support&lt;br /&gt;
 [*] TOMOYO Linux support&lt;br /&gt;
&lt;br /&gt;
= Build TOMOYO Tools =&lt;br /&gt;
&lt;br /&gt;
Download the ccs-patch-1.6.5-20081111.tar.gz file and put it somewhere.&lt;br /&gt;
&lt;br /&gt;
Change directory to ccstools/ .&lt;br /&gt;
&lt;br /&gt;
== Non-Multilib ==&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
== Multilib ==&lt;br /&gt;
&lt;br /&gt;
=== 32Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== N32 ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib32@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILDN32}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
=== 64Bit ===&lt;br /&gt;
&lt;br /&gt;
Compile the package:&lt;br /&gt;
&lt;br /&gt;
 sed -i &#039;s@/usr/lib@/usr/lib64@g&#039; Makefile &amp;amp;&amp;amp;&lt;br /&gt;
 make CC=&amp;quot;gcc ${BUILD64}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install the package:&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
= Configuring =&lt;br /&gt;
&lt;br /&gt;
== Configuring TOMOYO {{TOMOYO-Version}} ==&lt;br /&gt;
&lt;br /&gt;
Run init_policy.sh to perform initial configuration for ccs patch&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
== Configuring TOMOYO 2.x ==&lt;br /&gt;
&lt;br /&gt;
Run tomoyo_init_policy.sh to perform initial configuration for TOMOYO 2.x.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/tomoyo_init_policy.sh&lt;br /&gt;
&lt;br /&gt;
You will get initial configuration files in /etc/tomoyo/ directory.&lt;br /&gt;
&lt;br /&gt;
== Configuring TOMOYO Audit Logging ==&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; /etc/rc.d/init.d/ccs-auditd &amp;lt;&amp;lt; EOF&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 /usr/lib/ccs/ccs-auditd /dev/null /var/log/tomoyo/reject_log.txt&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
 chmod +x /etc/rc.d/init.d/ccs-auditd&lt;br /&gt;
&lt;br /&gt;
 for i in 2 3 4 5; do&lt;br /&gt;
 ln -sv ../init.d/ccs-auditd /etc/rc.d/rc${i}.d/S99ccs-auditd; done&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /var/log/tomoyo&lt;br /&gt;
&lt;br /&gt;
== Configuring TOMOYO to Begin from Learning Mode ==&lt;br /&gt;
&lt;br /&gt;
Configure TOMOYO Linux to learn system behavior.&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;kernel&amp;gt;&#039; &amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
 echo &#039;use_profile 1&#039; &amp;gt;&amp;gt; /etc/tomoyo/domain_policy.conf&lt;br /&gt;
&lt;br /&gt;
= Boot TOMOYO Linux =&lt;br /&gt;
&lt;br /&gt;
boot parameter CCS=&amp;lt;name&amp;gt; can be used to load profile /etc/ccs/profile-&amp;lt;name&amp;gt;.conf; without CCS being set or CCS=default, /etc/ccs/profile.conf will be loaded; with CCS=ask to let user select from available policies in /etc/ccs/ at boot time; with CCS=disable to boot as usual Linux without TOMOYO protection. &lt;br /&gt;
&lt;br /&gt;
 root=/dev/hda8 ro vga=791 video=neofb:ywrap,mtrr acpi=off CCS=default&lt;br /&gt;
&lt;br /&gt;
= Configuring Policy to Guard Linux as Needed =&lt;br /&gt;
&lt;br /&gt;
Login to the system as root user, and run editpolicy included in TOMOYO Linux tools.&lt;br /&gt;
&lt;br /&gt;
 /usr/lib/ccs/editpolicy&lt;br /&gt;
&lt;br /&gt;
= Contents =&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Directories:&lt;br /&gt;
|/usr/lib/ccs&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Programs:&lt;br /&gt;
|tomoyo_init_policy.sh, init_policy.sh, editpolicy,  editpolicy_offline, setlevel, setprofile, ccstree, savepolicy, makesyaoranconf, ccs-auditd, findtemp, sortpolicy, ld-watch, ccs-queryd, checkpolicy,  /sbin/{ccs,tomoyo}-init&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!Installed Libraries:&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Short Descriptions ==&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;text-align: left;&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!editpolicy&lt;br /&gt;
|Edits the current policy in /proc/ccs/ directory&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!editpolicy_offline&lt;br /&gt;
|Edits the policy in /etc/ccs/ directory.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!setlevel&lt;br /&gt;
|Changes the current control level (i.e. writing to /proc/ccs/profile ) and displays the new control level.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!setprofile&lt;br /&gt;
|Assigns a profile to domains.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccstree&lt;br /&gt;
|Lists the domainnames of currently running processes belong to and the profile numbers the domains currently assigned to.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!savepolicy&lt;br /&gt;
|Saves the on-memory policy onto disk.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!makesyaoranconf&lt;br /&gt;
|Generates syaoran.conf, the configuration file for SYAORAN (the Tamper-Proof /dev filesystem). You can use SYAORAN filesystem if you want to run the system with read-only root fs or you want to prevent device files from tampering.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-auditd&lt;br /&gt;
|Reads from /proc/ccs/grant_log and /proc/ccs/reject_log and writes to the location given in the commandline parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!sortpolicy&lt;br /&gt;
|Remove duplicated entry from logs written by &amp;quot;ccs-auditd&amp;quot;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!findtemp&lt;br /&gt;
|Reads domain policy from standard input and checks the existence of pathnames, and dumps the nonexistent pathnames.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ld-watch&lt;br /&gt;
|Appends shared libraries to exception policy automatically using &amp;quot;allow_read&amp;quot; directive when the location of shared libraries in /etc/ld.so.cache has changed.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-queryd&lt;br /&gt;
|Detects policy violation and displays the access request. You can tell the system whether the access request should be granted (or granted and policy should be appended to grant the access request) or rejected after you validate the access request.&lt;br /&gt;
&lt;br /&gt;
By running this program while updating packages, you can avoid errors due to insufficient permissions.&lt;br /&gt;
&lt;br /&gt;
Never grant access requests unconditionally. The cause of policy violation is not always updating packages, but may by malicious requests by attackers. If you grant access requests caused by malicious requests by attackers, the system gets intruded.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!checkpolicy&lt;br /&gt;
|Reads policy files from standard input and checks syntaxes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
!ccs-init&lt;br /&gt;
|Loads policy files from /etc/ccs/ directory.&lt;br /&gt;
&lt;br /&gt;
Put this program as /sbin/ccs-init , and this program will be invoked automatically when execution of /sbin/init is requested by initrd.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Security]]&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
	<entry>
		<id>?title=Template:TOMOYO-Version&amp;diff=16263</id>
		<title>Template:TOMOYO-Version</title>
		<link rel="alternate" type="text/html" href="?title=Template:TOMOYO-Version&amp;diff=16263"/>
		<updated>2008-12-11T01:08:48Z</updated>

		<summary type="html">&lt;p&gt;Kumaneko: Updated to 1.6.5&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;1.6.5-20081210&lt;/div&gt;</summary>
		<author><name>Kumaneko</name></author>
	</entry>
</feed>