fix for empty hostnames in mysql users (#20523)

This commit is contained in:
alex lustenberg 2017-08-17 12:00:26 -04:00 committed by ansibot
parent 974d988703
commit ff4fa6ac29

View file

@ -446,7 +446,7 @@ def privileges_get(cursor, user, host):
return x
for grant in grants:
res = re.match("GRANT (.+) ON (.+) TO '.*'@'.+'( IDENTIFIED BY PASSWORD '.+')? ?(.*)", grant[0])
res = re.match("GRANT (.+) ON (.+) TO '.*'@'.*'( IDENTIFIED BY PASSWORD '.+')? ?(.*)", grant[0])
if res is None:
raise InvalidPrivsError('unable to parse the MySQL grant string: %s' % grant[0])
privileges = res.group(1).split(", ")