mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 18:20:07 +01:00
Allow hostnames that are IP addresses with a netmask even when
running with --skip-name-resolve. (Bug #8471)
This commit is contained in:
parent
dd62343bde
commit
3d7a384d00
4 changed files with 14 additions and 1 deletions
7
mysql-test/r/skip_name_resolve.result
Normal file
7
mysql-test/r/skip_name_resolve.result
Normal file
|
@ -0,0 +1,7 @@
|
|||
GRANT ALL ON test.* TO mysqltest_1@'127.0.0.1/255.255.255.255';
|
||||
SHOW GRANTS FOR mysqltest_1@'127.0.0.1/255.255.255.255';
|
||||
Grants for mysqltest_1@127.0.0.1/255.255.255.255
|
||||
GRANT USAGE ON *.* TO 'mysqltest_1'@'127.0.0.1/255.255.255.255'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'mysqltest_1'@'127.0.0.1/255.255.255.255'
|
||||
REVOKE ALL ON test.* FROM mysqltest_1@'127.0.0.1/255.255.255.255';
|
||||
DROP USER mysqltest_1@'127.0.0.1/255.255.255.255';
|
1
mysql-test/t/skip_name_resolve-master.opt
Normal file
1
mysql-test/t/skip_name_resolve-master.opt
Normal file
|
@ -0,0 +1 @@
|
|||
--skip-name-resolve
|
5
mysql-test/t/skip_name_resolve.test
Normal file
5
mysql-test/t/skip_name_resolve.test
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Bug #8471: IP address with mask fail when skip-name-resolve is on
|
||||
GRANT ALL ON test.* TO mysqltest_1@'127.0.0.1/255.255.255.255';
|
||||
SHOW GRANTS FOR mysqltest_1@'127.0.0.1/255.255.255.255';
|
||||
REVOKE ALL ON test.* FROM mysqltest_1@'127.0.0.1/255.255.255.255';
|
||||
DROP USER mysqltest_1@'127.0.0.1/255.255.255.255';
|
|
@ -1339,7 +1339,7 @@ bool hostname_requires_resolving(const char *hostname)
|
|||
return FALSE;
|
||||
for (; (cur=*hostname); hostname++)
|
||||
{
|
||||
if ((cur != '%') && (cur != '_') && (cur != '.') &&
|
||||
if ((cur != '%') && (cur != '_') && (cur != '.') && (cur != '/') &&
|
||||
((cur < '0') || (cur > '9')))
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue