summaryrefslogtreecommitdiff
path: root/sql/wsrep_var.cc
diff options
context:
space:
mode:
authorDaniele Sciascia <daniele.sciascia@galeracluster.com>2020-08-18 10:56:56 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2020-08-19 13:12:00 +0300
commitfe3284b2cc8cc4f948aa234b3c6f9f2f8cffa027 (patch)
tree17aca91f5005b560389e21805d3623104b1c0305 /sql/wsrep_var.cc
parent09dd06f14aaf4ba8088f837625020617e5eca7ea (diff)
downloadmariadb-git-fe3284b2cc8cc4f948aa234b3c6f9f2f8cffa027.tar.gz
MDEV-23092 SIGABRT when setting invalid wsrep_provider
Some invalid wsrep_provider paths may be interpreted as a valid directory. For example '/invalid/libgalera_smm.so' with UTF character set is interpreted as '/', which is a valid directory. A early check that wsrep_provider should not be a directory fixes it.
Diffstat (limited to 'sql/wsrep_var.cc')
-rw-r--r--sql/wsrep_var.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc
index 64362d1c9e2..3649153e172 100644
--- a/sql/wsrep_var.cc
+++ b/sql/wsrep_var.cc
@@ -320,6 +320,12 @@ static int wsrep_provider_verify (const char* provider_str)
{
return 1;
}
+
+ if (MY_S_ISDIR(f_stat.st_mode))
+ {
+ return 1;
+ }
+
return 0;
}