http://selinuxproject.org/w/?title=GlobalConfigurationFiles&limit=500&action=history&feed=atom GlobalConfigurationFiles - Revision history 2024-03-28T23:52:54Z Revision history for this page on the wiki MediaWiki 1.23.13 http://selinuxproject.org/w/?title=GlobalConfigurationFiles&diff=1725&oldid=prev RichardHaines at 15:35, 8 December 2014 2014-12-08T15:35:47Z <p></p> <a href="http://selinuxproject.org/w/?title=GlobalConfigurationFiles&amp;diff=1725&amp;oldid=922">Show changes</a> RichardHaines http://selinuxproject.org/w/?title=GlobalConfigurationFiles&diff=922&oldid=prev RichardHaines: /* /etc/selinux/semanage.conf File */ 2010-05-12T14:08:07Z <p>‎<span dir="auto"><span class="autocomment">/etc/selinux/semanage.conf File</span></span></p> <table class='diff diff-contentalign-left'> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr style='vertical-align: top;'> <td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td> <td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 14:08, 12 May 2010</td> </tr><tr><td colspan="2" class="diff-lineno">Line 80:</td> <td colspan="2" class="diff-lineno">Line 80:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>disable-genhomedircon = true|false</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>disable-genhomedircon = true|false</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>handle-unknown = allow|deny|reject</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>handle-unknown = allow|deny|reject</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">bzip-blocksize = 0|1..9</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">bzip-small true|false</ins></div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[verify kernel]</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[verify kernel]</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>path = &lt;path to policy checker&gt;</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>path = &lt;path to policy checker&gt;</div></td></tr> <tr><td colspan="2" class="diff-lineno">Line 132:</td> <td colspan="2" class="diff-lineno">Line 134:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Note: to activate any change, the base policy needs to be reloaded with the semodule -b command (as semodule -R does not change them).</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Note: to activate any change, the base policy needs to be reloaded with the semodule -b command (as semodule -R does not change them).</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">|-</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">| | bzip-blocksize</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">| | This optional entry determines whether the modules are compressed or not with bzip. If the entry is 0, then no compression will be used (this is required with tools such as sechecker and apol). This can also be set to&#160; a value between 1 and 9 that will set the block size used for compression (bzip will multiply this by 100,000, so '9' is faster but uses more memory).</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">|-</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">| | bzip-small</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">| | When this optional entry is set to TRUE the memory usage is reduced for compression and decompression (the bzip -s or --small option). If FALSE or no entry present, then does not try to reduce memory requirements.</ins></div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>| | &lt;nowiki&gt;[verify kernel].. [end]&lt;/nowiki&gt;</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>| | &lt;nowiki&gt;[verify kernel].. [end]&lt;/nowiki&gt;</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>| | <del class="diffchange diffchange-inline">Call </del>a policy <del class="diffchange diffchange-inline">check routine as defined in </del>the <del class="diffchange diffchange-inline">XX section</del>.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>| | <ins class="diffchange diffchange-inline">This starts an additional set of entries that can be used to validate </ins>a policy <ins class="diffchange diffchange-inline">with an external application during </ins>the <ins class="diffchange diffchange-inline">build process</ins>. <ins class="diffchange diffchange-inline">The validation process takes place before the policy is allowed to be inserted into the store with the SELinux Project web site showing a worked example at:</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&#160;</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">[http://selinuxproject.org/page/PolicyValidate http://selinuxproject.org/page/PolicyValidate]</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&#160;</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">The entries required for this option are as follows:</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">&lt;pre&gt;</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">[verify kernel]</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">path = &lt;application_to_run&gt;</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">args = &lt;arguments&gt;</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">[end]</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">&lt;/pre&gt;</ins></div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td></tr> </table> RichardHaines http://selinuxproject.org/w/?title=GlobalConfigurationFiles&diff=859&oldid=prev RichardHaines: New page: = Global Configuration Files = Listed in the sections that follow are the common configuration files used by SELinux and are therefore not policy specific. == /etc/selinux/config File == ... 2009-12-02T13:55:08Z <p>New page: = Global Configuration Files = Listed in the sections that follow are the common configuration files used by SELinux and are therefore not policy specific. == /etc/selinux/config File == ...</p> <p><b>New page</b></p><div>= Global Configuration Files =<br /> Listed in the sections that follow are the common configuration files used by SELinux and are therefore not policy specific.<br /> <br /> == /etc/selinux/config File ==<br /> If this file is missing or corrupt no SELinux policy will be loaded (i.e. SELinux is disabled). The config file controls the state of SELinux using the following parameters:<br /> &lt;pre&gt;<br /> SELINUX=enforcing|permissive|disabled<br /> SELINUXTYPE=policy_name<br /> SETLOCALDEFS=0|1<br /> REQUIREUSERS=0|1<br /> AUTORELABEL=0|1<br /> &lt;/pre&gt;<br /> <br /> '''Where:'''<br /> {| border=&quot;1&quot;<br /> | | SELINUX<br /> | | This can contain one of three values:<br /> <br /> '''enforcing''' - SELinux security policy is enforced.<br /> <br /> '''permissive''' - SELinux logs warnings (see the Audit Logs section) instead of enforcing the policy (i.e. the action is allowed to proceed).<br /> <br /> '''disabled''' - No SELinux policy is loaded.<br /> <br /> |-<br /> | | SELINUXTYPE<br /> | | Where policy_name is the policy type or name that will be loaded at system boot time. <br /> <br /> The policy MUST be located at: <br /> <br /> &lt;nowiki&gt;/etc/selinux/&lt;policy_name&gt;/&lt;/nowiki&gt;<br /> <br /> |-<br /> | | SETLOCALDEFS<br /> | | This optional field should be set to 0 (or the entry removed) as so that the policy store management infrastructure is used (semanage / semodule). <br /> <br /> If set to 1, then init(8) and load_policy(8) will read the local customisation for booleans and users.<br /> <br /> |-<br /> | | REQUIRESEUSERS<br /> | | This optional field can be used to fail the login when there is no seusers file if it is set to 1.<br /> <br /> The default action (if 0 or the entry is not present) the libselinux function getseuserbyname will use the GNU / Linux user name. <br /> <br /> |-<br /> | | AUTORELABEL<br /> | | This is an optional field. If set to '0' and there is a file called .autorelabel in the root directory, then on a reboot, the loader will drop to a shell where a root logon is required. An administrator can then manually relabel the file system.<br /> <br /> If set to '1' or the parameter name is not used (the default) there is no login for manual relabeling, however should the /.autorelabel file exist, then the file system will be automatically relabeled using fixfiles -F restore. <br /> <br /> In both cases the /.autorelabel file will be removed so the relabel is not done again. <br /> <br /> |}<br /> <br /> <br /> '''Example config file contents are:'''<br /> &lt;pre&gt;<br /> &lt;nowiki&gt;# This file controls the state of SELinux on the system.&lt;/nowiki&gt;<br /> &lt;nowiki&gt;# SELINUX= can take one of these three values:&lt;/nowiki&gt;<br /> &lt;nowiki&gt;# &lt;/nowiki&gt;enforcing - SELinux security policy is enforced.<br /> &lt;nowiki&gt;# &lt;/nowiki&gt;permissive - SELinux prints warnings instead of enforcing.<br /> &lt;nowiki&gt;# &lt;/nowiki&gt;disabled - No SELinux policy is loaded.<br /> SELINUX=permissive<br /> &lt;nowiki&gt;#&lt;/nowiki&gt;<br /> &lt;nowiki&gt;# SELINUXTYPE= can take one of these two values:&lt;/nowiki&gt;<br /> &lt;nowiki&gt;# &lt;/nowiki&gt;targeted - Targeted processes are protected,<br /> &lt;nowiki&gt;# &lt;/nowiki&gt;mls - Multi Level Security protection.<br /> SELINUXTYPE=targeted<br /> &lt;/pre&gt;<br /> <br /> == /etc/selinux/semanage.conf File ==<br /> The semanage.config file controls the configuration and actions of the semanage and semodule set of commands using the following parameters:<br /> &lt;pre&gt;<br /> module-store = method<br /> policy-version = policy_version<br /> expand-check = 0|1<br /> file-mode = mode<br /> save-previous = true|false<br /> save-linked = true|false<br /> disable-genhomedircon = true|false<br /> handle-unknown = allow|deny|reject<br /> [verify kernel]<br /> path = &lt;path to policy checker&gt;<br /> args = &lt;args&gt;<br /> [end]<br /> &lt;/pre&gt;<br /> <br /> '''Where:'''<br /> {| border=&quot;1&quot;<br /> | | module-store<br /> | | The method can be one of four options:<br /> <br /> 1) '''directlibsemanage''' - will write directly to a module store. This is the default value.<br /> <br /> 2) '''sourcelibsemanage''' - manipulates a source SELinux policy.<br /> <br /> 3) '''/foo/bar''' - Write via a policy management server, whose named socket is at /foo/bar. The path must begin with a '/'.<br /> <br /> 4) '''foo.com:4242''' - Establish a TCP connection to a remote policy management server at foo.com. If there is a colon then the remainder is interpreted as a port number; otherwise default to port 4242.<br /> <br /> |-<br /> | | policy-version<br /> | | This optional entry can contain a policy version number, however it is normally commented out as it then defaults to that supported by the system (for F-10 this is policy version 23). <br /> <br /> |-<br /> | | expand-check<br /> | | This optional entry controls whether hierarchy checking on module expansion is enabled (1) or disabled (0). The default is 0.<br /> <br /> |-<br /> | | file-mode<br /> | | This optional entry allows the file permissions to be set on runtime policy files. The format is the same as the mode parameter of the chmod command and defaults to 0644 if not present.<br /> <br /> |-<br /> | | save-previous<br /> | | This optional entry controls whether the previous module directory is saved (TRUE) after a successful commit to the policy store. The default is to delete the previous version (FALSE).<br /> <br /> |-<br /> | | save-linked<br /> | | This optional entry controls whether the previously linked module is saved (TRUE) after a successful commit to the policy store. Note that this option will create a base.linked file in the module policy store.<br /> <br /> The default is to delete the previous module (FALSE). <br /> <br /> |-<br /> | | disable-genhomedircon<br /> | | This optional entry controls whether the embedded genhomedircon function is run when using the semanage command. The default is FALSE.<br /> <br /> |-<br /> | | handle-unknown<br /> | | This optional entry controls the kernel behaviour for handling permissions defined in the kernel but missing from the policy (that are declared at the start of the base.conf (loadable policy) or policy.conf (monolithic policy). <br /> <br /> The options are: allow the permission, reject by not loading the policy or deny the permission. The default is deny. See the SELinux Filesystem section for how these are reported in /selinux.<br /> <br /> Note: to activate any change, the base policy needs to be reloaded with the semodule -b command (as semodule -R does not change them).<br /> <br /> |-<br /> | | &lt;nowiki&gt;[verify kernel].. [end]&lt;/nowiki&gt;<br /> | | Call a policy check routine as defined in the XX section.<br /> <br /> |}<br /> <br /> <br /> '''Example semanage.config file contents are:'''<br /> &lt;pre&gt;<br /> &lt;nowiki&gt;# &lt;/nowiki&gt;/etc/selinux/semanage.conf<br /> <br /> module-store = direct<br /> expand-check = 0<br /> &lt;/pre&gt;<br /> <br /> == /etc/selinux/restorecond.conf File ==<br /> The restorecond.conf file contains a list of files that may be created by applications with an incorrect security context. The restorecond daemon will then watch for their creation or modification and automatically correct their security context to that specified by the active policy file context configuration files(located in the &lt;nowiki&gt;/etc/selinux/&lt;policy_name&gt;/contexts/files&lt;/nowiki&gt; directory). The daemon uses functions in libselinux such as matchpathcon(3) to manage the context updates.<br /> <br /> Each line of the file contains the full path of a file or directory. The only different entry is one that starts with a tilde (~) as that signifies that the entries will be expanded to logged in users home directories (e.g. ~/public_html would cause the daemon to listen for changes to public_html in all logged on users home directories). <br /> <br /> '''Example restorecond.conf file contents are:'''<br /> &lt;pre&gt;<br /> &lt;nowiki&gt;# &lt;/nowiki&gt;/etc/selinux/restorecond.conf<br /> <br /> /etc/services<br /> /etc/resolv.conf<br /> /etc/samba/secrets.tdb<br /> /etc/mtab<br /> /var/run/utmp<br /> /var/log/wtmp<br /> <br /> &lt;nowiki&gt;# This entry expands to listen for all files created for all &lt;/nowiki&gt;<br /> &lt;nowiki&gt;# logged in users within their home directories:&lt;/nowiki&gt;<br /> ~/*<br /> &lt;/pre&gt;<br /> <br /> == /etc/sestatus.conf File ==<br /> This file is used by the sestatus(8) command to list files and processes whose security context should be displayed when the -v flag is used (sestatus -v). <br /> <br /> The sestatus.conf file has the following parameters:<br /> &lt;pre&gt;<br /> &lt;nowiki&gt;[files]&lt;/nowiki&gt;<br /> List of files to display context<br /> <br /> &lt;nowiki&gt;[process]&lt;/nowiki&gt;<br /> List of processes to display context<br /> &lt;/pre&gt;<br /> <br /> Example sestatus.conf file contents are:<br /> &lt;pre&gt;<br /> &lt;nowiki&gt;# &lt;/nowiki&gt;/etc/sestatus.conf<br /> <br /> &lt;nowiki&gt;[files]&lt;/nowiki&gt;<br /> /etc/passwd<br /> /etc/shadow<br /> /bin/bash<br /> /bin/login<br /> /bin/sh<br /> /sbin/agetty<br /> /sbin/init<br /> /sbin/mingetty<br /> /usr/sbin/sshd<br /> /lib/libc.so.6<br /> /lib/ld-linux.so.2<br /> /lib/ld.so.1<br /> <br /> &lt;nowiki&gt;[process]&lt;/nowiki&gt;<br /> /sbin/mingetty<br /> /sbin/agetty<br /> /usr/sbin/sshd<br /> &lt;/pre&gt;<br /> <br /> == /etc/security/sepermit.conf File ==<br /> This file is used by the pam_sepermit.so module to allow or deny a user login depending on whether SELinux is enforcing the policy or not. An example use of this facility is the Red Hat kiosk mode where a terminal can be set up with a guest user that does not require a password, but can only log in if SELinux is in enforcing mode.<br /> <br /> The entry is added to the appropriate /etc/pam.d configuration file, with the example shown being the /etc/pam.d/gdm file:<br /> &lt;pre&gt;<br /> &lt;nowiki&gt;#%PAM-1.0&lt;/nowiki&gt;<br /> auth &lt;nowiki&gt;[success=done ignore=ignore default=bad] pam_selinux_permit.so&lt;/nowiki&gt;<br /> &lt;nowiki&gt;# auth &lt;/nowiki&gt;required pam_succeed_if.so user != root quiet<br /> auth required pam_env.so<br /> auth substack system-auth<br /> auth optional pam_gnome_keyring.so<br /> account required pam_nologin.so<br /> account include system-auth<br /> password include system-auth<br /> session required pam_selinux.so close<br /> session required pam_loginuid.so<br /> session optional pam_console.so<br /> session required pam_selinux.so open<br /> session optional pam_keyinit.so force revoke<br /> session required pam_namespace.so<br /> session optional pam_gnome_keyring.so auto_start<br /> session include system-auth<br /> &lt;/pre&gt;<br /> <br /> The usage is described in the pam_sepermit man page, but the following example describes the configuration:<br /> &lt;pre&gt;<br /> &lt;nowiki&gt;# /etc/security/sepermit.conf&lt;/nowiki&gt;&lt;nowiki&gt;#&lt;/nowiki&gt;<br /> &lt;nowiki&gt;# Each line contains either:&lt;/nowiki&gt;<br /> &lt;nowiki&gt;# &lt;/nowiki&gt;- an user name<br /> &lt;nowiki&gt;# &lt;/nowiki&gt;- a group name, with @group syntax<br /> &lt;nowiki&gt;# &lt;/nowiki&gt;- a SELinux user name, with %seuser syntax<br /> &lt;nowiki&gt;# Each line can contain optional arguments separated by :&lt;/nowiki&gt;<br /> &lt;nowiki&gt;# The possible arguments are:&lt;/nowiki&gt;<br /> &lt;nowiki&gt;# &lt;/nowiki&gt;- exclusive - only single login session will be allowed for<br /> &lt;nowiki&gt;# &lt;/nowiki&gt;the user and the user's processes will be killed on logout<br /> &lt;nowiki&gt;# An example entry for 'kiosk mode':&lt;/nowiki&gt;<br /> <br /> xguest:exclusive<br /> &lt;/pre&gt;</div> RichardHaines