label_compound_match(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… label_compound_match(9) πŸ’…

okay so bestie, we're deep in the Kernel API Manual today β€” this is label_compound_match(9), and no cap, it's giving "the AppArmor internals page you read at 2am" energy. let's get into it 🫢


✨ NAME ✨

label_compound_match β€” literally the function that finds perms for a full compound label. that's the whole vibe. πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

int label_compound_match (const struct aa_profile *profile , struct
aa_ruleset *rules , struct aa_label *label , aa_state_t state , bool
inview , u32 request , struct aa_perms *perms );

like yes she's a long signature but she ate, fr fr πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • profile β€” the profile you're finding perms for, bestie. that's the one. πŸ“
  • rules β€” the ruleset we're searching through, iykyk.
  • label β€” the label whose access permissions we're checking. main character energy tbh.
  • state β€” the state to start the match in. where we begin our little journey ✨
  • inview β€” whether to match labels in view, or only in scope. two very different vibe checks 😌
  • request β€” the permissions you're requesting. ask and you shall receive (maybe).
  • perms β€” the perms struct we're gonna set. she's the output, she's iconic.

πŸ”₯ RETURN πŸ”₯

the state match stopped at, OR DFA_NOMATCH if it aborted early. so like, either you get a state or you get shut down πŸ’€


🌈 DESCRIPTION 🌈

okay so picture the label A//B//C β€” this function does the perm match for A//B//C. and listen, perms should be preinitialized with allperms OR a previous permission check to be stacked. no skipping that step, that's the rule πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./security/apparmor/label.c, plus the whole friend group:


and that's the page, bestie πŸ’œ this one came from ./security/apparmor, stamped October 2026, and yeah β€” that's the whole label_compound_match(9) moment. slay, study it, and go read some AppArmor source 🧚✨

πŸ“¦ where this page comes from