Bug #8471 Running in skip-name-resolve-Mode doesn't allow netmasks in GRANT!
Submitted: 12 Feb 2005 11:52 Modified: 8 Mar 2005 0:15
Reporter: Frank Gum Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.9 OS:Any (*)
Assigned to: Jim Winstead CPU Architecture:Any

[12 Feb 2005 11:52] Frank Gum
Description:
Hi,

we are running Mysql 4.1.9 in 'skip-name-resolve'-Mode. When trying to 

GRANT ALL ON mydb.* TO myuser@'1.2.0.0/255.255.192.0' IDENTIFIED BY 'mypass';

I receive the warning:
+---------+------+--------------------------------------------------------------------------------------------------------------+
| Level   | Code | Message                                                                                                      |
+---------+------+--------------------------------------------------------------------------------------------------------------+
| Warning | 1285 | MySQL is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work |
+---------+------+--------------------------------------------------------------------------------------------------------------+

When I disable 'skip-name-resolve'-Mode everything works fine.

How to repeat:
see above

Suggested fix:
When I understand the code the correct way there is something missing in file sql/sql_acl.cc in function 'hostname_requires_resolving': You also have to test for '(cur != '/')'!
[18 Feb 2005 0:02] Jim Winstead
Pushed, will be in 4.1.11.
[8 Mar 2005 0:15] Paul DuBois
Noted in 4.1.11 changelog.