diff options
author | Sergei Golubchik <serg@mariadb.org> | 2014-11-25 22:22:55 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-02-27 10:50:41 +0100 |
commit | 135bb45384f7640740667dc71561358a1085263a (patch) | |
tree | 763c0e8914649805eceac096abfbc6f996a1764d | |
parent | 0e650055ec5e776abbdf6d961b01a66fb162f888 (diff) | |
download | mariadb-git-bb-10.0-validation.tar.gz |
test for two password validation pluginsbb-10.0-validation
when many plugins are active, all must approve the password
-rw-r--r-- | mysql-test/suite/plugins/r/two_password_validations.result | 21 | ||||
-rw-r--r-- | mysql-test/suite/plugins/t/two_password_validations.test | 38 |
2 files changed, 59 insertions, 0 deletions
diff --git a/mysql-test/suite/plugins/r/two_password_validations.result b/mysql-test/suite/plugins/r/two_password_validations.result new file mode 100644 index 00000000000..dc6bab3c2d5 --- /dev/null +++ b/mysql-test/suite/plugins/r/two_password_validations.result @@ -0,0 +1,21 @@ +install soname "simple_password_check"; +grant select on *.* to Fff_fff1 identified by '1fff_ffF'; +drop user Fff_fff1; +install soname "cracklib_password_check"; +grant select on *.* to foobar identified by 'q$%^&*R1234ty'; +drop user foobar; +grant select on *.* to Fff_fff1 identified by '1fff_ffF'; +ERROR HY000: Your password does not satisfy the current policy requirements +show warnings; +Level Code Message +Warning 1819 cracklib: it does not contain enough DIFFERENT characters +Error 1819 Your password does not satisfy the current policy requirements +grant select on *.* to foobar identified by 'q-%^&*rty'; +ERROR HY000: Your password does not satisfy the current policy requirements +show warnings; +Level Code Message +Error 1819 Your password does not satisfy the current policy requirements +uninstall plugin simple_password_check; +grant select on *.* to foobar identified by 'q-%^&*rty'; +drop user foobar; +uninstall plugin cracklib_password_check; diff --git a/mysql-test/suite/plugins/t/two_password_validations.test b/mysql-test/suite/plugins/t/two_password_validations.test new file mode 100644 index 00000000000..89a5c7ae900 --- /dev/null +++ b/mysql-test/suite/plugins/t/two_password_validations.test @@ -0,0 +1,38 @@ +--source include/not_embedded.inc + +if (!$CRACKLIB_PASSWORD_CHECK_SO) { + skip No CRACKLIB_PASSWORD_CHECK plugin; +} + +if (!$SIMPLE_PASSWORD_CHECK_SO) { + skip No SIMPLE_PASSWORD_CHECK plugin; +} + +let $only_simple=grant select on *.* to Fff_fff1 identified by '1fff_ffF'; +let $only_crack=grant select on *.* to foobar identified by 'q-%^&*rty'; + +install soname "simple_password_check"; + +eval $only_simple; +drop user Fff_fff1; + +install soname "cracklib_password_check"; + +grant select on *.* to foobar identified by 'q$%^&*R1234ty'; +drop user foobar; + +--error ER_NOT_VALID_PASSWORD +eval $only_simple; +show warnings; + +--error ER_NOT_VALID_PASSWORD +eval $only_crack; +show warnings; + +uninstall plugin simple_password_check; + +eval $only_crack; +drop user foobar; + +uninstall plugin cracklib_password_check; + |