sys_capget(9)
π sys_capget(9) β from the Kernel API Manual, bestie π
okay so picture this: you're deep in the kernel, the vibes are immaculate, and you need to know what a process is actually allowed to do. that's this function. it's sys_capget, and it's literally the "get the capabilities of a given process" girlie. no cap. π
β¨ SYNOPSIS β¨
long sys_capget (cap_user_header_t header , cap_user_data_t dataptr );
that's the whole signature, bestie β she's short and she knows it π«Ά
πΈ ARGUMENTS πΈ
headerβ a pointer to a struct that holds the capability version and the target pid data. it's giving "who am I asking about and in what format" energy πdataptrβ a pointer to a struct that contains the effective, permitted, and inheritable capabilities that are returned. this is where the tea gets spilled back to you π
π DESCRIPTION π
so basically: returns 0 on success and < 0 on error. that's it. that's the whole description. short, sweet, iconic. β
like, if you get a 0 back you're slaying; if you get something < 0 you're in your flop era and need to check what went wrong π
π₯ SEE ALSO π₯
- Kernel file
./kernel/capability.c sys_capset(9)has_ns_capability(9)has_ns_capability_noaudit(9)has_capability_noaudit(9)ns_capable(9)ns_capable_noaudit(9)ns_capable_setid(9)capable(9)capable_noaudit(9)file_ns_capable(9)privileged_wrt_inode_uidgid(9)capable_wrt_inode_uidgid(9)ptracer_capable(9)
all of these are your mutuals β go say hi, they're all in their capability-checking bag and honestly? obsessed. π
no warnings in the original, but like, always vibe-check your pointers before you pass them, iykyk π
okay that's the whole page, bestie!! courtesy of ./kernel, dated October 2026, filed under sys_capget(9) β mwah, go get those capabilities ππ§ββοΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms