diff options
| author | Bernard Spil <brnrd@FreeBSD.org> | 2017-01-18 20:19:36 +0000 |
|---|---|---|
| committer | Bernard Spil <brnrd@FreeBSD.org> | 2017-01-18 20:19:36 +0000 |
| commit | eaa122ead180917df69f323c8b0bd819831c6ed5 (patch) | |
| tree | 5f41cdd860c23e0e0a64e4046de764d8d593f37b /databases/mariadb101-client/files/patch-mysys_my__default.c | |
| parent | security/vuxml: Document mysql vulnerabilities (diff) | |
databases/mariadb101-server: Update to 10.1.21
- Update to 10.1.21
- Fix patches that no longer cleanly apply
- Rename patches to new naming scheme
MFH: 2017Q1
Security: 4d2f9d09-ddb7-11e6-a9a5-b499baebfeaf
Notes
Notes:
svn path=/head/; revision=431824
Diffstat (limited to 'databases/mariadb101-client/files/patch-mysys_my__default.c')
| -rw-r--r-- | databases/mariadb101-client/files/patch-mysys_my__default.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/databases/mariadb101-client/files/patch-mysys_my__default.c b/databases/mariadb101-client/files/patch-mysys_my__default.c index db4081fa5ed3..eb3fb51932c2 100644 --- a/databases/mariadb101-client/files/patch-mysys_my__default.c +++ b/databases/mariadb101-client/files/patch-mysys_my__default.c @@ -1,14 +1,5 @@ ---- mysys/my_default.c.orig 2016-03-24 09:12:11 UTC +--- mysys/my_default.c.orig 2017-01-17 19:38:25 UTC +++ mysys/my_default.c -@@ -90,7 +90,7 @@ static my_bool defaults_already_read= FA - - /* 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 @@ static int search_default_file_with_ext( { MY_STAT stat_info; @@ -18,32 +9,40 @@ /* Ignore world-writable regular files. This is mainly done to protect us to not read a file created by -@@ -803,6 +803,14 @@ static int search_default_file_with_ext( +@@ -803,6 +803,22 @@ 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); ++ "error: Config file %s in invalid location, please move to or merge with /usr/local%s\n", ++ name,name); ++ goto err; ++ } ++ ++ 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 @@ void my_print_default_files(const char * +@@ -1067,7 +1083,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); ++ fputs(name, stdout); } } } -@@ -1223,13 +1232,10 @@ static const char **init_default_directo +@@ -1228,13 +1245,10 @@ static const char **init_default_directo #else |
