summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-10-22 07:23:59 +0200
committerSergei Golubchik <serg@mariadb.org>2015-10-22 07:23:59 +0200
commit3e1c743d4a100ff13efd030422525b28d1877281 (patch)
tree75901e22e5f7f57a6101d79f929199ecf4052c88 /sql/sql_acl.cc
parente257b8b9598ff861a97bbc2c43e2d7e88a997523 (diff)
downloadmariadb-git-3e1c743d4a100ff13efd030422525b28d1877281.tar.gz
MDEV-7656 init_file option does not allow changing passwords
allow SET PASSWORD from bootstrap and init-file
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 7d0fefeabd4..e2fb35254af 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -2558,7 +2558,8 @@ int check_change_password(THD *thd, const char *host, const char *user,
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--skip-grant-tables");
return(1);
}
- if (!thd->slave_thread && !thd->security_ctx->priv_user[0])
+ if (!thd->slave_thread && !thd->security_ctx->priv_user[0] &&
+ !in_bootstrap)
{
my_message(ER_PASSWORD_ANONYMOUS_USER, ER(ER_PASSWORD_ANONYMOUS_USER),
MYF(0));