util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: mtk.manpages@gmail.com, Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: [PATCH 3/3] Manual pages: setpriv.1: warn users of restrictions on capability changes
Date: Fri, 12 Jun 2020 13:19:33 +0200	[thread overview]
Message-ID: <20200612111933.3043314-3-mtk.manpages@gmail.com> (raw)
In-Reply-To: <20200612111933.3043314-1-mtk.manpages@gmail.com>

The kernel imposes various restrictions on the changes that can be
made to the inheritable, ambient, and bounding sets. Warn the user
about that.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
---
 sys-utils/setpriv.1 | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/sys-utils/setpriv.1 b/sys-utils/setpriv.1
index 3794a917e..42d1a2fb9 100644
--- a/sys-utils/setpriv.1
+++ b/sys-utils/setpriv.1
@@ -65,6 +65,22 @@ the current ambient set for
 and the current bounding set for
 .BR \-\-bounding\-set .
 .IP
+Note the following restrictions (detailed in
+.BR capabilities (7))
+regarding modifications to these capability sets:
+.RS
+.IP * 2
+A capability can be added to the inheritable set only if it is
+currently present in the bounding set.
+.IP *
+A capability can be added to the ambient set only if it is currently
+present in both the permitted and inheritable sets.
+.IP *
+Notwithstanding the syntax offered by
+.BR setpriv ,
+the kernel does not permit capabilities to be added to the bounding set.
+.RE
+.IP
 If you drop a capability from the bounding set without also dropping it from the
 inheritable set, you are likely to become confused.  Do not do that.
 .TP
-- 
2.26.2


  parent reply	other threads:[~2020-06-12 11:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12 11:19 [PATCH 1/3] Manual pages: runuser.1: Various wording and formatting fixes Michael Kerrisk (man-pages)
2020-06-12 11:19 ` [PATCH 2/3] Manual pages: setpriv.1: Various minor " Michael Kerrisk (man-pages)
2020-06-12 11:19 ` Michael Kerrisk (man-pages) [this message]
2020-06-15  9:37 ` [PATCH 1/3] Manual pages: runuser.1: Various " Karel Zak

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=20200612111933.3043314-3-mtk.manpages@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.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).