capng_save_state(3)

capng_save_state3

Get the internal library state

Usage

#include <cap-ng.h>

void *capng_save_state(void);

Overview

capng_save_state is a function that returns a pointer to the internal state of the libcap-ng library. It should be considered opaque and not for alteration directly. This function should be used when you suspect a third party library may use libcap-ng also and want to make sure it doesn't alter something important. This function is not available in the python bindings.

Return value

This returns NULL on failure and a non-NULL pointer otherwise.

Notes

The structure returned by capng_save_state is malloc'd; it should be free'd if not used.

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.