[apparmor] [patch] load_include(): use include_dir_filelist()
Christian Boltz
apparmor at cboltz.de
Sun Sep 13 18:12:13 UTC 2015
Hello,
load_include() used a custom os.listdir call instead of
include_dir_filelist() for directory includes, which means it also read
skippable files like *.rpmnew or README. (It seems nobody created a
README inside an included directory, otherwise we'd have seen a
bugreport ;-)
This patch changes load_include() to use include_dir_filelist(). This
function is used in some more places already and removes skippable files
from the file list.
Unfortunately 2.9 doesn't have the include_dir_filelist() function yet,
which makes backporting this patch harder than I like. Therefore I won't
backport it unless someone complains very loudly ;-)
[ 90-load_include-use-include_dir_filelist.diff ]
--- utils/apparmor/aa.py 2015-09-13 18:24:50.256789370 +0200
+++ utils/apparmor/aa.py 2015-09-13 19:56:38.533794770 +0200
@@ -4163,7 +4165,7 @@
attach_profile_data(include, incdata)
#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)))
+ load_includeslist += include_dir_filelist(profile_dir, incfile)
else:
raise AppArmorException("Include file %s not found" % (profile_dir + '/' + incfile) )
Regards,
Christian Boltz
--
> Mich nervt es tierisch an, wenn ich am Tag mehr Meldungen des Typs
> "Sie haben eine Virus-Mail verschickt" bekomme als Spam-Mails.
> Mittlerweile dürfte hinreichend bekannt sein, dass sich diese miesen
> Schädlinge mit beliebigen Absenderadressen versorgen. Solche Mails
> nutzen mir also gar nichts und erzeugen nur unnützen Traffic.
Soll ich Dir ein paar spams schicken, damit das Verhältnis wieder
stimmt? [> Michael Hoehne und Bernd Brodeßer in suse-linux]
More information about the AppArmor
mailing list