mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-04 08:15:21 +00:00
IncludeRule: sort files in included directory
... instead of relying on the filesystem(!) ordering, which will look
random to both users and unittests.
Also partially revert the test changes from
c5a7bcd50e
/
https://gitlab.com/apparmor/apparmor/-/merge_requests/548 -
sorting the result only in the tests is a bad idea.
This commit is contained in:
@@ -138,7 +138,7 @@ class IncludeRule(BaseRule):
|
||||
files = []
|
||||
|
||||
if os.path.isdir(full_path):
|
||||
for path in os.listdir(full_path):
|
||||
for path in sorted(os.listdir(full_path)):
|
||||
if is_skippable_file(path):
|
||||
continue
|
||||
|
||||
|
Reference in New Issue
Block a user