aboutsummaryrefslogtreecommitdiff
path: root/zh-cn/security/selinux/device-policy.html
diff options
context:
space:
mode:
Diffstat (limited to 'zh-cn/security/selinux/device-policy.html')
-rw-r--r--zh-cn/security/selinux/device-policy.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/zh-cn/security/selinux/device-policy.html b/zh-cn/security/selinux/device-policy.html
index 7514a885..7bf65469 100644
--- a/zh-cn/security/selinux/device-policy.html
+++ b/zh-cn/security/selinux/device-policy.html
@@ -73,7 +73,7 @@ scontext=u:r:mediaserver:s0
tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
</pre>
-<p>是完全通过为 <code>/dev/kgsl-3d0</code> 添加适当的标签来解决的。在此示例中,<code>tcontext</code> 是 <code>device</code>。这表示默认环境,在该环境中,<code>/dev</code> 中的所有文件都会获得“<a href="https://android.googlesource.com/platform/external/sepolicy/+/marshmallow-dev/file_contexts#31">device</a>”标签,除非相关内容被分配了更具体的标签。直接在此处接受来自 <a href="validate.html#using_audit2allow">audit2allow</a> 的输出会导致不正确且过度宽容的规则。</p>
+<p>是完全通过为 <code>/dev/kgsl-3d0</code> 添加适当的标签来解决的。在此示例中,<code>tcontext</code> 是 <code>device</code>。这表示默认环境,在该环境中,<code>/dev</code> 中的文件除非被分配了更具体的标签,否则都会获得“<a href="https://android.googlesource.com/platform/external/sepolicy/+/marshmallow-dev/file_contexts#31">device</a>”标签。直接在此处接受来自 <a href="validate.html#using_audit2allow">audit2allow</a> 的输出会导致不正确且过度宽容的规则。</p>
<p>要解决这种问题,可以为文件添加更具体的标签,在此示例中为 <a href="https://android.googlesource.com/device/lge/hammerhead/+/marshmallow-dev/sepolicy/file_contexts#1">gpu_device</a>。由于 <a href="https://android.googlesource.com/platform/external/sepolicy/+/marshmallow-dev/mediaserver.te#24">mediaserver 在核心政策中已有访问 gpu_device 所需的必要权限</a>,因此不再需要更多权限。</p>