vec_find(9)
π 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 ofvec, 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 π
ns_cmp(9)profile_cmp(9)vec_cmp(9)aa_vec_unique(9)aa_label_alloc(9)label_cmp(9)__aa_label_next_not_in_set(9)aa_label_is_subset(9)aa_label_is_unconfined_subset(9)__label_remove(9)__label_replace(9)__label_insert(9)__vec_find(9)__label_find(9)aa_label_remove(9)aa_label_replace(9)aa_label_insert(9)aa_label_next_in_merge(9)label_merge_cmp(9)label_merge_insert(9)labelset_of_merge(9)__label_find_merge(9)aa_label_find_merge(9)aa_label_merge(9)label_compound_match(9)label_components_match(9)aa_label_match(9)aa_update_label_name(9)aa_profile_snxprint(9)aa_label_snxprint(9)aa_label_asxprint(9)aa_label_acntsxprint(9)aa_label_strn_parse(9)aa_labelset_destroy(9)__label_update(9)__labelset_update(9)__aa_labelset_update_subtree(9)
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
- 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