首页 > 解决方案 > Apparmor:是否可以从可执行文件中调用另一个可执行文件?

问题描述

我有一个问题,我不确定如何在 AppArmor 中解决。

基本上我有一个执行程序的配置文件,让我们说

profile myprof {
    /my/executable ix,
}

问题是,从那个可执行文件中,我调用了另一个,产生了一个进程,让我们称之为 /the/other/executable。

如何让 AppArmor 授予 /my/executable 调用 /the/other/executable 的权限?当然,这将在 /my/executable 已经运行时完成。

标签: linuxsecurityubuntuserverapparmor

解决方案


profile myprof {
    /my/executable ix,
}

当您确实编写这样的规则时,您所做的是允许以完全相同的权限myprof执行。因此,如果您想允许做某事,您只需将该权限添加到,它将被继承。但是,如果您想将该特定权限专门授予和授予您,则需要使用其他内容:/my/executablemyprof/my/executablemyprof/my/executable/my/executablemyprof

  • ux - 无限制执行

  • ux - unconfined execute - 清理环境

  • px - 离散配置文件执行

  • Px - 离散配置文件执行 - 清理环境

  • cx - 执行时转换到子配置文件

  • Cx - 执行时转换到子配置文件 - 清理环境

  • pix - 使用继承后备执行的离散配置文件

  • Pix - 使用继承回退执行离散配置文件 - 清理环境

  • cix - 使用继承后备执行时转换到子配置文件

  • Cix - 使用继承回退执行时转换到子配置文件 - 清理环境

  • pux - 离散配置文件执行回退到无限制

  • PUx - 离散配置文件执行并回退到无限制 - 清理环境

  • cux - 在执行时转换到子配置文件,并回退到无限制

  • CUx - 在执行时转换到子配置文件并回退到无限制 - 清理环境

离散轮廓和子轮廓的区别在于离散轮廓是正常轮廓,子轮廓是在当前轮廓内部定义的。


推荐阅读