[PATCH 2/4] cap_get_proc.3: for cap_get_pid(), pid==0 means "the calling process"

Michael Kerrisk (man-pages) mtk.manpages at gmail.com
Wed Jun 10 06:57:33 UTC 2020


It's useful to know that when cap_get_pid() gets pid==0,
it returns the caller's capabilities.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages at gmail.com>
---
 doc/cap_get_proc.3 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/cap_get_proc.3 b/doc/cap_get_proc.3
index c2ce212..0238601 100644
--- a/doc/cap_get_proc.3
+++ b/doc/cap_get_proc.3
@@ -78,6 +78,9 @@ see
 .BR cap_init (3),
 with the process capabilities of the process indicated by
 .IR pid .
+(If
+.I pid
+is 0, then the calling process's capabilities are returned.)
 This information can also be obtained from the
 .I /proc/<pid>/status
 file.
-- 
2.26.2



More information about the Linux-security-module-archive mailing list