mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Use active_profiles.profiles_in_file()
... instead of filelist[file_name]['profiles']
This commit is contained in:
parent
01e46ab453
commit
4e09f315c3
2 changed files with 2 additions and 2 deletions
|
@ -63,7 +63,7 @@ def find_profiles_from_files(files):
|
|||
profile_to_filename = dict()
|
||||
for file_name in files:
|
||||
apparmor.aa.read_profile(file_name, True)
|
||||
for profile_name in apparmor.aa.filelist[file_name]['profiles'].keys():
|
||||
for profile_name in apparmor.aa.active_profiles.profiles_in_file(file_name):
|
||||
profile_to_filename[profile_name] = file_name
|
||||
reset_aa()
|
||||
|
||||
|
|
|
@ -2300,7 +2300,7 @@ def serialize_profile(profile_data, name, options):
|
|||
data += active_profiles.get_clean(prof_filename, 0)
|
||||
|
||||
#Here should be all the profiles from the files added write after global/common stuff
|
||||
for prof in sorted(filelist[prof_filename]['profiles'].keys()):
|
||||
for prof in sorted(active_profiles.profiles_in_file(prof_filename)):
|
||||
if prof != name:
|
||||
if original_aa[prof][prof].get('initial_comment', False):
|
||||
comment = original_aa[prof][prof]['initial_comment']
|
||||
|
|
Loading…
Add table
Reference in a new issue