sk_ns_capable(9)
hiii bestie π welcome to sk_ns_capable(9) from the Kernel API Manual β itβs the general socket capability test and itβs giving βtiny function, serious permission vibesβ β¨
πΈ NAME πΈ
sk_ns_capable β General socket capability test π
β¨ SYNOPSIS β¨
bool sk_ns_capable (const struct sock *sk , struct user_namespace
*user_ns , int cap );
π ARGUMENTS π
skβ Socket to use a capability on or through. yes bestie, the socket itself π§¦user_nsβ The user namespace of the capability to use. itβs the namespace context, no cap π§’capβ The capability to use. the actual capability being checked π
π¦ DESCRIPTION π¦
okay so this one is a test π it checks whether the opener of the socket had the capability when the socket was created, and whether the current process has the capability cap in the user namespace user_ns. itβs a two-part vibe check: opener-at-socket-creation time + current-process time, with cap in user_ns β both pieces are literally in the sentence, bestie π
π SEE ALSO π
- Kernel file:
./net/core/sock.c sk_capable(9)sk_net_capable(9)sk_set_memalloc(9)sk_alloc(9)sk_clone(9)skb_page_frag_refill(9)sk_wait_data(9)__sk_mem_raise_allocated(9)__sk_mem_schedule(9)__sk_mem_reduce_allocated(9)__sk_mem_reclaim(9)
okay bye bestie π«Ά this little page is from the Kernel API Manual, source ./net/core, dated October 2026 β mwah π
π¦ 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