mirror of https://github.com/mkerrisk/man-pages
capget.2: Use syscall(SYS_...); for system calls without a wrapper
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
149eb741d7
commit
00e4779ad7
|
@ -18,14 +18,17 @@
|
|||
capget, capset \- set/get capabilities of thread(s)
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <sys/capability.h>
|
||||
.RB " /* Definition of " CAP_* " and " \
|
||||
_LINUX_CAPABILITY_* " constants */"
|
||||
.B #include <linux/capability.h>
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int capget(cap_user_header_t " hdrp ", cap_user_data_t " datap );
|
||||
.BI "int capset(cap_user_header_t " hdrp ", const cap_user_data_t " datap );
|
||||
.BI "int syscall(SYS_capget, cap_user_header_t " hdrp ,
|
||||
.BI " cap_user_data_t " datap );
|
||||
.BI "int syscall(SYS_capset, cap_user_header_t " hdrp ,
|
||||
.BI " const cap_user_data_t " datap );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There are no glibc wrappers for these system calls; see NOTES.
|
||||
.SH DESCRIPTION
|
||||
These two system calls are the raw kernel interface for getting and
|
||||
setting thread capabilities.
|
||||
|
@ -40,7 +43,7 @@ The portable interfaces are
|
|||
.BR cap_set_proc (3)
|
||||
and
|
||||
.BR cap_get_proc (3);
|
||||
if possible, you should use those interfaces in applications.
|
||||
if possible, you should use those interfaces in applications; see NOTES.
|
||||
.\"
|
||||
.SS Current details
|
||||
Now that you have been warned, some current kernel details.
|
||||
|
@ -239,9 +242,6 @@ No such thread.
|
|||
.SH CONFORMING TO
|
||||
These system calls are Linux-specific.
|
||||
.SH NOTES
|
||||
Glibc does not provide a wrapper for this system call; call it using
|
||||
.BR syscall (2).
|
||||
.PP
|
||||
The portable interface to the capability querying and setting
|
||||
functions is provided by the
|
||||
.I libcap
|
||||
|
|
Loading…
Reference in New Issue