CAPNG_PRINT_CAPS_NUMERIC(3)
π CAPNG_PRINT_CAPS_NUMERIC β the libcap-ng glow-up β¨
okay bestie, buckle up, because this is capng_print_caps_numeric from the Libcap-ng API, and she is literally the moment π«Ά
πΈ NAME πΈ
capng_print_caps_numeric β print numeric values for capabilities set π
β¨ SYNOPSIS β¨
#include <cap-ng.h>
char *capng_print_caps_numeric(capng_print_t where, capng_select_t set);
π DESCRIPTION π
so like, capng_print_caps_numeric makes you a numeric representation of the internal capabilities. no vibes, no names, just numbers, and honestly? iconic π
that representation can go two places, and you pick where with the where parameter:
- pass
CAPNG_PRINT_STDOUTand it goes straight to stdout π - pass
CAPNG_PRINT_BUFFERand it goes into a buffer π§
heads up bestie π¨ if you went with the buffer option, this function will malloc a buffer for you β and the caller must free it. that's on you, not her. she did her part π
then there's set, which controls what actually gets included in the representation. the legal options are:
CAPNG_SELECT_CAPSβ the traditional capabilities, the OGs πCAPNG_SELECT_BOUNDSβ the bounding set π¦CAPNG_SELECT_BOTHβ if printing both is what you desire, say less β¨CAPNG_SELECT_AMBIENTβ if you only want the ambient capabilities πΈCAPNG_SELECT_ALLβ if printing all is the vibe, go off π₯
π RETURN VALUE π
depends on the where, no cap:
- if
CAPNG_PRINT_BUFFERwas selected forwhere, this will be the text buffer β andNULLon failure. don't forget to free it! π - if
CAPNG_PRINT_STDOUTwas selected, then this value will beNULLno matter what. she said what she said π
π¦ SEE ALSO π¦
π AUTHOR π
Steve Grubb π
and that's the whole page, bestie β brought to you by <strong>Red Hat</strong>, dated <strong>Sept 2020</strong>, straight out of the <strong>Libcap-ng API</strong> era. mwah, periodt πβ¨
π¦ 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