mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 22:05:27 +00:00
... instead of filelist[file]['lvar'], and also write them from there. Also fix detection of variable definitions inside a profile, which is not allowed. Note that ProfileList has a different write order than the old code - first includes, then variable definitions. This makes more sense because typical profiles first include tunables/global, and then define additonal variables (that might use variables from tunables/global) or extend variables defined in tunables/global. This change also fixes some problems with the simple_test test profiles. The "adding to non-existing variable" check currently doesn't exist, which "fixes" lp:1331856. OTOH this also means that such cases are not detected, therefore add vars_bad_add_assignment_1.sd to the exception_not_raised list. The check will be re-added in a later commit in get_all_merged_variables().
Known Bugs: Will allow multiple letters in the () due to translation/unicode issues with regexing the key. User input will probably bug out in a different locale.