---
name: "capng_have_capabilities"
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_capabilities"
---

# capng\_have\_capabilities(3)

## NAME

```
capng_have_capabilities, capng_have_permitted_capabilities - check for capabilities
```

## SYNOPSIS

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

capng\_results\_t capng\_have\_capabilities(capng\_select\_t set); capng\_results\_t capng\_have\_permitted\_capabilities(void);

## DESCRIPTION

capng\_have\_capabilities will check the selected internal capabilities sets to see what the status is. 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 options are CAPNG\_SELECT\_CAPS for the traditional capabilities, CAPNG\_SELECT\_BOUNDS for the bounding set, CAPNG\_SELECT\_BOTH if checking both are desired, CAPNG\_SELECT\_AMBIENT if only checking the ambient capabilities, or CAPNG\_SELECT\_ALL if testing all sets is desired. When capabilities are checked, it will only look at the effective capabilities.

If, however, the source of capabilities comes from a file, then you may need to additionally check the permitted capabilities. It's for this reason that **capng\_have\_permitted\_capabilities** was created. It takes no arguments because it simply checks the permitted set.

## RETURN VALUE

This function will return one of the following four self explanatory values: CAPNG\_FAIL, CAPNG\_NONE, CAPNG\_PARTIAL, CAPNG\_FULL.

## 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\_capability**(3)](/capng_have_capability/3.md), [**capabilities**(7)](/capabilities/7.md)

## AUTHOR

Steve Grubb
