common_perm(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… common_perm β€” the kernel manual, but make it make sense

okay so bestie, we're looking at common_perm(9) from the Kernel API Manual β€” and she's lowkey iconic. buckle up πŸŽ€


✨ NAME ✨

common_perm β€” the basic common permission check wrapper fn for paths. that's it, that's her whole job, and she ate πŸ’…


🌸 SYNOPSIS 🌸

int common_perm (const char *op , const struct path *path , u32 mask ,
       struct path_cond *cond );

so she takes four things and gives you back an int. simple. elegant. no cap. ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • op β€” the operation being checked. like, what are you even trying to do, bestie? πŸ‘€
  • path β€” the path to check permission of. and listen β€” this one is NOT NULL. she does not play about that. 🚫
  • mask β€” the requested permissions mask. basically the permission wishlist. πŸ“
  • cond β€” conditional info for the permission request. also NOT NULL. two whole NOT NULLs, she's serious. 😭
fr fr do not pass NULL for path or cond. that's not a vibe check you wanna fail πŸ’€

🌈 RETURN 🌈

returns 0 β€” or else an error code if there's an error or permission denied. so, zero means slay, anything else means go touch grass and fix your permissions 🫢


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./security/apparmor/lsm.c and honestly the whole friend group:

all linked, all relevant, all invited to the group chat πŸ’œ


and that's the whole page, bestie. this one lives in ./security/apparmor and the version tag says October 2026 β€” so she's from the future, main character energy only β­πŸ’–

πŸ“¦ where this page comes from