uTools-Manuals/docs/linux/seinfo.html
2019-04-21 11:50:48 +08:00

17 lines
1.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="seinfo">seinfo</h1>
<p>查询SELinux的策略提供多少相关规则</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>seinfo命令</strong> 是用来查询SELinux的策略提供多少相关规则一个主体进程能否读取到目标文件资源的重点是在于SELinux的策略以及策略内的各项规则然后再通过该规则的定义去处理各项目标文件的安全上下文尤其是“类型”部分。SELinux的策略与规则管理相关命令seinfo命令、sesearch命令、getsebool命令、setsebool命令、semanage命令。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">seinfo选项</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-A列出SELinux的状态、规则布尔值、身份识别、角色、类型等所有信息。
-t列出SELinux所有类型(type)的种类。
-r列出SELinux所有角色(role)的种类。
-u列出SELinux所有身份识别(user)的种类。
-b列出所有规则的种类布尔值</code></pre>
<h3 id="实例">实例</h3>
<p>列出与httpd有关的规则</p>
<pre><code class="language-bash">seinfo -b | grep httpd</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->