smk_curacc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… smk_curacc(9) β€” like, the Kernel API Manual one, bestie

okay so real talk, this is smk_curacc from section 9 of the Kernel API Manual and it's literally the vibes-check function for Smack access. buckle up πŸŽ€


✨ NAME ✨

smk_curacc β€” determine if current has a specific access to an object 🫢

(yes that's the whole name section, she said what she said)


🌸 SYNOPSIS 🌸

int smk_curacc (struct smack_known *obj_known , u32 mode , struct
smk_audit_info *a );

that's the signature, copy it exactly, no cap πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • obj_known β€” a pointer to the object's Smack label entry. like, the label of the thing you're trying to touch ✨
  • mode β€” the access requested, in "MAY" format πŸ”₯
  • a β€” common audit data πŸŽ€

πŸ’– DESCRIPTION πŸ’–

so what she does is: this function checks the current subject label/object label pair in the access rule list, and returns 0 if the access is permitted, non zero otherwise. iconic behaviour honestly.

and the little bonus: it allows that current may have the capability to override the rules. main character energy, she can skip the line if she's got the cap πŸ‘‘


⭐ SEE ALSO ⭐

like, go read all of them, iykyk πŸ“š


mwah, that's the page!! this gem lives over in ./security/smack and it's dated October 2026 β€” so yeah, she's from the future and she's still serving πŸ’…πŸ«Άβœ¨

πŸ“¦ where this page comes from