capng_get_caps_process(3)

capng_get_caps_process3

Get the capabilities from a process

Usage

#include <cap-ng.h>

int capng_get_caps_process(void);

Overview

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.

Return value

This returns 0 on success and -1 on failure.

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.

Releases

9 releases since Debian 6.0 (Squeeze); the text changed 1 time.

  1. 6.0–11
  2. 12–Arch

Author

Steve Grubb

From libcap-ng 0.9.6-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.