MCPcopy Create free account
hub / github.com/Tencent/phxsql / check_password_strength

Function check_password_strength

phx_percona/percona/sql/sql_acl.cc:12510–12525  ·  view source on GitHub ↗

for validate_password_strength SQL function */

Source from the content-addressed store, hash-verified

12508
12509/* for validate_password_strength SQL function */
12510int check_password_strength(String *password)
12511{
12512 int res= 0;
12513 DBUG_ASSERT(password != NULL);
12514 plugin_ref plugin= my_plugin_lock_by_name(0, &validate_password_plugin_name,
12515 MYSQL_VALIDATE_PASSWORD_PLUGIN);
12516 if (plugin)
12517 {
12518 st_mysql_validate_password *password_strength=
12519 (st_mysql_validate_password *) plugin_decl(plugin)->info;
12520
12521 res= password_strength->get_password_strength(password);
12522 plugin_unlock(0, plugin);
12523 }
12524 return(res);
12525}
12526
12527/* called when new user is created or exsisting password is changed */
12528int check_password_policy(String *password)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected