summaryrefslogtreecommitdiff
path: root/mysql-test/suite/plugins/t/two_password_validations.test
blob: 89a5c7ae900a977b786e8f826149dac5a62b3cb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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;