CAPNG\_UPDATE(3) Libcap-ng API CAPNG\_UPDATE(3)

# [NAME](#NAME)

capng\_update - update the stored capabilities settings

# [SYNOPSIS](#SYNOPSIS)

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

int capng\_update(capng\_act\_t action, capng\_type\_t type,unsigned int capability);

# [DESCRIPTION](#DESCRIPTION)

capng\_update will update the internal POSIX capabilities settings based on the options passed to it. The action should be either CAPNG\_DROP to set the capability bit to 0, or CAPNG\_ADD to set the capability bit to 1. The operation is performed on the capability set specified in the type parameter. The values are: CAPNG\_EFFECTIVE, CAPNG\_PERMITTED, CAPNG\_INHERITABLE, CAPNG\_BOUNDING\_SET, or CAPNG\_AMBIENT. The values may be or'ed together to perform the same operation on multiple sets. The last parameter, capability, is the capability define as given in linux/capability.h.

# [RETURN VALUE](#RETURN_VALUE)

This returns 0 on success and -1 on failure.

# [SEE ALSO](#SEE_ALSO)

[**capng\_updatev**(3)](/man/os/libcap-ng/capng_updatev.3), [**capabilities**(7)](/man/os/libcap-ng/capabilities.7)

# [AUTHOR](#AUTHOR)

Steve Grubb

June 2009 Red Hat

---

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