On Sat, Jul 12, 2014 at 09:29:14PM +0200, Christian Boltz wrote:
> Hello,
>
> logparser.py defines LOG_MODE_RE, but doesn't use it.
>
> LOG_MODE_RE is also defined (and used) in aamode.py.
>
> This patch removes the superfluous definition from logparser.py.
>
>
> === modified file 'utils/apparmor/logparser.py'
> --- utils/apparmor/logparser.py 2014-02-13 18:01:03 +0000
> +++ utils/apparmor/logparser.py 2014-06-09 18:40:59 +0000
> @@ -28,7 +28,6 @@
> RE_LOG_v2_6_syslog =
> re.compile('kernel:\s+(\[[\d\.\s]+\]\s+)?type=\d+\s+audit\([\d\.\:]+\):\s+apparmor=')
> RE_LOG_v2_6_audit =
> re.compile('type=AVC\s+(msg=)?audit\([\d\.\:]+\):\s+apparmor=')
> MODE_MAP_RE = re.compile('r|w|l|m|k|a|x|i|u|p|c|n|I|U|P|C|N')
> - LOG_MODE_RE =
> re.compile('r|w|l|m|k|a|x|ix|ux|px|cx|nx|pix|cix|Ix|Ux|Px|PUx|Cx|Nx|Pix|Cix')
> PROFILE_MODE_RE =
> re.compile('r|w|l|m|k|a|ix|ux|px|cx|pix|cix|Ux|Px|PUx|Cx|Pix|Cix')
> PROFILE_MODE_NT_RE =
> re.compile('r|w|l|m|k|a|x|ix|ux|px|cx|pix|cix|Ux|Px|PUx|Cx|Pix|Cix')
> PROFILE_MODE_DENY_RE = re.compile('r|w|l|m|k|a|x')
> How confusing -- logparser.py has a LOG_MODE_RE variable it doesn't use but it does have a PROFILE_MODE_RE -- and aamode.py uses a LOG_MODE_RE variable? Should we be renaming variables along the way to make them make some kind of sense? Or should these variables be defined in a single file that is then used by all the other files? But this patch alone looks okay, so: Acked-by: Seth Arnold <[email protected]> Thanks
signature.asc
Description: Digital signature
-- AppArmor mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
