linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: mtk.manpages@gmail.com, Andrew Morgan <morgan@kernel.org>
Cc: linux-security-module@vger.kernel.org
Subject: [PATCH 2/4] cap_get_proc.3: for cap_get_pid(), pid==0 means "the calling process"
Date: Wed, 10 Jun 2020 08:57:33 +0200	[thread overview]
Message-ID: <20200610065735.3975740-2-mtk.manpages@gmail.com> (raw)
In-Reply-To: <20200610065735.3975740-1-mtk.manpages@gmail.com>

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@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


  reply	other threads:[~2020-06-10  6:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10  6:57 [PATCH 1/4] cap_get_proc.3: Typo fixes Michael Kerrisk (man-pages)
2020-06-10  6:57 ` Michael Kerrisk (man-pages) [this message]
2020-06-10  6:57 ` [PATCH 3/4] getpcaps.8: Note that pid==0 displays capabilities of getpcaps itself Michael Kerrisk (man-pages)
2020-06-10  6:57 ` [PATCH 4/4] cap_get_proc.3: change "current process" to "calling process" Michael Kerrisk (man-pages)
2020-06-11 15:59   ` Andrew G. Morgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200610065735.3975740-2-mtk.manpages@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=linux-security-module@vger.kernel.org \
    --cc=morgan@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).