---
name: "capng_have_capability"
section: "3"
platform: "linux"
package: "libcap-ng"
version: "0.9.6-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/capng_have_capability"
---

# capng\_have\_capability(3)

check for specific capability

## NAME

capng\_have\_capability - check for specific capability

## SYNOPSIS

**#include \<cap-ng.h\>**

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

## 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

This function will return 1 if yes and 0 otherwise.

## SEE ALSO

[**capng\_get\_caps\_process**(3)](/capng_get_caps_process/3.md), [**capng\_get\_caps\_fd**(3)](/capng_get_caps_fd/3.md), [**capng\_have\_capabilities**(3)](/capng_have_capabilities/3.md), [**capabilities**(7)](/capabilities/7.md)

## AUTHOR

Steve Grubb
