sk_capable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– sk_capable(9) πŸ’–

okay bestie, welcome to the Kernel API Manual entry for sk_capable β€” she's short, she's sweet, she's a socket capability check, and honestly? iconic. ✨


🌸 NAME 🌸

sk_capable β€” Socket global capability test 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

bool sk_capable (const struct sock *sk , int cap );

like literally that's it, that's the whole signature, no cap πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • sk β€” the socket you're gonna use a capability on, or through, if you will. the main character socket, fr fr πŸ’–
  • cap β€” the global capability you want to use. that's the one we're checking for πŸ‘‘

✨ DESCRIPTION ✨

so the vibe check here is a test βœ… β€” you're asking: did the opener of this socket already have this capability back when the socket was created? πŸ•°οΈ and does the current process have the capability cap in all user namespaces? 🌈

both of those need to be true, and if they are β€” slay, the test passes πŸ’…βœ¨

ngl, this is the "was it valid then, and is it valid now" double-check. two eras, one capability check. periodt. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

peep these, bestie β€” the whole friend group 🫢:

Kernel file ./net/core/sock.c plus:


okay that's the whole page, go be capable πŸ’œ

and finally, the cute little sign-off: this one comes from ./net/core, dated October 2026, and she's filed under sk_capable(9) in the Kernel API Manual. bye bestie, mwah πŸ˜­πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from