common_perm_cond(9)
π common_perm_cond(9) π
okay bestie, welcome to the Kernel API Manual β¨ this is common_perm_cond, and honestly it's lowkey the permission bouncer of the inode world π«Ά it's the common permission wrapper around inode cond, periodt.
πΈ NAME πΈ
common_perm_cond β the common permission wrapper around inode cond π
like, it wraps the permission check so you don't have to, iykyk.
β¨ SYNOPSIS β¨
int common_perm_cond (const char *op , const struct path *path , u32
mask );
π ARGUMENTS π
opβ the operation being checked π literally the "what are we even doing here" string.pathβ the location to check, and bestie this one is NOT NULL π¨ like do not come for this function with aNULLpath, it's not the vibe.maskβ the requested permissions mask π₯ the actual list of perms you're asking for.
π RETURN π
0 if you're slaying β
β otherwise an error code if there's an error or permission was denied π no in-between, no wiggle room.
π¦ SEE ALSO π¦
the kernel file is ./security/apparmor/lsm.c and it's the main character here π β go read these too, they're all part of the same friend group:
common_perm(9)common_perm_dir_dentry(9)common_perm_rm(9)common_perm_create(9)apparmor_uring_override_creds(9)apparmor_uring_sqpoll(9)apparmor_bprm_committing_creds(9)apparmor_bprm_committed_creds(9)apparmor_sk_clone_security(9)apparmor_unix_stream_connect(9)apparmor_unix_may_send(9)apparmor_socket_post_create(9)apparmor_socket_bind(9)apparmor_socket_getpeersec_stream(9)apparmor_socket_getpeersec_dgram(9)apparmor_sock_graft(9)apparmor_socket_sock_rcv_skb(9)set_init_ctx(9)
ngl bestie, remember: path is NOT NULL. that's not a suggestion, that's the whole vibe check. π
okay that's the page!! π this one came from ./security/apparmor π, dated October 2026 β β mwah, go touch some inodes, ily π«Άππ§
π¦ 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