[apparmor] [patch] Add SignalRule and SignalRuleset classes
John Johansen
john.johansen at canonical.com
Thu Nov 19 20:27:51 UTC 2015
On 11/19/2015 09:41 AM, Christian Boltz wrote:
> Hello,
>
> [scroll down for an add-on patch that addresses Kshitij's comments]
>
> Am Donnerstag, 19. November 2015 schrieb Kshitij Gupta:
>> On Fri, Oct 23, 2015 at 6:30 PM, Christian Boltz wrote:
>>> this patch adds the SignalRule and SignalRuleset classes
>
>>> [ 07-add-SignalRule-and-SignalRuleset.diff ]
>>>
>>> === modified file ./utils/apparmor/rule/signal.py
>>> --- utils/apparmor/rule/signal.py 2015-10-23
>>> 01:17:21.579245521 +0200 +++ utils/apparmor/rule/signal.py
>>> 2015-10-23 01:08:01.149132984 +0200 @@ -0,0 +1,300 @@
> ...
>>> + 'io', 'pwr', 'sys', 'emt', 'exists']
>>> +RE_SIGNAL_REALTIME =
>>> re.compile('^rtmin\+0*([0-9]|[12][0-9]|3[0-2])$') #
>>> rtmin+0..rtmin+32, number may have leading zeros
>>
>> I do not like this regex.
>> Its far too complicated for when its only saying: rtmin+x such that x
>> maybe 2digit and is in [0,32] and possibly return x. Plus Its
>> confusing whether rtmin+032 is allowed or not (regex suggests it is).
>
> It is allowed. Even rtmin+000000000000000000000000000000000000000000032
> is allowed ;-)
>
ugh, file a bug to remind me to fix that
More information about the AppArmor
mailing list