unix_maybe_add_creds(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– unix_maybe_add_creds(9) πŸ’–

okay so this page is from the Kernel API Manual, and we're about to learn how the kernel maybe adds creds to an skb. slay. πŸŽ€


🌸 NAME 🌸

unix_maybe_add_creds β€” Adds current task uid/gid and struct pid to skb if needed.


✨ SYNOPSIS ✨

int unix_maybe_add_creds (struct sk_buff *skb , const struct sock *sk ,
       const struct sock *other );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • skb β€” the skb to attach creds to. πŸ’…
  • sk β€” sender sock.
  • other β€” receiver sock.

πŸ’« DESCRIPTION πŸ’«

Some apps rely on write giving SCM_CREDENTIALS. We include credentials if source or destination socket asserted SOCK_PASSCRED. no cap, that's the whole vibe check. ✨


😴 CONTEXT 😴

May sleep.


πŸ”₯ RETURN πŸ”₯

On success zero, on error a negative error code is returned. fr fr. βœ…


πŸ‘€ SEE ALSO πŸ‘€

Kernel file ./net/unix/af_unix.c β€” go look, bestie. 🫢


catch u later, bestie β€” this one came from ./net/unix, October 2026 πŸ’œπŸ“

πŸ“¦ where this page comes from