Skip to content

Rework internal profile storage and handling in the aa-* tools to use merged profile names instead of [profile][hat]

Christian Boltz requested to merge cboltz/apparmor:cboltz-move-storage into master

Change the tools to use merged profile names (var['foo//bar']) instead of the profile/hat layout (var[profile][hat]) in many places. Also storage gets moved to ProfileList instead of using a hasher.

Already changed places (in this MR) are parsing profiles, writing profiles, handling and storing of extra profiles, log handling and asking the user about profile additions.

Remaining usage of the var[profile][hat] layout are the aa and original_aa hashers, they'll be replaced in a separate MR.

See the individual commits for details. I'd also recommend to do the review on the individual commits, because the big diff is probably unreadable ;-)

While this is a big chain of changes, each commit contains working code, converting between the two storage layouts with split_to_merged() and merged_to_split() as needed, with merged layout "bubbling up" in more and more functions.

The long-term goal of these changes is to enable support for nested child profiles in the tools, but - one step after the other ;-)

Merge request reports