1CAPNG_GET_CAPS_PROCESS(3) Libcap-ng API CAPNG_GET_CAPS_PROCESS(3)
2
3
4
6 capng_get_caps_process - get the capabilities from a process
7
9 #include <cap-ng.h>
10
11 int capng_get_caps_process(void);
12
13
15 capng_get_caps_process will get the capabilities and bounding set of
16 the pid stored inside libcap-ng's state table. The default is the pid
17 of the running process. This can be changed by using the capng_setpid
18 function.
19
20
22 This returns 0 on success and -1 on failure.
23
24
26 If you are doing multi-threaded programming, calling this function will
27 only get capabilities on the calling thread. If you want to get overall
28 capabilities for a multi-threaded process, you can only do that before
29 creating any threads. Afterwards, threads may be able to independantly
30 set capabilities.
31
32 capng_get_caps_process needs a mounted /proc to read the current bound‐
33 ing set, otherwise it will fail.
34
35
37 capng_setpid(3), capabilities(7)
38
39
41 Steve Grubb
42
43
44
45Red Hat June 2009 CAPNG_GET_CAPS_PROCESS(3)