summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2022-11-01 10:33:44 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2022-11-01 10:33:44 +0100
commitebf2121529fcf06971b4c0fc28f40654ef8dd99f (patch)
tree420ddcc5b2aeae06a75224062e85ee8b1ffce504 /plugin
parent4b87d3628acf815836c0efc84fbcd878517d9b89 (diff)
parente0421b7cc8969edefca25c9a47e24f7e77c4bdf6 (diff)
downloadmariadb-git-ebf2121529fcf06971b4c0fc28f40654ef8dd99f.tar.gz
Merge branch '10.8' into 10.9
Diffstat (limited to 'plugin')
-rw-r--r--plugin/cracklib_password_check/cracklib_password_check.c2
-rw-r--r--plugin/feedback/feedback.cc1
-rw-r--r--plugin/file_key_management/parser.cc15
-rw-r--r--plugin/password_reuse_check/password_reuse_check.c2
4 files changed, 14 insertions, 6 deletions
diff --git a/plugin/cracklib_password_check/cracklib_password_check.c b/plugin/cracklib_password_check/cracklib_password_check.c
index 95f8e11fe0e..9568f84a03b 100644
--- a/plugin/cracklib_password_check/cracklib_password_check.c
+++ b/plugin/cracklib_password_check/cracklib_password_check.c
@@ -13,10 +13,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
+#include <my_global.h>
#include <mysql/plugin_password_validation.h>
#include <crack.h>
#include <string.h>
-#include <alloca.h>
#include <mysqld_error.h>
static char *dictionary;
diff --git a/plugin/feedback/feedback.cc b/plugin/feedback/feedback.cc
index 3b2e95f1e13..cb254d69ec3 100644
--- a/plugin/feedback/feedback.cc
+++ b/plugin/feedback/feedback.cc
@@ -102,7 +102,6 @@ static COND* make_cond(THD *thd, TABLE_LIST *tables, LEX_STRING *filter)
if (!filter->str || !nrc)
return 0;
- nrc->init();
nrc->resolve_in_table_list_only(tables);
nrc->select_lex= tables->select_lex;
diff --git a/plugin/file_key_management/parser.cc b/plugin/file_key_management/parser.cc
index 818c026495f..57e0139a57d 100644
--- a/plugin/file_key_management/parser.cc
+++ b/plugin/file_key_management/parser.cc
@@ -162,19 +162,28 @@ bool Parser::read_filekey(const char *filekey, char *secret)
int f= open(filekey, O_RDONLY|O_BINARY);
if (f == -1)
{
- my_error(EE_FILENOTFOUND,ME_ERROR_LOG, filekey, errno);
+ my_error(EE_FILENOTFOUND, ME_ERROR_LOG, filekey, errno);
return 1;
}
- int len= read(f, secret, MAX_SECRET_SIZE);
+ int len= read(f, secret, MAX_SECRET_SIZE + 1);
if (len <= 0)
{
- my_error(EE_READ,ME_ERROR_LOG, filekey, errno);
+ my_error(EE_READ, ME_ERROR_LOG, filekey, errno);
close(f);
return 1;
}
close(f);
+
while (secret[len - 1] == '\r' || secret[len - 1] == '\n') len--;
+ if (len > MAX_SECRET_SIZE)
+ {
+ my_printf_error(EE_READ,
+ "Cannot read %s, the filekey is too long, "
+ "max secret size is %dB ",
+ ME_ERROR_LOG, filekey, MAX_SECRET_SIZE);
+ return 1;
+ }
secret[len]= '\0';
return 0;
}
diff --git a/plugin/password_reuse_check/password_reuse_check.c b/plugin/password_reuse_check/password_reuse_check.c
index 103eb4e4144..8f5973721d8 100644
--- a/plugin/password_reuse_check/password_reuse_check.c
+++ b/plugin/password_reuse_check/password_reuse_check.c
@@ -257,6 +257,6 @@ maria_declare_plugin(password_reuse_check)
NULL,
sysvars,
"2.0",
- MariaDB_PLUGIN_MATURITY_GAMMA
+ MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;