Skip to content

Commit 4b7bc78

Browse files
author
G Manasa
committed
Bug #30972348: ADDING PROXY USER WITH LOCALHOST CRASHES MYSQL
Description:- When MySQL server is started with "--skip-name-resolve" option, the GRANT PROXY command doesn't work as expected with some values. Analysis:- When MySQL server is started with "--skip-name-resolve" option, the values given with GRANT PROXY command are not validated. Fix:- Validate the values given from GRANT PROXY command. RB#25070
1 parent 657eac9 commit 4b7bc78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sql/auth/sql_auth_cache.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License, version 2.0,
@@ -268,10 +268,10 @@ ACL_PROXY_USER::init(TABLE *table, MEM_ROOT *mem)
268268
bool
269269
ACL_PROXY_USER::check_validity(bool check_no_resolve)
270270
{
271-
if (check_no_resolve &&
271+
if (check_no_resolve &&
272272
(hostname_requires_resolving(host.get_host()) ||
273273
hostname_requires_resolving(proxied_host.get_host())) &&
274-
strcmp(host.get_host(), "localhost") != 0) {
274+
strcmp(host.get_host() ? host.get_host() : "", "localhost") != 0) {
275275
sql_print_warning("'proxies_priv' entry '%s@%s %s@%s' "
276276
"ignored in --skip-name-resolve mode.",
277277
proxied_user ? proxied_user : "",

0 commit comments

Comments
 (0)