CAPNG\_PRINT\_CAPS\_NUMERIC(3) Libcap-ng API CAPNG\_PRINT\_CAPS\_NUMERIC(3)

# [NAME](#NAME)

capng\_print\_caps\_numeric - print numeric values for capabilities set

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;cap-ng.h&gt;**

char \*capng\_print\_caps\_numeric(capng\_print\_t where, capng\_select\_t set);

# [DESCRIPTION](#DESCRIPTION)

capng\_print\_caps\_numeric will create a numeric representation of the internal capabilities. The representation can be sent to either stdout or a buffer by passing CAPNG\_PRINT\_STDOUT or CAPNG\_PRINT\_BUFFER respectively for the where parameter. If the option was for a buffer, this function will malloc a buffer that the caller must free.

The set parameter controls what is included in the representation. The legal options are CAPNG\_SELECT\_CAPS for the traditional capabilities, CAPNG\_SELECT\_BOUNDS for the bounding set, CAPNG\_SELECT\_BOTH if printing both is desired, CAPNG\_SELECT\_AMBIENT if only printing the ambient capabilities, or CAPNG\_SELECT\_ALL if printing all is desired.

# [RETURN VALUE](#RETURN_VALUE)

If CAPNG\_PRINT\_BUFFER was selected for where, this will be the text buffer and NULL on failure. Don't forget to free it. If CAPNG\_PRINT\_STDOUT was selected then this value will be NULL no matter what.

# [SEE ALSO](#SEE_ALSO)

[**capng\_print\_caps\_text**(3)](/man/os/libcap-ng/capng_print_caps_text.3), [**capabilities**(7)](/man/os/libcap-ng/capabilities.7)

# [AUTHOR](#AUTHOR)

Steve Grubb

Sept 2020 Red Hat

---

Document: capng_print_caps_numeric(3) from libcap-ng 0.9.6-r0 (Chainguard OS)
Source: https://github.com/stevegrubb/libcap-ng.git
