【问题标题】:Apparmor: is it possible to call another executable from within an executable?Apparmor:是否可以从可执行文件中调用另一个可执行文件?
【发布时间】:2018-11-04 12:16:59
【问题描述】:

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

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

profile myprof {
    /my/executable ix,
}

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

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

【问题讨论】:

    标签: linux security ubuntu server apparmor


    【解决方案1】:
    profile myprof {
        /my/executable ix,
    }
    

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

    • ux - 无限制执行

    • Ux - 无限制执行 - 清理环境

    • px - 离散配置文件执行

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

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

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

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

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

    • cix - 在执行时转换到子配置文件并继承回退

    • Cix - 在执行时转换到子配置文件并继承回退 -- 擦洗环境

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

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

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

    • CUx - 在执行时转换到子配置文件并回退到 unconfined -- 擦洗环境

    离散配置文件和子配置文件的区别在于,离散配置文件是正常配置文件,子配置文件定义在内部当前配置文件。

    【讨论】:

      猜你喜欢
      • 2014-07-03
      • 2010-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-25
      • 1970-01-01
      相关资源
      最近更新 更多