mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Change 'aa' from hasher to dict
If there's still some code left that tries to access an uninitialized item in 'aa' (reading or writing), this will result in a very visible crash instead of silently seeming to work. Testing shows that we seem to correctly initialize each item in 'aa' (no crashes), therefore let's hope the best ;-)
This commit is contained in:
parent
ebd4143ca2
commit
32acb228f9
1 changed files with 3 additions and 3 deletions
|
@ -96,7 +96,7 @@ user_globs = {}
|
|||
# let ask_addhat() remember answers for already-seen change_hat events
|
||||
transitions = {}
|
||||
|
||||
aa = hasher() # Profiles originally in sd, replace by aa
|
||||
aa = {} # Profiles originally in sd, replace by aa
|
||||
original_aa = hasher()
|
||||
### end our
|
||||
|
||||
|
@ -113,7 +113,7 @@ def reset_aa():
|
|||
|
||||
global aa, include, active_profiles, original_aa
|
||||
|
||||
aa = hasher()
|
||||
aa = {}
|
||||
include = dict()
|
||||
active_profiles = ProfileList()
|
||||
original_aa = hasher()
|
||||
|
@ -1665,7 +1665,7 @@ def read_profiles(ui_msg=False, skip_profiles=[]):
|
|||
# The skip_profiles parameter should only be specified by tests.
|
||||
|
||||
global aa, original_aa
|
||||
aa = hasher()
|
||||
aa = {}
|
||||
original_aa = hasher()
|
||||
|
||||
if ui_msg:
|
||||
|
|
Loading…
Add table
Reference in a new issue