栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

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

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

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

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

从手册中摘录,进行了一些更改。据它:

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.


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/403289.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号