mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Remove re import from cleanprofile.py
The following patch: - removes re import - uses apparmor.re_match_include instead of the regex which also means to use the correct regex instead of the slightly wrong one cleanprofile.py had Acked-by: Christian Boltz <apparmor@cboltz.de>
This commit is contained in:
parent
255ee31dd4
commit
27b0a571fc
1 changed files with 1 additions and 3 deletions
|
@ -11,8 +11,6 @@
|
|||
# GNU General Public License for more details.
|
||||
#
|
||||
# ----------------------------------------------------------------------
|
||||
import re
|
||||
|
||||
import apparmor.aa as apparmor
|
||||
|
||||
class Prof(object):
|
||||
|
@ -92,7 +90,7 @@ def delete_path_duplicates(profile, profile_other, allow, same_profile=True):
|
|||
if not same_profile:
|
||||
deleted.append(entry)
|
||||
continue
|
||||
if re.search('#?\s*include', rule) or re.search('#?\s*include', entry):
|
||||
if apparmor.re_match_include(rule) or apparmor.re_match_include(entry):
|
||||
continue
|
||||
# Check if the rule implies entry
|
||||
if apparmor.matchliteral(rule, entry):
|
||||
|
|
Loading…
Add table
Reference in a new issue