label_merge_cmp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ label_merge_cmp(9) ✨

hey bestie!! πŸ’– welcome to the label_merge_cmp(9) page β€” this is from the Kernel API Manual and it's giving serious AppArmor label energy, no cap 🫢


🌸 NAME 🌸

label_merge_cmp β€” cmp of @a merging with @b against @z for set ordering

like literally it compares stuff, iykyk πŸ’…


✨ SYNOPSIS ✨

int label_merge_cmp (struct aa_label *a , struct aa_label *b , struct
aa_label *z );

πŸŽ€ ARGUMENTS πŸŽ€

  • a β€” label to merge then compare (NOT NULL) πŸ‘€
  • b β€” label to merge then compare (NOT NULL) πŸ‘€
  • z β€” label to compare merge against (NOT NULL) πŸ‘€

okay so all three are NOT NULL β€” that's a whole lot of NOT NULL energy, don't come at this function with NULLs fr fr 😭


πŸ¦‹ DESCRIPTION πŸ¦‹

Assumes: using the most recent versions of a, b, and z

like... the most recent versions. don't be showing up with stale labels bestie, that's not the vibe πŸ’€


πŸ”₯ RETURN πŸ”₯

  • <0 if a < b
  • ==0 if a == b
  • >0 if a > b

negative vibes mean a comes first, zero means they're twinning, positive means b gets the main character slot πŸ‘‘


🌈 SEE ALSO 🌈

Kernel file ./security/apparmor/label.c

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), vec_find(9), aa_label_insert(9), aa_label_next_in_merge(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)

that's a LOT of friends β€” this function is clearly the social butterfly of the label.c friend group πŸ¦‹βœ¨


source vibes: ./security/apparmor πŸ’… big thanks to the AppArmor gang for this one! october 2026 was when this masterpiece dropped, and honestly? we're obsessed πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from