mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-05-21 00:19:11 -07:00
Cut the 3rd matching group as it fails to match roles without quotes
The group purpose was to match the closing quotes. We don't need the value after the TO. So we can ignore this entirely.
This commit is contained in:
parent
726fcaeca6
commit
7b13533ba1
1 changed files with 1 additions and 1 deletions
|
@ -662,7 +662,7 @@ def privileges_get(cursor, user, host, maria_role=False):
|
|||
if not maria_role:
|
||||
res = re.match("""GRANT (.+) ON (.+) TO (['`"]).*\\3@(['`"]).*\\4( IDENTIFIED BY PASSWORD (['`"]).+\\6)? ?(.*)""", grant[0])
|
||||
else:
|
||||
res = re.match("""GRANT (.+) ON (.+) TO (['`"]).*\\3""", grant[0])
|
||||
res = re.match("""GRANT (.+) ON (.+) TO .*""", grant[0])
|
||||
|
||||
if res is None:
|
||||
# If a user has roles assigned, we'll have one of priv tuples looking like
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue