File: capng_get_caps_process.3

package info (click to toggle)
libcap-ng 0.8.5-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 520 kB
  • sloc: ansic: 2,790; makefile: 138; python: 59; sh: 24
file content (29 lines) | stat: -rw-r--r-- 1,027 bytes parent folder | download | duplicates (2)
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
.TH "CAPNG_GET_CAPS_PROCESS" "3" "June 2009" "Red Hat" "Libcap-ng API"
.SH NAME
capng_get_caps_process \- get the capabilities from a process
.SH "SYNOPSIS"
.B #include <cap-ng.h>
.sp
int capng_get_caps_process(void);

.SH "DESCRIPTION"

capng_get_caps_process will get the capabilities and bounding set of the pid stored inside libcap-ng's state table. The default is the pid of the running process. This can be changed by using the capng_setpid function.

.SH "RETURN VALUE"

This returns 0 on success and -1 on failure.

.SH NOTES

If you are doing multi-threaded programming, calling this function will only get capabilities on the calling thread. If you want to get overall capabilities for a multi-threaded process, you can only do that before creating any threads. Afterwards, threads may be able to independently set capabilities.

capng_get_caps_process needs a mounted /proc to read the current bounding set, otherwise it will fail.

.SH "SEE ALSO"

.BR capng_setpid (3),
.BR capabilities (7)

.SH AUTHOR
Steve Grubb