mirror of
https://git.freebsd.org/ports.git
synced 2025-05-31 02:16:27 -04:00
PR: 193539 Submitted by: spil.oss (gmail) MariaDB is a database server that offers drop-in replacement functionality for MySQL. MariaDB is built by some of the original authors of MySQL, with assistance from the broader community of Free and open source software developers. In addition to the core functionality of MySQL, MariaDB offers a rich set of feature enhancements including alternate storage engines, server optimizations, and patches.
61 lines
1.8 KiB
C
61 lines
1.8 KiB
C
--- mysys/my_default.c.orig 2014-08-09 00:13:39.000000000 +0200
|
|
+++ mysys/my_default.c 2014-09-05 19:56:48.006019959 +0200
|
|
@@ -90,7 +90,7 @@
|
|
|
|
/* Which directories are searched for options (and in which order) */
|
|
|
|
-#define MAX_DEFAULT_DIRS 6
|
|
+#define MAX_DEFAULT_DIRS 7
|
|
#define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */
|
|
static const char **default_directories = NULL;
|
|
|
|
@@ -785,7 +785,7 @@
|
|
{
|
|
MY_STAT stat_info;
|
|
if (!my_stat(name,&stat_info,MYF(0)))
|
|
- return 1;
|
|
+ return 0;
|
|
/*
|
|
Ignore world-writable regular files.
|
|
This is mainly done to protect us to not read a file created by
|
|
@@ -803,6 +803,14 @@
|
|
if (!(fp= mysql_file_fopen(key_file_cnf, name, O_RDONLY, MYF(0))))
|
|
return 1; /* Ignore wrong files */
|
|
|
|
+ if (strstr(name, "/etc") == name)
|
|
+ {
|
|
+ fprintf(stderr,
|
|
+ "error: Config file %s in invalid location, please move to or merge with /usr/local%s\n",
|
|
+ name,name);
|
|
+ goto err;
|
|
+ }
|
|
+
|
|
while (mysql_file_fgets(buff, sizeof(buff) - 1, fp))
|
|
{
|
|
line++;
|
|
@@ -1067,7 +1075,8 @@
|
|
if (name[0] == FN_HOMELIB) /* Add . to filenames in home */
|
|
*end++= '.';
|
|
strxmov(end, conf_file, *ext, " ", NullS);
|
|
- fputs(name, stdout);
|
|
+ if (strstr(name, "/etc") != name)
|
|
+ fputs(name, stdout);
|
|
}
|
|
}
|
|
}
|
|
@@ -1223,13 +1232,10 @@
|
|
|
|
#else
|
|
|
|
-#if defined(DEFAULT_SYSCONFDIR)
|
|
- if (DEFAULT_SYSCONFDIR[0])
|
|
- errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
|
|
-#else
|
|
errors += add_directory(alloc, "/etc/", dirs);
|
|
errors += add_directory(alloc, "/etc/mysql/", dirs);
|
|
-#endif /* DEFAULT_SYSCONFDIR */
|
|
+ errors += add_directory(alloc, "/usr/local/etc/", dirs);
|
|
+ errors += add_directory(alloc, "/usr/local/etc/mysql/", dirs);
|
|
|
|
#endif
|
|
|