unix_maybe_add_creds(9)
π 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
- 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