smk_access(9)
π smk_access(9) β like, the kernel API manual page, bestie π
okay so real talk, this is smk_access(9) from the "Kernel API Manual" and it's genuinely one of those little functions that carries the whole vibe of Smack access control. no cap. let's get into it β¨
π NAME π
smk_access β determine if a subject has a specific access to an object
like, does this thing get to touch that thing? that's the whole question. slay. π«Ά
β¨ SYNOPSIS β¨
int smk_access (struct smack_known *subject , struct smack_known *object
, int request , struct smk_audit_info *a );
four arguments, one int back, iconic signature honestly π
π¦ ARGUMENTS π¦
subjectβ a pointer to the subject's Smack label entry. so, the one doing the thing πββοΈobjectβ a pointer to the object's Smack label entry. the one having the thing done to it πrequestβ the access requested, in "MAY" format. yes, capital-M "MAY", that's literally what the manpage says, iykyk πΈaβ a pointer to the audit data. the receipts, basically π
π DESCRIPTION π
so what does it actually do? this function looks up the subject/object pair in the access rule list and returns 0 if the access is permitted, non zero otherwise. that's it. that's the whole function and honestly? it ate. π₯
lowkey important: 0 = yes bestie you're allowed, non zero = nope, not today π
also worth knowing: Smack labels are shared on smack_list β so the label entries aren't special little unique snowflakes, they're shared, which is the whole point of passing pointers to them around π§
π SEE ALSO π
the whole friend group, fr fr β this all lives in the Kernel file ./security/smack/smack_access.c:
smk_access_entry(9)smk_tskacc(9)smk_curacc(9)smack_str_from_perm(9)smack_log_callback(9)smack_log(9)smk_insert_entry(9)smk_find_entry(9)smk_parse_label_len(9)smk_parse_smack(9)smk_netlbl_mls(9)smack_populate_secattr(9)smk_import_entry(9)smk_import_valid_label(9)smack_from_secid(9)smack_privileged_cred(9)smack_privileged(9)
go read all of them, they're all main characters in their own way π
kisses, this page ships out of ./security/smack and it's dated October 2026 β so yeah, bookmark it, screenshot it, send it to the group chat, mwah ππ
π¦ 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