我正在努力理解POSIX功能。有时,在阅读文档时,它们会引用文件功能,有时还会引用处理功能。
文件和进程功能的区别是什么?我所理解的是,我们通过使用setcap将功能分配给可执行文件,然后当它运行时(这是一个进程),它将使用该功能。为什么附加的进程功能,如进程是内存中的可执行文件。
发布于 2019-03-17 21:28:26
在带有套帽的可执行文件上设置文件功能。
但是其他功能可以从启动过程中继承。这在Linux能力手册页中有描述:
Inheritable
This is a set of capabilities preserved across an execve(2).
Inheritable capabilities remain inheritable when executing any
program, and inheritable capabilities are added to the
permitted set when executing a program that has the
corresponding bits set in the file inheritable set.https://unix.stackexchange.com/questions/505104
复制相似问题