You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Go to file
Stijn Tintel 7102503bb2 Only revoke GRANT OPTION when user actually has it
When revoking privileges from a user, the GRANT OPTION is always
revoked, even if the user doesn't have it. If the user exists, this
doesn't give an error, but if the user doesn't exist, it does:

mysql> GRANT ALL ON test.* TO 'test'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> REVOKE GRANT OPTION ON test.* FROM 'test'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> REVOKE GRANT OPTION ON test.* FROM 'test'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> REVOKE ALL ON test.* FROM 'test'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> REVOKE GRANT OPTION ON test.* FROM 'test'@'localhost';
ERROR 1141 (42000): There is no such grant defined for user 'test' on
host 'localhost'

Additionally, in MySQL 5.6 this breaks replication because of
http://bugs.mysql.com/bug.php?id=68892.

Rather than revoking the GRANT OPTION and catching the error, check if
the user actually has it and only revoke it when he does.
11 years ago
cloud Remove end of line semicolons. 11 years ago
commands Docs: consistently format playbook EXAMPLES 12 years ago
database Only revoke GRANT OPTION when user actually has it 11 years ago
files Remove reference to 'context' since it's not implemented. 11 years ago
internal * Updated all ansible.cc references in the documentation to point 12 years ago
inventory Trim legacy variable usage. 11 years ago
messaging Add missing version_added description in docs. 11 years ago
monitoring Trim old style var references. 11 years ago
net_infrastructure Changed shebangs that use /usr/bin/env to use /usr/bin/python and therefore be compatible with the ansible_python_interpreter variable. 11 years ago
network Trim old style var references 11 years ago
notification Legacy variable usage. 11 years ago
packaging Fix prev feature commit, Do not require aptitude to use apt commands in the apt module, only needed when upgrading. 11 years ago
source_control Don't add --version HEAD parameter is already HEAD, some versions of git don't like this. 11 years ago
system Continue on mount errors, don't fail the setup module. 11 years ago
utilities Legacy variable usage removed 11 years ago
web_infrastructure Update htpasswd module for various API incompatibilities 11 years ago