vec_find(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vec_find(9) β€” find label @l in label set

okay so this is vec_find, straight out of the Kernel API Manual, and it's one of those lil functions that does exactly one job and does it iconically ✨


🌸 SYNOPSIS 🌸

struct aa_label * vec_find (struct aa_profile **vec , int n );

that's the whole signature bestie, no cap β€” it hands you back a struct aa_label * 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • vec β€” the array of profiles we're finding an equiv label for. and like… it is NOT NULL, okay? please do not pass NULL, this is not that kind of party πŸ’€
  • n β€” the length of vec, bestie. yes you have to know how long your own array is, i don't make the rules πŸ‘‘

⭐ RETURN ⭐

if the vec equiv is in the tree you get a refcounted label back β€” refcounted!! so like, it's yours but also kind of not, handle it responsibly 🫢

if the vec equiv is not in the tree you get NULL. that's it. that's the whole vibe check 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

this function is lowkey part of a whole squad, and the squad lives in the kernel file ./security/apparmor/label.c β€” here's the full group chat πŸ’–


and that's the page, bestie πŸ’œ it's from ./security/apparmor, version vibes October 2026, and the manual page itself is vec_find(9) β€” go forth and find those labels, slay πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from