[apparmor] [patch] Drop unused escape() function from aa.py
Christian Boltz
apparmor at cboltz.de
Thu Jun 16 20:32:53 UTC 2016
Hello,
$subject.
Besides being unused, this function contains a broken regex.
References: https://bugs.launchpad.net/bugs/1593324
[ 01-drop-unused-escape-function.diff ]
=== modified file 'utils/apparmor/aa.py'
--- utils/apparmor/aa.py 2016-06-01 19:04:13 +0000
+++ utils/apparmor/aa.py 2016-06-16 20:28:09 +0000
@@ -3135,14 +3135,6 @@
else:
raise AppArmorException(_('Unknown variable operation %(operation)s for variable %(variable)s in %(file)s') % { 'operation': var_operation, 'variable': list_var, 'file': filename })
-
-def escape(escape):
- escape = strip_quotes(escape)
- escape = re.sub('((?<!\\))"', r'\1\\', escape)
- if re.search('(\s|^$|")', escape):
- return '"%s"' % escape
- return escape
-
def write_header(prof_data, depth, name, embedded_hat, write_flags):
pre = ' ' * int(depth * 2)
data = []
Regards,
Christian Boltz
--
> > Dooooooooooooooooooch!!! ;-)
> N<?php do{echo "e";>!
cb at tux:~> echo 'N<?php do{echo "e";>!' | php
Parse error: parse error, unexpected '>' in - on line 1
[> Ratti und Christian Boltz in fontlinge-devel]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20160616/fae62e09/attachment.pgp>
More information about the AppArmor
mailing list