当前位置: 首页 > 面试题库 >

尽管缺少基于文件系统的功能,如何执行流程并保留功能?

曹振
2023-03-14
问题内容

我想使系统在没有setuid文件“ +
p”功能的情况下可用,并且在没有设置PR_SET_NO_NEW_PRIVS时被禁用的功能中,通常使之可用。

使用这种方法(不再能够基于init集合PR_SET_NO_NEW_PRIVS和基于文件系统的功能提升),您不能“重新填充”您的功能,而只需要注意不要“泼洒”它们。

如何在execve不“散布”任何授予的功能的情况下进行其他处理(例如,如果新程序的文件为setcap =ei)?只是“我相信这个新过程就像我相信自己一样”。例如,向 用户 提供了一项 功能 (并且该用户想在他启动的任何程序中进行锻炼)…

我可以永久制作整个文件系统=ei吗?我要保持文件系统不干扰该方案,不能授予或撤消功能;通过父->子事物控制一切。


问题答案:

我并不是说我建议您这样做,但这就是这里。

从手册中摘录,进行了一些更改。据它:fork不改变能力。而 现在有一个环境组在Linux内核4.3加 ,似乎这又是为了什么你正在尝试做的。

   Ambient (since Linux 4.3):
          This is a set of capabilities that are preserved across an execve(2) of a program that is not privileged.  The ambient capability set obeys the invariant that no capability can ever
          be ambient if it is not both permitted and inheritable.

          The ambient capability set can be directly modified using
          prctl(2).  Ambient capabilities are automatically lowered if
          either of the corresponding permitted or inheritable
          capabilities is lowered.

          Executing a program that changes UID or GID due to the set-
          user-ID or set-group-ID bits or executing a program that has
          any file capabilities set will clear the ambient set.  Ambient
          capabilities are added to the permitted set and assigned to
          the effective set when execve(2) is called.

   A child created via fork(2) inherits copies of its parent's
   capability sets.  See below for a discussion of the treatment of
   capabilities during execve(2).

Transformation of capabilities during execve()
   During an execve(2), the kernel calculates the new capabilities of
   the process using the following algorithm:

       P'(ambient) = (file is privileged) ? 0 : P(ambient)

       P'(permitted) = (P(inheritable) & F(inheritable)) |
                       (F(permitted) & cap_bset) | P'(ambient)

       P'(effective) = F(effective) ? P'(permitted) : P'(ambient)

       P'(inheritable) = P(inheritable)    [i.e., unchanged]

   where:

       P         denotes the value of a thread capability set before the
                 execve(2)

       P'        denotes the value of a thread capability set after the
                 execve(2)

       F         denotes a file capability set

       cap_bset  is the value of the capability bounding set (described
                 below).

   A privileged file is one that has capabilities or has the set-user-ID
   or set-group-ID bit set.


 类似资料:
  • 我在src/test/resources/feature/中有以下功能文件(单独的功能文件),我想并行运行它们。比如:一个功能文件必须在chrome中执行,另一个必须在另一个chrome实例中执行,如@Tags name所述。 我正在使用Java1.2。5版本,AbstractTestNGCucumberTests作为runner。我可以运行一个功能文件,但当我尝试使用cucumber jvm并行

  • 我已经安装Kibana版本6.5。我选择了30天免费试用,并启用了x-pack安全选项。 通过KibanaUI我创建了一个用户并分配了报告所需的两个角色-kibana_user和reporting_user。现在我通过这个新用户登录,但在仪表板上找不到报告选项。 即使我使用具有超级用户角色的elastic用户登录,行为也是一样的。我错过什么了吗? 我在Kibana startup上看到一条日志,上

  • 我有一堆功能文件(大约15个),其中每个功能文件都有一个线程,需要睡眠至少3分钟(对于一些复杂的后台应用程序,需要执行一些功能)。我需要一种并行执行它们的方法。 我有一个简单的CucumberRunnerTestCLass。 非常感谢您的帮助。谢谢

  • 1. 功能流程 1.1. 语音唤醒交互流程 1.2. 按键唤醒交互流程 1.3. 音量大小调节流程 1.4. 语音交互流程 1.5. 麦克风操作流程 1.6. 通知流程 1.7. 报警流程 1.8. 蓝牙配网流程 1.9. Alexa 授权流程 1.9.1. 获取MetaData 1.9.2. 发送认证信息 1.10. AVS OTA升级 1.10.1. 概述 1.1. 语音唤醒交互流程 用户通过

  • 本文向大家介绍基于文件的数据管理系统,包括了基于文件的数据管理系统的使用技巧和注意事项,需要的朋友参考一下 用于组织和维护数据文件的系统称为基于文件的数据系统。这些文件系统用于处理单个或多个文件,效率不高。  功能性 基于文件的数据管理系统的功能如下- 基于文件的系统有助于任何用户的基本数据管理。 基于文件的系统中存储的数据应保持一致。在基于文件的系统中完成的任何事务都不应更改一致性属性。  基于

  • 我正在尝试为我的容器配置网络选项,但在尝试以下命令时: 我得到以下结果: root@Server02:/var/lib#lxc网络创建测试br0 用法:lxc[选项] 检查可用命令列表,我不认为网络是一个选项 以下是我看到的可用命令: 配置,复制,删除,执行,文件,手指,图像,信息,初始化,启动,列表,监控,移动,暂停,配置文件,发布,远程,重启,恢复,快照,启动,停止,版本 我正在使用Ubunt