On Fri, Jun 05, 2015 at 01:31:27AM +0200, Christian Boltz wrote:
> > > BTW: The regex contains '=>' as optional part - is this really
> > > correct?
> > No, not correct, the parser requires the '<='.
> 
> Since this patch touches RE_PROFILE_RLIMIT already, should I change
> 
> +RE_PROFILE_RLIMIT       = 
> re.compile('^\s*set\s+rlimit\s+(?P<rlimit>[a-z]+)\s+(<=)?\s*(?P<value>[^ ]+)' 
> + RE_COMMA_EOL)
>                                                                               
>  ^^^^^
> to
> 
> +RE_PROFILE_RLIMIT       = 
> re.compile('^\s*set\s+rlimit\s+(?P<rlimit>[a-z]+)\s+<=\s*(?P<value>[^ ]+)' + 
> RE_COMMA_EOL)
>                                                                               
>  ^^
> before commiting it?
> 
> I just tested a bit - the whitespace around the arrow is optional, and
> the parser accepts "set rlimit nice<=0,". So the final of the regex 
> would be:
> 
> +RE_PROFILE_RLIMIT       = 
> re.compile('^\s*set\s+rlimit\s+(?P<rlimit>[a-z]+)\s*<=\s*(?P<value>[^ ]+)' + 
> RE_COMMA_EOL)
>                                                                               
> ^
> 
> So should I change the patch to use the updated regex, or do you want a 
> separate patch for that?

Changing the patch is fine, to the last regex. (I hadn't realized that
the whitespace around <= was entirely optional.)

Thanks.

-- 
Steve Beattie
<[email protected]>
http://NxNW.org/~steve/

Attachment: signature.asc
Description: Digital signature

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to