check_acl(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… check_acl(9) β€” the check_acl girlies' guide

okay so this is page check_acl(9) from the Kernel API Manual, and bestie, it's literally about doing ACL permission checking πŸŽ€ no cap, it's short but it matters.


✨ SYNOPSIS ✨

int check_acl (struct mnt_idmap *idmap , struct inode *inode , int mask
);

yes she's a int, yes she takes three args, and yes you're gonna read all of them πŸ’…


🌸 ARGUMENTS 🌸

  • idmap β€” the idmap of the mount that the inode was found from. like, which mount's identity-mapping situation are we in, yk? πŸ¦‹
  • inode β€” the actual inode you wanna check permissions on. the main character fr. πŸ‘‘
  • mask β€” the right you're checking for (MAY_READ, MAY_WRITE, MAY_EXEC ...). pick your fighter ⭐

πŸ’– DESCRIPTION πŸ’–

so this function performs the ACL permission checking. that's the whole vibe. 🫢

and here's the important part β€” because this function retrieves POSIX acls, it needs to know whether it's being called from a blocking or non-blocking context. so yeah, it cares about the MAY_NOT_BLOCK bit. like genuinely cares. respect her for that lowkey 😭

so if the inode has been found through an idmapped mount, the idmap of the vfsmount must be passed through idmap. the function will then take care to map the inode according to idmap before checking permissions. slay, she handles it herself ✨

but listen β€” on non-idmapped mounts, or if permission checking is to be performed on the raw inode, just simply pass nop_mnt_idmap. that's it. that's the move. don't overthink it 🧚

🌈 SEE ALSO 🌈

Kernel file ./fs/namei.c, and literally the entire namei extended family β€” she has a LOT of cousins, iykyk πŸ’€:

like I said. huge family. ate. πŸ”₯


that's the whole page babes, go check some acls πŸ’œ

sign-off szn πŸŽ€ β€” this one's from the ./fs corner of the world, dated October 2026, and it's still check_acl(9) bestie. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from