MCPcopy Create free account
hub / github.com/MariaDB/server / copy_and_check_auth

Function copy_and_check_auth

sql/sql_acl.cc:7320–7334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7318}
7319
7320static bool copy_and_check_auth(LEX_USER *to, LEX_USER *from, THD *thd)
7321{
7322 to->auth= from->auth;
7323
7324 // if changing auth for an existing user
7325 if (has_auth(to, thd->lex) && find_user_exact(to->host, to->user))
7326 {
7327 mysql_mutex_unlock(&acl_cache->lock);
7328 bool res= check_alter_user(thd, to->host, to->user);
7329 mysql_mutex_lock(&acl_cache->lock);
7330 return res;
7331 }
7332
7333 return false;
7334}
7335
7336
7337/*

Callers 4

mysql_table_grantFunction · 0.85
mysql_routine_grantFunction · 0.85
mysql_grant_roleFunction · 0.85
mysql_grantFunction · 0.85

Calls 3

has_authFunction · 0.85
find_user_exactFunction · 0.85
check_alter_userFunction · 0.85

Tested by

no test coverage detected