1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
.\"
.\" $Id: capget.2,v 1.1.1.1 1999/04/17 22:16:31 morgan Exp $
.\" written by Andrew Morgan <morgan@linux.kernel.org>
.\"
.TH CAPGET 2 "17th May 1998" "Linux 2.1" "Linux Programmer's Manual"
.SH NAME
capget, capset \- set/get process capabilities
.SH SYNOPSIS
.B #undef _POSIX_SOURCE
.br
.B #include <sys/capability.h>
.sp
.BI "int capget(cap_user_header_t " header ", cap_user_data_t " data );
.sp
.BI "int capset(cap_user_header_t " header ", const cap_user_data_t " data );
.SH DESCRIPTION
These two functions are the raw kernel interface for getting and
setting capabilities. The kernel API is likely to change and use of
these functions (in particular the format of the
.B cap_user_*_t
types) is subject to change with each kernel revision.
.sp
These system calls are specific to Linux.
The portable interfaces are
.IR cap_set_proc (3)
and
.IR cap_get_proc (3).
.SH "RETURN VALUE"
On success, zero is returned. On error, -1 is returned, and
.I errno
is set appropriately.
.SH ERRORS
.TP
.SB EINVAL
One of the arguments was invalid.
.TP
.SB EPERM
An attempt was made to add a capability to the Permitted set, or to set
a capability in the Effective or Inheritable sets that is not in the
Permitted set.
|