#166 removing test when plugin is unix_socket or win_socket
Support for bug https://bugs.mysql.com/bug.php?id=80860
This commit is contained in:
parent
bf6d380fe2
commit
c9ebae1e26
1 changed files with 12 additions and 4 deletions
|
@ -803,7 +803,7 @@ sub select_array {
|
||||||
debugprint "CMD : $mysqlcmd";
|
debugprint "CMD : $mysqlcmd";
|
||||||
debugprint "OPTIONS: $mysqllogin";
|
debugprint "OPTIONS: $mysqllogin";
|
||||||
debugprint `$mysqlcmd $mysqllogin -Bse "$req" 2>&1`;
|
debugprint `$mysqlcmd $mysqllogin -Bse "$req" 2>&1`;
|
||||||
exit $?;
|
#exit $?;
|
||||||
}
|
}
|
||||||
debugprint "select_array: return code : $?";
|
debugprint "select_array: return code : $?";
|
||||||
chomp(@result);
|
chomp(@result);
|
||||||
|
@ -821,7 +821,7 @@ sub select_one {
|
||||||
debugprint "CMD : $mysqlcmd";
|
debugprint "CMD : $mysqlcmd";
|
||||||
debugprint "OPTIONS: $mysqllogin";
|
debugprint "OPTIONS: $mysqllogin";
|
||||||
debugprint `$mysqlcmd $mysqllogin -Bse "$req" 2>&1`;
|
debugprint `$mysqlcmd $mysqllogin -Bse "$req" 2>&1`;
|
||||||
exit $?;
|
#exit $?;
|
||||||
}
|
}
|
||||||
debugprint "select_array: return code : $?";
|
debugprint "select_array: return code : $?";
|
||||||
chomp($result);
|
chomp($result);
|
||||||
|
@ -1102,7 +1102,7 @@ sub security_recommendations {
|
||||||
|
|
||||||
# Looking for Empty Password
|
# Looking for Empty Password
|
||||||
@mysqlstatlist = select_array
|
@mysqlstatlist = select_array
|
||||||
"SELECT CONCAT(user, '\@', host) FROM mysql.user WHERE $PASS_COLUMN_NAME = '' OR $PASS_COLUMN_NAME IS NULL";
|
"SELECT CONCAT(user, '\@', host) FROM mysql.user WHERE ($PASS_COLUMN_NAME = '' OR $PASS_COLUMN_NAME IS NULL) AND plugin NOT IN ('unix_socket', 'win_socket')";
|
||||||
if (@mysqlstatlist) {
|
if (@mysqlstatlist) {
|
||||||
foreach my $line ( sort @mysqlstatlist ) {
|
foreach my $line ( sort @mysqlstatlist ) {
|
||||||
chomp($line);
|
chomp($line);
|
||||||
|
@ -1116,6 +1116,14 @@ sub security_recommendations {
|
||||||
goodprint "All database users have passwords assigned";
|
goodprint "All database users have passwords assigned";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mysql_version_ge(5,7)) {
|
||||||
|
my $valPlugin=select_one("select count(*) from information_schema.plugins where PLUGIN_NAME='validate_password' AND PLUGIN_STATUS='ACTIVE'");
|
||||||
|
if ($valPlugin>=1) {
|
||||||
|
infoprint "Bug #80860 MySQL 5.7: Avoid testing password when validate_password is activated";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Looking for User with user/ uppercase /capitalise user as password
|
# Looking for User with user/ uppercase /capitalise user as password
|
||||||
@mysqlstatlist = select_array
|
@mysqlstatlist = select_array
|
||||||
"SELECT CONCAT(user, '\@', host) FROM mysql.user WHERE CAST($PASS_COLUMN_NAME as Binary) = PASSWORD(user) OR CAST($PASS_COLUMN_NAME as Binary) = PASSWORD(UPPER(user)) OR CAST($PASS_COLUMN_NAME as Binary) = PASSWORD(UPPER(LEFT(User, 1)) + SUBSTRING(User, 2, LENGTH(User)))";
|
"SELECT CONCAT(user, '\@', host) FROM mysql.user WHERE CAST($PASS_COLUMN_NAME as Binary) = PASSWORD(user) OR CAST($PASS_COLUMN_NAME as Binary) = PASSWORD(UPPER(user)) OR CAST($PASS_COLUMN_NAME as Binary) = PASSWORD(UPPER(LEFT(User, 1)) + SUBSTRING(User, 2, LENGTH(User)))";
|
||||||
|
|
Loading…
Reference in a new issue