diff --git a/utils/apparmor/aa.py b/utils/apparmor/aa.py index b699da434..a33e8896b 100644 --- a/utils/apparmor/aa.py +++ b/utils/apparmor/aa.py @@ -2634,7 +2634,7 @@ def write_pair(prof_data, depth, allow, name, prefix, sep, tail, fn): if ref.get(name, False): for key in sorted(ref[name].keys()): value = fn(ref[name][key]) # eval('%s(%s)' % (fn, ref[name][key])) - data.append('%s%s%s%s%s%s' % (pre, allow, prefix, key, sep, value)) + data.append('%s%s%s%s%s%s%s' % (pre, allow, prefix, key, sep, value, tail)) if ref[name].keys(): data.append('') diff --git a/utils/test/cleanprof_test.in b/utils/test/cleanprof_test.in index 3931a18d9..9be6e6559 100644 --- a/utils/test/cleanprof_test.in +++ b/utils/test/cleanprof_test.in @@ -1,6 +1,8 @@ # A simple test comment which will persist #include + alias /foo -> /bar , + /usr/bin/a/simple/cleanprof/test/profile { # Just for the heck of it, this comment wont see the day of light #include diff --git a/utils/test/cleanprof_test.out b/utils/test/cleanprof_test.out index 730cd5b8d..d5102d3dc 100644 --- a/utils/test/cleanprof_test.out +++ b/utils/test/cleanprof_test.out @@ -1,3 +1,5 @@ +alias /foo -> /bar, + #include # A simple test comment which will persist