aa_vec_unique(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ aa_vec_unique(9) ✨

okay so bestie, this is a page from the Kernel API Manual and it's literally about tidying up a list of profiles β€” sorting them, merging them, yeeting the dupes. it's aa_vec_unique, and it's giving "clean up your room but make it kernel code" πŸ’…


🌸 NAME 🌸

aa_vec_unique β€” canonical sort and unique a list of profiles

like, it sorts the list into canonical order and collapses duplicates, all in one go. obsessed 🫢


πŸŽ€ SYNOPSIS πŸŽ€

int aa_vec_unique (struct aa_profile **vec , int n , int flags );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • vec β€” the list of profiles you want sorted and merged. that's your whole little friend group, lined up 🧚
  • n β€” how many refcounted profiles are in that list. important: n > 0, so don't come in here with an empty list, bestie 😭
  • flags β€” the null terminator flags of vec. yeah, it's flags, it's doing flag things πŸ’€

⭐ RETURN ⭐

returns the number of duplicates eliminated β€” which is exactly the same as references put. one number, two ways of saying it, iconic πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

okay so here's the vibe check on this one:

if flags & VEC_FLAG_TERMINATE is true, then vec has a null terminator sitting right there at vec[n], and it will null terminate vec[n - dups]. no cap, that's the whole note πŸ“


🌈 SEE ALSO 🌈

bestie there are so many friends in this list, buckle up πŸŽ€ these all live in the kernel file ./security/apparmor/label.c:


anyway that's the page πŸ¦‹ it came from ./security/apparmor and it's dated October 2026 β€” so yeah, it's from the future, main character energy fr fr πŸ’œβœ¨

πŸ“¦ where this page comes from