CAPNG_PRINT_CAPS_TEXT(3)
β¨ CAPNG_PRINT_CAPS_TEXT β¨
okay bestie, gather round, because this is a little function from the Libcap-ng API and she is so handy π
πΈ NAME πΈ
capng_print_caps_text β she prints out the names of the values in your capabilities set π
π¦ SYNOPSIS π¦
#include <cap-ng.h>
char *capng_print_caps_text(capng_print_t where, capng_type_t which);
π DESCRIPTION π
so like, capng_print_caps_text will literally build you a text string representation of the internal capability set you specified. no cap, that's the whole job πβοΈ
and where does that pretty little string go? your choice, bestie β you pass either CAPNG_PRINT_STDOUT or CAPNG_PRINT_BUFFER for the where parameter:
CAPNG_PRINT_STDOUTβ it goes straight to stdout, main character energy πCAPNG_PRINT_BUFFERβ it goes into a buffer
π¨ and if you picked the buffer option, listen up: this function willmalloca buffer for you, and you, the caller, mustfreeit. not optional. do not ghost thatfree(), i'm begging π
now, the which parameter β the only legal values are these, and yes you gotta pick from this exact list:
CAPNG_EFFECTIVECAPNG_PERMITTEDCAPNG_INHERITABLECAPNG_BOUNDING_SETCAPNG_AMBIENT
that's the whole vibe check on which, periodt β¨
π«Ά RETURN VALUE π«Ά
depends on what you asked for, so pay attention:
- if you selected
CAPNG_PRINT_BUFFERforwhereβ you get the text buffer back, andNULLon failure. and again, don't forget tofreeit π - if you selected
CAPNG_PRINT_STDOUTβ this value will beNULLno matter what. like, always. don't come for her, that's just how it is π
π SEE ALSO π
π AUTHOR π
Steve Grubb π
and that's the tea, bestie π§ this page came to you courtesy of Red Hat, dated March 2026 β go free your buffers, ily, bye π β¨πΈ
π¦ where this page comes from
- 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
- 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
- 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