aa_label_replace(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… aa_label_replace β€” the glow-up swap for labels ✨

Okay bestie, so this is a page from the Kernel API Manual (yes, the kernel has a manual, and yes it's kind of iconic). Today's main character is aa_label_replace β€” AppArmor label edition πŸŽ€


🌸 NAME 🌸

aa_label_replace β€” swap out a label @old for a brand-new version @new πŸ’– like a wardrobe change but for label structs


✨ SYNOPSIS ✨

bool aa_label_replace (struct aa_label *old , struct aa_label *new );

That's it, that's the whole vibe check 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • old β€” the label you're replacing. the one getting upgraded, bestie πŸ₯²
  • new β€” the label doing the replacing. the new fit, the fresh face πŸ’…

⭐ RETURN ⭐

Returns true if old was actually in the tree and got replaced. πŸ’–

Otherwise? false β€” meaning old was not in the tree, and new was not inserted either. no cap, nothing happened πŸ™ˆ


πŸ”₯ DESCRIPTION πŸ”₯

So here's the tea: this replacement can involve two different labelsets, which means it has to be handled very carefully 😭 because a double lock may be required. Lowkey high-stakes, so like… respect the locking, bestie. πŸ”’βœ¨


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./security/apparmor/label.c β€” plus the whole extended friend group: 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), vec_find(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) πŸŒˆπŸ’«


That's the whole page, bestie β€” go forth and replace responsibly πŸ§šβ€β™€οΈπŸ’œ This gem lives under ./security/apparmor in the Kernel API Manual, dated October 2026. slay πŸ’…βœ¨

πŸ“¦ where this page comes from