【问题标题】:Is it possible to use the package name as the domain name in Android SELinux?Android SELinux中是否可以使用包名作为域名?
【发布时间】:2015-03-07 11:06:04
【问题描述】:

Android SELinux(也可以说是SEAndroid)定义了很多域,包括system_app、platform_app、isolated_app等。

每个域有不同的含义,例如system_app包括所有共享系统uid的应用,platform_app包括所有签署平台密钥的应用。

所有 SE 文件都位于 external/sepolicy 中,我可以从这些文件中修改规则。

是否可以定义一个指向指定包名的新域(例如,com.google.android.music)?

我没有找到任何关于此的文档或示例,所以我不知道该怎么做。

我将不胜感激任何建议或 cmets。

谢谢。

【问题讨论】:

  • 您能找到解决方案吗?我也需要这样的东西!
  • 是的,请参阅下面的自我回答。

标签: android selinux


【解决方案1】:

经过长时间的研究,我找到了一种为指定包定义新域的方法

在seapp_contexts中定义一个新域

像这样,

user=_app domain=googlemusic seinfo=platform name=com.google.android.music type=app_data_file

然后定义一个新域googlemusic的权限

创建一个名为googlemusic.te的te文件

type googlemusic_app,domain

app_domain(googlemusic)

#more permissions

【讨论】:

    猜你喜欢
    • 2023-04-05
    • 1970-01-01
    • 1970-01-01
    • 2012-12-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-08
    • 1970-01-01
    相关资源
    最近更新 更多