This commit is contained in:
fofolee
2019-04-08 23:22:26 +08:00
commit 7ca94f1141
5960 changed files with 530244 additions and 0 deletions

18
docs/linux/sesearch.html Normal file
View File

@@ -0,0 +1,18 @@
<h1 id="sesearch">sesearch</h1>
<p>查询SELinux策略的规则详情</p>
<h2 id="补充说明">补充说明</h2>
<p>使用seinfo命令可以查询SELinux的策略提供多少相关规则如果查到的相关类型或者布尔值想要知道详细规则时使用 <strong>sesearch命令</strong> 查询。SELinux的策略与规则管理相关命令seinfo命令、sesearch命令、getsebool命令、setsebool命令、semanage命令。</p>
<h3 id="语法">语法</h3>
<pre><code>sesearch [-a] [-s 主体类型] [-t 目标类型] [-b 布尔值]</code></pre>
<h3 id="选项">选项</h3>
<pre><code>-a:列出该类型或布尔值的所有相关信息
-t:后面还要接类型,例如 -t httpd_t
-b:后面还要接布尔值的规则,例如 -b httpd_enable_ftp_server</code></pre>
<h3 id="实例">实例</h3>
<p>找出目标文件资源类型为<code>httpd_sys_content_t</code>的有关信息:</p>
<pre><code>sesearch -a -t httpd_sys_content_t</code></pre>
<p>找出主体进程为<code>httpd_t</code>且目标文件类型为httpd相关的所有信息</p>
<pre><code>sesearch -s httpd_t -t httpd_* -a</code></pre>
<p>查看布尔值<code>httpd_enable_homedirs</code>设置了多少规则</p>
<pre><code>sesearch -b httpd_enable_homedirs -a</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->