diff options
| author | Alejandro Colomar <alx@kernel.org> | 2024-05-28 01:00:49 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2024-05-30 15:31:13 +0200 |
| commit | e86ff924dbd313e450b34df526bc0c58dd624062 (patch) | |
| tree | 55b9b5997fdc0a89769d08b4a7da8e7d63797f62 | |
| parent | ff173b4b57b565119cb253ba8110fddec7e4f07d (diff) | |
| download | man-pages-e86ff924dbd313e450b34df526bc0c58dd624062.tar.gz | |
PR_CAP_AMBIENT.2const, PR_CAP_AMBIENT_IS_SET.2const: Split PR_CAP_AMBIENT_IS_SET from PR_CAP_AMBIENT(2const)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
| -rw-r--r-- | man/man2const/PR_CAP_AMBIENT.2const | 22 | ||||
| -rw-r--r-- | man/man2const/PR_CAP_AMBIENT_IS_SET.2const | 48 |
2 files changed, 51 insertions, 19 deletions
diff --git a/man/man2const/PR_CAP_AMBIENT.2const b/man/man2const/PR_CAP_AMBIENT.2const index 4a9d236770..2c4819e2ff 100644 --- a/man/man2const/PR_CAP_AMBIENT.2const +++ b/man/man2const/PR_CAP_AMBIENT.2const @@ -26,13 +26,8 @@ which must be one of the following: .B PR_CAP_AMBIENT_RAISE .TQ .B PR_CAP_AMBIENT_LOWER -.TP +.TQ .B PR_CAP_AMBIENT_IS_SET -The -.BR prctl () -call returns 1 if the capability in -.I cap -is in the ambient capability set and 0 if it is not. .TP .B PR_CAP_AMBIENT_CLEAR_ALL All capabilities will be removed from the ambient capability set. @@ -41,11 +36,7 @@ This operation requires setting to zero. .SH RETURN VALUE On success, -.B PR_CAP_AMBIENT_IS_SET -returns the boolean value described above. -All other -.I sub-op -values return 0 on success. +a nonnegative value is returned. On error, \-1 is returned, and .I errno is set to indicate the error. @@ -54,14 +45,6 @@ is set to indicate the error. .B EINVAL .I sub-op is not a valid value. -.TP -.B EINVAL -.I sub-op -is -.B PR_CAP_AMBIENT_IS_SET -and -.I cap -does not specify a valid capability. .SH VERSIONS Higher-level interfaces layered on top of the above operations are provided in the @@ -80,6 +63,7 @@ Linux 4.3. .BR prctl (2), .BR PR_CAP_AMBIENT_RAISE (2const), .BR PR_CAP_AMBIENT_LOWER (2const), +.BR PR_CAP_AMBIENT_IS_SET (2const), .BR libcap (3), .BR cap_get_ambient (3), .BR cap_set_ambient (3), diff --git a/man/man2const/PR_CAP_AMBIENT_IS_SET.2const b/man/man2const/PR_CAP_AMBIENT_IS_SET.2const new file mode 100644 index 0000000000..778066f1f3 --- /dev/null +++ b/man/man2const/PR_CAP_AMBIENT_IS_SET.2const @@ -0,0 +1,48 @@ +.\" Copyright 2015, Michael Kerrisk <mtk.manpages@gmail.com> +.\" Copyright 2024, Alejandro Colomar <alx@kernel.org> +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH PR_CAP_AMBIENT_IS_SET 2const (date) "Linux man-pages (unreleased)" +.SH NAME +PR_CAP_AMBIENT_IS_SET +\- +read the ambient capability set of the calling thread +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include <sys/prctl.h> +.P +.BI "int prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_IS_SET, long " cap ", 0L, 0L);" +.fi +.SH DESCRIPTION +This call +returns 1 if the capability in +.I cap +is in the ambient capability set and 0 if it is not. +.SH RETURN VALUE +On success, +this call +returns the boolean value described above. +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +.I cap +does not specify a valid capability. +.SH VERSIONS +See +.BR PR_CAP_AMBIENT (2const). +.SH STANDARDS +Linux. +.SH HISTORY +Linux 4.3. +.\" commit 58319057b7847667f0c9585b9de0e8932b0fdb08 +.SH SEE ALSO +.BR prctl (2), +.BR PR_CAP_AMBIENT (2const), +.BR libcap (3) |
