2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +00:00

Fix doubled arrow in exec rules

When parsing a profile with named exec rules, the exec target included
the arrow. This resulted in two arrows when writing the profile (and one
more each time the profile was updated).

Fix this by using the match group that only contains the exec target
without the arrow in parse_profile_data() and
serialize_profile_from_old_profile().

References: https://bugs.launchpad.net/apparmor/+bug/1437901


Acked-by: Steve Beattie <steve@nxnw.org> for trunk and 2.9.
This commit is contained in:
Christian Boltz
2015-04-11 02:16:08 +02:00
parent 38a69f5ebc
commit 387de4458f

View File

@@ -2904,7 +2904,7 @@ def parse_profile_data(data, file, do_include):
path = strip_quotes(matches[4].strip())
mode = matches[5]
nt_name = matches[6]
nt_name = matches[7]
if nt_name:
nt_name = nt_name.strip()
@@ -4174,7 +4174,7 @@ def serialize_profile_from_old_profile(profile_data, name, options):
path = strip_quotes(matches[4].strip())
mode = matches[5]
nt_name = matches[6]
nt_name = matches[7]
if nt_name:
nt_name = nt_name.strip()