[apparmor] GSoC review r34
Christian Boltz
apparmor at cboltz.de
Fri Aug 9 23:35:58 UTC 2013
Hello,
one more (quite harmless) review ;-)
Regards,
Christian Boltz
--
[Windows krepiert nach Update] > Habt Ihr eine Idee, was ich tun könnte?
Vermutlich ein Computervirus. Besorg etwas Aciclovir aus der Apotheke,
oeffne das Rechnergehaeuse und troepfle das Mittel auf alle roten oder
geschwollenen Bauteile. [Mirko Liss]
-------------- next part --------------
------------------------------------------------------------
revno: 34
committer: Kshitij Gupta <kgupta8592 at gmail.com
branch nick: apparmor-profile-tools
timestamp: Tue 2013-08-06 01:53:28 +0530
message:
Some code for logprof
=== added directory 'Tools'
=== added file 'Tools/aa-logprof.py'
--- Tools/aa-logprof.py 1970-01-01 00:00:00 +0000
+++ Tools/aa-logprof.py 2013-08-05 20:23:28 +0000
@@ -0,0 +1,13 @@
+os.environb.putenv('PATH', '/bin/:/sbin/:/usr/bin/:/usr/sbin')
# what's the reason for overriding $PATH ?
=== modified file 'apparmor/aa.py'
--- apparmor/aa.py 2013-08-05 13:25:34 +0000
+++ apparmor/aa.py 2013-08-05 20:23:28 +0000
@@ -3361,17 +3365,25 @@
+def store_list_var(var, list_var, value, var_operation):
...
+ if var_operation == '=':
+ if not var.get(list_var, False):
+ var[list_var] = set(vlist)
+ else:
+ raise AppArmorException('An existing variable redefined')
# better error message please - it's easy to include the variable name
+ else:
+ if var.get(list_var, False):
+ var[list_var] = set(var[list_var] + vlist)
+ else:
+ raise AppArmorException('An existing variable redefined')
# better error message please - it's easy to include the variable name
@@ -3829,8 +3841,8 @@
def get_include_data(filename):
data = []
- if os.path.exists(profile_dir + '/' + filename):
- with open_file_read(profile_dir + '/' + filename) as f_in:
+ if os.path.exists(filename):
+ with open_file_read(filename) as f_in:
# this means get_include_data() needs the full path as parameter
@@ -3844,6 +3856,7 @@
incfile = load_includeslist.pop(0)
data = get_include_data(incfile)
incdata = parse_profile_data(data, incfile, True)
+ print(incdata)
# forgotten debug code?
vim:ft=diff
More information about the AppArmor
mailing list