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

# [NAME](#NAME)

capng\_print\_caps\_text - print names of values for capabilities set

# [SYNOPSIS](#SYNOPSIS)

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

char \*capng\_print\_caps\_text(capng\_print\_t where, capng\_type\_t which);

# [DESCRIPTION](#DESCRIPTION)

capng\_print\_caps\_text will create a text string representation of the internal capability set specified. 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 legal values for the which parameter is CAPNG\_EFFECTIVE, CAPNG\_PERMITTED, CAPNG\_INHERITABLE, CAPNG\_BOUNDING\_SET, or CAPNG\_AMBIENT.

# [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\_numeric**(3)](/man/os/libcap-ng/capng_print_caps_numeric.3), [**capabilities**(7)](/man/os/libcap-ng/capabilities.7)

# [AUTHOR](#AUTHOR)

Steve Grubb

March 2026 Red Hat

---

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