1CAPGET(2)                  Linux Programmer's Manual                 CAPGET(2)
2
3
4

NAME

6       capget, capset - set/get process capabilities
7

SYNOPSIS

9       #undef _POSIX_SOURCE
10       #include <sys/capability.h>
11
12       int capget(cap_user_header_t header, cap_user_data_t data);
13
14       int capset(cap_user_header_t header, const cap_user_data_t data);
15

DESCRIPTION

17       These  two  functions are the raw kernel interface for getting and set‐
18       ting capabilities.  The kernel API is likely to change and use of these
19       functions  (in particular the format of the cap_user_*_t types) is sub‐
20       ject to change with each kernel revision.
21
22       These system calls are specific to Linux.  The portable interfaces  are
23       cap_set_proc(3) and cap_get_proc(3).
24

RETURN VALUE

26       On  success,  zero is returned.  On error, -1 is returned, and errno is
27       set appropriately.
28

ERRORS

30       EINVAL One of the arguments was invalid.
31
32       EPERM  An attempt was made to add a capability to the Permitted set, or
33              to set a capability in the Effective or Inheritable sets that is
34              not in the Permitted set.
35
36
37
38
39
40Linux 2.1                        17th May 1998                       CAPGET(2)
Impressum