8 Commits

Author SHA1 Message Date
Andrew G. Morgan
44ab72a6f9 Update documentation for all API functions.
There were a few straggler API functions in libcap and libpsx.
Also some functions that should be hidden from references outside
the library.

Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
2023-02-19 19:43:13 -08:00
Andrew G. Morgan
8434c10a69 Be more systematic about POSIX.1e value group names
cap.Set's have Flag component Values
cap.IAB's have Vector component Values

Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
2021-09-07 10:47:45 -07:00
Samanta Navarro
e721aff543 Fix typos.
Typos found with codespell

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
2021-08-14 11:03:27 -07:00
Andrew G. Morgan
578b4cd7bf Add support for --suggest=phrase to capsh.
Ever wondered something like which capability allows a process
to do privileged things with a tty? Try this:

  capsh --suggest="tty"

cap_sys_tty_config (26) [/proc/self/status:CapXXX: 0x0000000004000000]

    Allows a process to manipulate tty devices:
      - configure tty devices
      - perform vhangup() of a tty

Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
2021-05-16 18:36:24 -07:00
Andrew G. Morgan
572b1f8099 Validate that user namespaces require CAP_SETFCAP to map UID=0.
I found this corner case privilege escalation in December 2020.
Now that it is fixed upstream and widely deployed, add a test
so we don't regress.

[If you find 'make sutotest' fails for you, you should upgrade
your kernel.]

Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
2021-05-16 16:15:28 -07:00
Andrew G. Morgan
cf6ddafe1d Add --explain=cap_foo support to capsh.
A convenience feature, so you don't have to grep the
system header, and/or wade through a man page.

This addresses:

  https://bugzilla.kernel.org/show_bug.cgi?id=212451

Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
2021-03-27 14:07:50 -07:00
Andrew G. Morgan
1b99022113 Add new value CAP_CHECKPOINT_RESTORE = 40.
Linus' kernel has defined this one now.

Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
2020-08-13 20:45:43 -07:00
Andrew G. Morgan
cae0e745e0 Some documentation for individual capability values.
I want a place to capture nuances in these files through experience
and bug reports/patches.

Make use of these to document the Go cap package definitions of each
Value so that the godoc automated documentation at places like go.dev
become more useful for actually using the package.

Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
2020-07-11 17:15:44 -07:00