CAPNG_UPDATE(3)
π CAPNG_UPDATE(3) π
okay bestie, welcome to the Libcap-ng API corner of the manual β this one's called capng_update and it's genuinely so useful, let me tell you everything π«Ά
β¨ NAME β¨
capng_update β update the stored capabilities settings π
πΈ SYNOPSIS πΈ
#include <cap-ng.h>
int capng_update(capng_act_t action, capng_type_t type,unsigned int
capability);
(no cap, that's literally the whole signature, comma spacing and all, don't touch it π)
π¦ DESCRIPTION π¦
so like, capng_update goes in and updates the internal POSIX capabilities settings based on whatever options you hand it. it's giving very "i'm editing the vibe of my capability bits" energy β¨
the action is a whole choose-your-own-adventure, but there's only two choices and both are iconic:
CAPNG_DROPβ sets the capability bit to 0 π (bye bit, you're gone)CAPNG_ADDβ sets the capability bit to 1 π (bit is back, she's thriving)
the operation lands on whichever capability set you named in the type parameter. the possible values are, in all their glory:
CAPNG_EFFECTIVECAPNG_PERMITTEDCAPNG_INHERITABLECAPNG_BOUNDING_SETCAPNG_AMBIENT
and here's the slay part β those values can be or'ed together so you do the exact same operation on multiple sets at once. multitasking queen behavior fr fr π₯
last but never least, the capability parameter is the capability define, as given in linux/capability.h. that's it, that's the whole thing, periodt π
π RETURN VALUE π
0β success, we ate π-1β failure, not the vibe π
π SEE ALSO π
iykyk π
π AUTHOR π
Steve Grubb β thank you king, we appreciate you π«Ά
okay that's the whole page bestie, sending you off with the deets: this one's from the Libcap-ng API fam, brought to you by Red Hat, dated June 2009 β yes she's an elder but she still serves π β¨ bye now! π§π
π¦ where this page comes from
- alpine 3.22: libcap-ng-doc 0.8.5-r0 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- alpine 3.23: libcap-ng-doc 0.8.5-r0 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- alpine 3.24: libcap-ng-doc 0.8.5-r2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- arch rolling: libcap-ng 0.9.6-1 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- centos-stream 10: libcap-ng-devel 0.9.3-2.el10 Β· LGPL-2.0-or-later
- debian trixie: libcap-ng-dev 0.8.5-4+b1 Β· LGPL-2.1-or-later
- fedora 43: libcap-ng-devel 0.8.5-8.fc43 Β· LGPL-2.0-or-later
- fedora 43: libcap-ng-devel 0.8.5-8.fc43 Β· LGPL-2.0-or-later
- fedora 43: libcap-ng-devel 0.9.6-1.fc43 Β· LGPL-2.0-or-later
- fedora 43: libcap-ng-devel 0.9.6-1.fc43 Β· LGPL-2.0-or-later
- fedora 44: libcap-ng-devel 0.9.2-1.fc44 Β· LGPL-2.0-or-later
- fedora 44: libcap-ng-devel 0.9.2-1.fc44 Β· LGPL-2.0-or-later
- fedora 44: libcap-ng-devel 0.9.6-1.fc44 Β· LGPL-2.0-or-later
- fedora 44: libcap-ng-devel 0.9.6-1.fc44 Β· LGPL-2.0-or-later
- nixos 26.05: libcap-ng 0.9.3
- nixpkgs unstable: libcap-ng 0.9.6
- opensuse-leap 16.0: libcap-ng-devel 0.8.5-160000.3.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libcap-ng-devel 0.8.5-160000.3.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libcap-ng-devel 0.8.5-160000.3.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libcap-ng-devel 0.8.5-160000.3.2 Β· LGPL-2.1-or-later
- ubuntu noble: libcap-ng-dev 0.8.4-2build2 Β· LGPL-2.1-or-later
- ubuntu questing: libcap-ng-dev 0.8.5-4build2
- ubuntu resolute: libcap-ng-dev 0.8.5-4build5 Β· LGPL-2.1-or-later
- ubuntu stonking: libcap-ng-dev 0.9.6-1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms