diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-10-27 11:53:05 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-10-31 16:06:16 +0100 |
commit | 0e388d43a7efe7b68903808fa8bdb521d31aa069 (patch) | |
tree | 322dae724eff69975abc61fa2cdb011707643e10 /plugin | |
parent | 1cc03e1f198eafe25f9dfbc1c0f32b4db251f3bf (diff) | |
download | mariadb-git-0e388d43a7efe7b68903808fa8bdb521d31aa069.tar.gz |
cleanup: add 'const' to password validation API
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/cracklib_password_check/cracklib_password_check.c | 3 | ||||
-rw-r--r-- | plugin/simple_password_check/simple_password_check.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/plugin/cracklib_password_check/cracklib_password_check.c b/plugin/cracklib_password_check/cracklib_password_check.c index 22d5eee21f2..d64ef990983 100644 --- a/plugin/cracklib_password_check/cracklib_password_check.c +++ b/plugin/cracklib_password_check/cracklib_password_check.c @@ -21,7 +21,8 @@ static char *dictionary; -static int crackme(MYSQL_CONST_LEX_STRING *username, MYSQL_CONST_LEX_STRING *password) +static int crackme(const MYSQL_CONST_LEX_STRING *username, + const MYSQL_CONST_LEX_STRING *password) { char *user= alloca(username->length + 1); char *host; diff --git a/plugin/simple_password_check/simple_password_check.c b/plugin/simple_password_check/simple_password_check.c index 5a76c3d3005..2d298f0efa9 100644 --- a/plugin/simple_password_check/simple_password_check.c +++ b/plugin/simple_password_check/simple_password_check.c @@ -22,8 +22,8 @@ static unsigned min_length, min_digits, min_letters, min_others; -static int validate(MYSQL_CONST_LEX_STRING *username, - MYSQL_CONST_LEX_STRING *password) +static int validate(const MYSQL_CONST_LEX_STRING *username, + const MYSQL_CONST_LEX_STRING *password) { unsigned digits=0 , uppers=0 , lowers=0, others=0, length= (unsigned)password->length; const char *ptr= password->str, *end= ptr + length; |