2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-09-01 23:05:11 +00:00

IncludeRuleset: add get_all_full_paths()

This function returns a list of full paths of all includes.

Also add some tests.
This commit is contained in:
Christian Boltz
2020-05-16 23:24:11 +02:00
parent 057c916032
commit 0cfef21713
2 changed files with 32 additions and 1 deletions

View File

@@ -156,4 +156,12 @@ class IncludeRule(BaseRule):
class IncludeRuleset(BaseRuleset):
'''Class to handle and store a collection of include rules'''
pass
def get_all_full_paths(self, profile_dir):
''' get full path of all includes '''
paths = []
for rule_obj in self.rules:
paths += rule_obj.get_full_paths(profile_dir)
return paths