[apparmor] [patch] ignore log event if request_mask == ''
John Johansen
john.johansen at canonical.com
Sat Dec 12 06:11:05 UTC 2015
On 12/11/2015 11:47 AM, Christian Boltz wrote:
> Hello,
>
> $subject.
> We already check for None, but '' != None ;-)
>
>
> References: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1525119
>
>
> I propose this patch for 2.9, 2.10 and trunk.
for all
Acked-by: John Johansen <john.johansen at canonical.com>
>
>
> [ 37-ignore-empty-string-request-mask.diff ]
>
> === modified file ./utils/apparmor/logparser.py
> --- utils/apparmor/logparser.py 2015-12-08 22:39:19.920789122 +0100
> +++ utils/apparmor/logparser.py 2015-12-11 20:41:11.720074915 +0100
> @@ -294,7 +294,8 @@
>
> # for some reason, we get file_perm and file_inherit log events without request_mask, see
> # https://bugs.launchpad.net/apparmor/+bug/1466812/ and https://bugs.launchpad.net/apparmor/+bug/1509030
> - if e['operation'] in ['file_perm', 'file_inherit'] and e['request_mask'] is None:
> + # request_mask can also be '', see https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1525119
> + if e['operation'] in ['file_perm', 'file_inherit'] and not e['request_mask']:
> self.debug_logger.debug('UNHANDLED (missing request_mask): %s' % e)
> return None
>
>
>
> Regards,
>
> Christian Boltz
>
More information about the AppArmor
mailing list