aa_label_replace(9)
π 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
- 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