Further improvements to our matching - stop trying to guess what
might be the username or hostname and just match the entire thing no matter what it may be.
This commit is contained in:
parent
94c24a4e68
commit
09f42c8bb3
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ Puppet::Type.type(:mysql_grant).provide(:mysql, :parent => Puppet::Provider::Mys
|
|||
# Match the munges we do in the type.
|
||||
munged_grant = grant.delete("'").delete("`")
|
||||
# Matching: GRANT (SELECT, UPDATE) PRIVILEGES ON (*.*) TO ('root')@('127.0.0.1') (WITH GRANT OPTION)
|
||||
if match = munged_grant.match(/^GRANT\s(.+)\sON\s(.+)\sTO\s([\w.:]+)@([\w.:\/]+)(\s.*)$/)
|
||||
if match = munged_grant.match(/^GRANT\s(.+)\sON\s(.+)\sTO\s(.*)@(.*?)(\s.*)$/)
|
||||
privileges, table, user, host, rest = match.captures
|
||||
# Once we split privileges up on the , we need to make sure we
|
||||
# shortern ALL PRIVILEGES to just all.
|
||||
|
|
Loading…
Reference in a new issue