common_perm_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay so bestie, welcome to common_perm_create(9) πŸ’– this one lives in the Kernel API Manual and it's literally the common permission wrapper for operations doing create. that's the whole vibe. you're checking perms before something gets made. slay.


✨ NAME ✨

common_perm_create β€” the common permission wrapper for operations doing create πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int common_perm_create (const char *op , const struct path *dir , struct
dentry *dentry , u32 mask , umode_t mode );

copy it exactly like that, no cap, the line break is part of the original and we respect the original πŸ’…


🌸 ARGUMENTS 🌸

  • op β€” the operation that's being checked. like, which thing are we doing rn πŸ‘€
  • dir β€” the directory that dentry is gonna get created in. and bestie, it's (NOT NULL) β€” do not come in here with a null, that's not the energy πŸ™ˆ
  • dentry β€” the dentry you're creating. also (NOT NULL). same rule, no nulls allowed, periodt ✨
  • mask β€” the request permission mask 🎭
  • mode β€” the mode of the file being created πŸ“

πŸ”₯ RETURN πŸ”₯

returns 0, else an error code if there's an error or permission was denied 😭 that's it, that's the contract.

lowkey important: 0 means we're good. anything else means error or permission denied β€” the doc does not separate those two for you, so don't go assuming.

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./security/apparmor/lsm.c β€” that's the source of truth, go look 🫢

that's eighteen references, i counted, we're not skipping a single one, iykyk 🌈


sign-off time 🧚 this absolute icon of a page comes from ./security/apparmor and it's dated October 2026 β€” and yes the manual name really is Kernel API Manual, we just folded it in up top instead of doing the boring header line thing πŸ’œ

go create something (with permission) bestie, mwah πŸ’‹β­

πŸ“¦ where this page comes from