sysdecode_cap_rights(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’… sysdecode_cap_rights(3) β€” bestie edition

okay so bestie, gather round, because we're talking about sysdecode_cap_rights from the Library Functions Manual, living in the libsysdecode library, and honestly? it's giving "tiny function, big brain energy" πŸ’–


✨ NAME ✨

sysdecode_cap_rights β€” outputs a list of capability rights, periodt πŸ’…


πŸŽ€ LIBRARY πŸŽ€

library β€œlibsysdecode” β€” that's the one, bestie, that's where she lives πŸ¦‹


🌸 SYNOPSIS 🌸

#include <sysdecode.h>

void
sysdecode_cap_rights(FILE *fp, cap_rights_t *rightsp);

🧚 DESCRIPTION 🧚

okay so here's the vibe: sysdecode_cap_rights() outputs a comma-separated list of capability rights at rightsp to the stream fp. literally just writes them out, comma-separated, into your stream, no cap πŸ”₯

now this is the part where you gotta pay attention, bestie, because it's lowkey the whole personality of this function πŸ‘€ β€” some capability rights are supersets of others. for example, CAP_PREAD is the union of CAP_READ and CAP_SEEK. iconic of her, honestly.

so what does sysdecode_cap_rights() do about that? she emits a minimal list of rights whose union is equal to *rightsp. the way that she's out here being efficient with her words πŸ’…

fr fr, here's the example: if both CAP_READ and CAP_SEEK are set in *rightsp, then sysdecode_cap_rights() will include only CAP_PREAD in the output list. like, she said "i know what you meant" and just said it once. main character energy πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

  • sysdecode(3) β€” go read the rest of the family, they're all slaying together 🫢

and that's the whole page, bestie!! this one's from Debian, dated April 11, 2022, and it's sysdecode_cap_rights(3) signing off β€” mwah πŸ’‹πŸŽ€βœ¨

πŸ“¦ where this page comes from