Debian Codegraph @

doc/old/_setproccap.2

raw
1 .\"
2 .\" $Id: _setproccap.2,v 1.1.1.1 1999/04/17 22:16:31 morgan Exp $
3 .\" written by Andrew Main <[email protected]>
4 .\"
5 .TH _SETPROCCAP 2 "26th April 1997" "Linux 2.1" "Linux Programmer's Manual"
6 .SH NAME
7 _setproccap, _getproccap \- set/get process capabilities
8 .SH SYNOPSIS
9 .B #include <sys/capability.h>
10 .sp
11 .BI "int _setproccap(size_t " usize ", __cap_s const *" iset ", __cap_s const *" pset ", __cap_s const *" eset );
12 .sp
13 .BI "int _getproccap(size_t " usize ", __cap_s *" iset ", __cap_s *" pset ", __cap_s *" eset );
14 .SH DESCRIPTION
15 .B _setproccap
16 sets the calling process'
17 Inheritable, Permitted and Effective capabilities to the sets specified.
18 A NULL pointer specifies that a set should not be changed.
19 .PP
20 .B _getproccap
21 copies the process' capability sets into the sets provided.
22 A NULL pointer specifies that a set should not be returned.
23 .PP
24 The
25 .I usize
26 argument specifies the size of the user-space capability sets, in bytes.
27 If the kernel uses a different size internally, it will truncate or
28 zero-fill as required.
29 .SH "RETURN VALUE"
30 On success, zero is returned. On error, -1 is returned, and
31 .I errno
32 is set appropriately.
33 .SH ERRORS
34 .TP
35 .SB EFAULT
36 One of the capability arguments was an invalid data pointer.
37 .TP
38 .SB EPERM
39 An attempt was made to add a capability to the Permitted set, or to set
40 a capability in the Effective or Inheritable sets that is not in the
41 Permitted set.
42 .TP
43 .SB ENOSYS
44 The POSIX.1e capability system was not configured into the kernel.
45 .SH "CONFORMING TO"
46 These system calls are specific to Linux.
47 The portable interfaces are
48 .IR cap_set_proc (3)
49 and
50 .IR cap_get_proc (3).
51 .SH "SEE ALSO"
52 .IR _setfilecap (2).