__netlink_ns_capable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so bestie, welcome to the Kernel API Manual πŸ’– this page is __netlink_ns_capable(9) β€” General netlink message capability test. no cap, that’s literally the whole name vibe. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

bool __netlink_ns_capable (const struct netlink_skb_parms *nsp , struct
       user_namespace *user_ns , int cap );

πŸŽ€ ARGUMENTS πŸŽ€

  • nsp β€” the NETLINK_CB of the socket buffer holding a netlink command from userspace. πŸ’Œ
  • user_ns β€” the user namespace of the capability to use. 🌈
  • cap β€” the capability to use. πŸ”₯

πŸ’… DESCRIPTION πŸ’…

okay so the actual test is a permission vibe check: it tests whether the opener of the socket we received the message from had it when the netlink socket was created, and whether the sender of the message has the capability cap in the user namespace user_ns. that’s the whole bit. πŸ‘‘


🌟 SEE ALSO 🌟

go be nosy in the kernel file ./net/netlink/af_netlink.c and check out these besties:


πŸ’– cute sign-off time: source/version is ./net/netlink, date is October 2026, and it’s the __netlink_ns_capable(9) page. bye bestie, mwah πŸ’‹

πŸ“¦ where this page comes from