Hello, Am Freitag, 20. Mai 2016, 15:58:01 CEST schrieb Seth Arnold: > > some dbus rule conditionals come with optional parenthesis. Instead > > of making the regex even more complicated, use a small function to > > strip those parenthesis. > > > > > > > > Also add some tests for strip_parenthesis() to test-regex.py. > > How will this handle '() foo ()' or '(((())))'?
Well, it will strip the outer set of parenthesis, so your example will result in ') foo (' and '((()))'. The "trick" is to use this function only on somewhat defined input which was pre-filtered with a regex etc. Oh, and I'm quite sure if it hits a rule like dbus peer=(label=() foo ()), stripping a set of parenthesis won't make it more broken, just broken in a different way ;-) Regards, Christian Boltz -- Zwar sind CSS-Bugs kein Alleinstellungsmerkmal des Internet Explorers, jedoch beansprucht Microsoft seit vielen Jahren die Marktführerschaft. [Dirk Jesse auf http://www.highresolution.info/spotlight/entry/ was_sie_ueber_css-frameworks_wissen_sollten/]
signature.asc
Description: This is a digitally signed message part.
-- AppArmor mailing list AppArmor@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor