mysql_grant bugfix: REVOKE ALL PRIVILEGES doesn't revoke GRANT OPTION
This commit is contained in:
parent
f5a78f1c5f
commit
9de42ac43e
1 changed files with 5 additions and 0 deletions
|
@ -76,6 +76,11 @@ Puppet::Type.type(:mysql_grant).provide(:mysql, :parent => Puppet::Provider::Mys
|
|||
|
||||
query = "REVOKE ALL ON #{table_string} FROM #{user_string}"
|
||||
mysql([defaults_file, '-e', query].compact)
|
||||
# revoke grant option needs to be a extra query, because
|
||||
# "REVOKE ALL PRIVILEGES, GRANT OPTION [..]" is only valid mysql syntax
|
||||
# if no ON clause is used.
|
||||
query = "REVOKE GRANT OPTION ON #{table_string} FROM #{user_string}"
|
||||
mysql([defaults_file, '-e', query].compact)
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
|
Loading…
Reference in a new issue