2
0
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:
Christian Boltz
2015-03-07 13:28:41 +01:00
parent 6af7faa2b7
commit 1b68baf7a3

View File

@@ -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