mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 14:25:52 +00:00
let load_include raise an exception if an include file can't be found
instead of ignoring the error silently Acked-by: Steve Beattie <steve@nxnw.org> for both trunk and 2.9.
This commit is contained in:
@@ -4455,6 +4455,8 @@ def load_include(incname):
|
||||
#If the include is a directory means include all subfiles
|
||||
elif os.path.isdir(profile_dir + '/' + incfile):
|
||||
load_includeslist += list(map(lambda x: incfile + '/' + x, os.listdir(profile_dir + '/' + incfile)))
|
||||
else:
|
||||
raise AppArmorException("Include file %s not found" % (profile_dir + '/' + incfile) )
|
||||
|
||||
return 0
|
||||
|
||||
|
Reference in New Issue
Block a user