1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Pre requiste MDEV-9245: add host to validate password interface

Hostname added to the interface.

Cracklib plugin fixed according to the new interface.
This commit is contained in:
Oleksandr Byelkin
2021-08-20 14:03:56 +02:00
parent 26c1311c39
commit 9d1a8665cb
8 changed files with 51 additions and 17 deletions

View File

@@ -4,7 +4,7 @@ PLUGIN_NAME cracklib_password_check
PLUGIN_VERSION 1.0
PLUGIN_STATUS ACTIVE
PLUGIN_TYPE PASSWORD VALIDATION
PLUGIN_TYPE_VERSION 1.0
PLUGIN_TYPE_VERSION 1.1
PLUGIN_LIBRARY cracklib_password_check.so
PLUGIN_LIBRARY_VERSION 1.15
PLUGIN_AUTHOR Sergei Golubchik
@@ -37,6 +37,18 @@ show warnings;
Level Code Message
Warning 1819 cracklib: it is based on a dictionary word
Error 1819 Your password does not satisfy the current policy requirements
grant select on *.* to foocar@localhost identified by 'localhost';
ERROR HY000: Your password does not satisfy the current policy requirements
show warnings;
Level Code Message
Warning 1819 cracklib: it is based upon your password entry
Error 1819 Your password does not satisfy the current policy requirements
grant select on *.* to foocar@localhost identified by 'foocar@localhost';
ERROR HY000: Your password does not satisfy the current policy requirements
show warnings;
Level Code Message
Warning 1819 cracklib: it is derived from your password entry
Error 1819 Your password does not satisfy the current policy requirements
grant select on *.* to foobar identified by 'q$%^&*rty';
drop user foobar;
#

View File

@@ -4,7 +4,7 @@ PLUGIN_NAME simple_password_check
PLUGIN_VERSION 1.0
PLUGIN_STATUS ACTIVE
PLUGIN_TYPE PASSWORD VALIDATION
PLUGIN_TYPE_VERSION 1.0
PLUGIN_TYPE_VERSION 1.1
PLUGIN_LIBRARY simple_password_check.so
PLUGIN_LIBRARY_VERSION 1.15
PLUGIN_AUTHOR Sergei Golubchik

View File

@@ -27,6 +27,14 @@ show warnings;
grant select on *.* to foobar identified by 'qwerty';
show warnings;
--error ER_NOT_VALID_PASSWORD
grant select on *.* to foocar@localhost identified by 'localhost';
show warnings;
--error ER_NOT_VALID_PASSWORD
grant select on *.* to foocar@localhost identified by 'foocar@localhost';
show warnings;
grant select on *.* to foobar identified by 'q$%^&*rty';
drop user foobar;