mirror of
https://git.freebsd.org/ports.git
synced 2025-05-22 19:56:53 -04:00
- Update to 10.0.29 - Update mariadb100-client - Update patches - Regen patches with makepatch - Pet portlint - Add MROONGA liblz4 dependency - Fix MROONGA liblz4 linking - rm erroneously installed files PR: 197232, 204014, 215901 MFH: 2017Q1 Security: 22373c43-d728-11e6-a9a5-b499baebfeaf
52 lines
1.6 KiB
C
52 lines
1.6 KiB
C
--- mysys/my_default.c.orig 2017-01-12 01:45:18 UTC
|
|
+++ mysys/my_default.c
|
|
@@ -786,7 +786,7 @@ static int search_default_file_with_ext(
|
|
{
|
|
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
|
|
@@ -804,6 +804,14 @@ static int search_default_file_with_ext(
|
|
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++;
|
|
@@ -1068,7 +1076,8 @@ void my_print_default_files(const char *
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
@@ -1229,13 +1238,10 @@ static const char **init_default_directo
|
|
|
|
#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
|
|
|