netlink_ns_capable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, this page is from the Kernel API Manual and it’s all about netlink_ns_capable(9) β€” the general netlink message capability test. It’s giving very specific kernel security side-quest energy, and we’re gonna read every bit of it. πŸ’…βœ¨


🌸 NAME 🌸

netlink_ns_capable β€” the general netlink message capability test. No cap, except literally cap is an argument. 😌

✨ SYNOPSIS ✨

bool netlink_ns_capable (const struct sk_buff *skb , struct
       user_namespace *user_ns , int cap );

🫢 ARGUMENTS 🫢

  • skb β€” the socket buffer holding a netlink command from userspace. bestie is carrying the message. πŸ“¦
  • user_ns β€” the user namespace of the capability to use. that’s the namespace vibe check. 🌈
  • cap β€” the capability to use. yes, the cap. the moment. πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

okay so the test is: did the opener of the socket we received the message from had β€” and yes, the page literally just says had, I’m not making that up 😭 β€” when the netlink socket was created, and does the sender of the message have the capability cap in the user namespace user_ns? that’s the check. periodt. ✨

lowkey the sentence is doing the most, but the details are the details: opener of the socket, the message we received, when the netlink socket was created, sender of the message, capability cap, user namespace user_ns. all of it stays. 🫑

πŸ‘€ SEE ALSO πŸ‘€


mwah πŸ’‹ sign-off time: source/version is ./net/netlink, date is October 2026, and the page is netlink_ns_capable(9). bye bestie, go be capable! πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from