CAPNG\_HAVE\_CAPABILITY(3) Libcap-ng API CAPNG\_HAVE\_CAPABILITY(3)

# [NAME](#NAME)

capng\_have\_capability - check for specific capability

# [SYNOPSIS](#SYNOPSIS)

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

int capng\_have\_capability(capng\_type\_t which, unsigned int capability);

# [DESCRIPTION](#DESCRIPTION)

capng\_have\_capability will check the specified internal capabilities set to see if the specified capability is set. The capabilities sets must be previously setup with calls to capng\_get\_caps\_process, capng\_get\_caps\_fd, or in some other way setup. The values for which should be one of: CAPNG\_EFFECTIVE, CAPNG\_PERMITTED, CAPNG\_INHERITABLE, CAPNG\_BOUNDING\_SET, or CAPNG\_AMBIENT.

# [RETURN VALUE](#RETURN_VALUE)

This function will return 1 if yes and 0 otherwise.

# [SEE ALSO](#SEE_ALSO)

[**capng\_get\_caps\_process**(3)](/man/os/libcap-ng/capng_get_caps_process.3), [**capng\_get\_caps\_fd**(3)](/man/os/libcap-ng/capng_get_caps_fd.3), [**capng\_have\_capabilities**(3)](/man/os/libcap-ng/capng_have_capabilities.3), [**capabilities**(7)](/man/os/libcap-ng/capabilities.7)

# [AUTHOR](#AUTHOR)

Steve Grubb

June 2009 Red Hat

---

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