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_STDOUT and it goes straight to stdout 🌈
  • pass CAPNG_PRINT_BUFFER and 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_BUFFER was selected for where, this will be the text buffer β€” and NULL on failure. don't forget to free it! πŸ™ˆ
  • if CAPNG_PRINT_STDOUT was selected, then this value will be NULL no 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 πŸ’‹βœ¨