smk_fill_rule(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… smk_fill_rule β€” like, the whole vibe check

okay so first things first bestie, we're in the Kernel API Manual, section 9, and today's main character is smk_fill_rule. it's giving "tiny function, big responsibilities" energy ngl πŸŽ€

✨ NAME ✨

smk_fill_rule β€” Fill Smack rule from strings πŸ¦‹

like literally, it takes your lil strings and turns them into a real, actual Smack rule. no cap.


🌸 SYNOPSIS 🌸

int smk_fill_rule (const char *subject , const char *object , const char
     *access1 , const char *access2 , struct smack_parsed_rule *rule , int
     import , int len );

she takes seven arguments and returns an int, periodt πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

okay so let's meet the cast, each one is doing their own iconic thing:

  • subject β€” the subject label string 🫢 literally who's doing the thing.
  • object β€” the object label string ✨ literally what's being done to.
  • access1 β€” an access string, the permissions she's bringing to the table.
  • access2 β€” a string with the permissions to be removed 😭 yes, we're taking some away.
  • rule β€” the Smack rule itself, a struct smack_parsed_rule. this is where it all lands, she's the main character fr.
  • import β€” if it's non-zero, import labels πŸ‘‘ that's the whole job.
  • len β€” the label length limit. don't go over it bestie, that's the limit.

πŸ’– DESCRIPTION πŸ’–

Returns 0 on success, and an appropriate error code on failure 🌈

that's it, that's the description. short and slay. if you got 0 you ate, if you got an error code, well... πŸ’€ at least it tells you what went wrong.


⭐ SEE ALSO ⭐

the whole squad, the entire group chat, everyone's invited πŸ§šβ€β™€οΈπŸ’œ β€” plus the kernel file ./security/smack/smackfs.c:

iykyk πŸ’«


and that's the page, bestie πŸ“ this cutie came to you straight outta ./security/smack, from October 2026 β€” stay hydrated, read your label length limits, and slay πŸ’…πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from