add MariaDB role detection

This commit is contained in:
Laurent Indermuehle 2025-04-24 15:53:41 +02:00
parent 7b13533ba1
commit 41ab19372b
No known key found for this signature in database
GPG key ID: 93FA944C9F34DD09

View file

@ -607,7 +607,9 @@ class MySQL_Info(object):
user = line['User']
host = line['Host']
user_priv = privileges_get(self.cursor, user, host)
# MariaDB roles have no host
is_role = self.server_implementation == 'mariadb' and not host
user_priv = privileges_get(self.cursor, user, host, maria_role=is_role)
if not user_priv:
self.module.warn("No privileges found for %s on host %s" % (user, host))