diff options
| author | Alejandro Colomar <alx@kernel.org> | 2024-05-28 01:06:54 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2024-05-30 15:31:13 +0200 |
| commit | b0d95a880d16b1f684b7a03cee25b5700781c703 (patch) | |
| tree | 1504ecd8eed923542f2bc001d5ed0aa0cb8c205e | |
| parent | e86ff924dbd313e450b34df526bc0c58dd624062 (diff) | |
| download | man-pages-b0d95a880d16b1f684b7a03cee25b5700781c703.tar.gz | |
PR_CAP_AMBIENT.2const, PR_CAP_AMBIENT_CLEAR_ALL.2const: Split PR_CAP_AMBIENT_CLEAR_ALL from PR_CAP_AMBIENT(2const)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
| -rw-r--r-- | man/man2const/PR_CAP_AMBIENT.2const | 13 | ||||
| -rw-r--r-- | man/man2const/PR_CAP_AMBIENT_CLEAR_ALL.2const | 39 |
2 files changed, 44 insertions, 8 deletions
diff --git a/man/man2const/PR_CAP_AMBIENT.2const b/man/man2const/PR_CAP_AMBIENT.2const index 2c4819e2ff..2b872a1f23 100644 --- a/man/man2const/PR_CAP_AMBIENT.2const +++ b/man/man2const/PR_CAP_AMBIENT.2const @@ -15,12 +15,12 @@ Standard C library .nf .B #include <sys/prctl.h> .P -.BI "int prctl(PR_CAP_AMBIENT, long " sub-op ", long " cap ", 0L, 0L);" +.BI "int prctl(PR_CAP_AMBIENT, long " op ", ...);" .fi .SH DESCRIPTION Reads or changes the ambient capability set of the calling thread, according to the value of -.IR sub-op , +.IR op , which must be one of the following: .TP .B PR_CAP_AMBIENT_RAISE @@ -28,12 +28,8 @@ which must be one of the following: .B PR_CAP_AMBIENT_LOWER .TQ .B PR_CAP_AMBIENT_IS_SET -.TP +.TQ .B PR_CAP_AMBIENT_CLEAR_ALL -All capabilities will be removed from the ambient capability set. -This operation requires setting -.I cap -to zero. .SH RETURN VALUE On success, a nonnegative value is returned. @@ -43,7 +39,7 @@ is set to indicate the error. .SH ERRORS .TP .B EINVAL -.I sub-op +.I op is not a valid value. .SH VERSIONS Higher-level interfaces layered on top of the above operations are @@ -64,6 +60,7 @@ Linux 4.3. .BR PR_CAP_AMBIENT_RAISE (2const), .BR PR_CAP_AMBIENT_LOWER (2const), .BR PR_CAP_AMBIENT_IS_SET (2const), +.BR PR_CAP_AMBIENT_CLEAR_ALL (2const), .BR libcap (3), .BR cap_get_ambient (3), .BR cap_set_ambient (3), diff --git a/man/man2const/PR_CAP_AMBIENT_CLEAR_ALL.2const b/man/man2const/PR_CAP_AMBIENT_CLEAR_ALL.2const new file mode 100644 index 0000000000..f31971812d --- /dev/null +++ b/man/man2const/PR_CAP_AMBIENT_CLEAR_ALL.2const @@ -0,0 +1,39 @@ +.\" 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_CLEAR_ALL 2const (date) "Linux man-pages (unreleased)" +.SH NAME +PR_CAP_AMBIENT_CLEAR_ALL +\- +clear 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 +.B int prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL, 0L, 0L, 0L); +.fi +.SH DESCRIPTION +All capabilities will be removed from the ambient capability set. +.SH RETURN VALUE +On success, +0 is returned. +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.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) |
