Lines 1-6
Link Here
|
1 |
--- mysys/default.c.orig 2010-11-02 23:01:13.000000000 +0100 |
1 |
--- mysys/default.c.orig 2013-10-01 21:15:03.544135869 +0200 |
2 |
+++ mysys/default.c 2010-11-10 16:39:51.000000000 +0100 |
2 |
+++ mysys/default.c 2013-10-01 21:15:38.871375504 +0200 |
3 |
@@ -70,7 +70,7 @@ |
3 |
@@ -89,7 +89,7 @@ |
4 |
|
4 |
|
5 |
/* Which directories are searched for options (and in which order) */ |
5 |
/* Which directories are searched for options (and in which order) */ |
6 |
|
6 |
|
Lines 9-15
Link Here
|
9 |
#define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */ |
9 |
#define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */ |
10 |
static const char **default_directories = NULL; |
10 |
static const char **default_directories = NULL; |
11 |
|
11 |
|
12 |
@@ -711,7 +711,7 @@ |
12 |
@@ -785,7 +785,7 @@ |
13 |
{ |
13 |
{ |
14 |
MY_STAT stat_info; |
14 |
MY_STAT stat_info; |
15 |
if (!my_stat(name,&stat_info,MYF(0))) |
15 |
if (!my_stat(name,&stat_info,MYF(0))) |
Lines 18-31
Link Here
|
18 |
/* |
18 |
/* |
19 |
Ignore world-writable regular files. |
19 |
Ignore world-writable regular files. |
20 |
This is mainly done to protect us to not read a file created by |
20 |
This is mainly done to protect us to not read a file created by |
21 |
@@ -1153,7 +1153,10 @@ |
21 |
@@ -803,6 +803,14 @@ |
|
|
22 |
if (!(fp= mysql_file_fopen(key_file_cnf, name, O_RDONLY, MYF(0)))) |
23 |
return 1; /* Ignore wrong files */ |
22 |
|
24 |
|
23 |
#if defined(DEFAULT_SYSCONFDIR) |
25 |
+ if (strstr(name, "/etc") == name) |
24 |
if (DEFAULT_SYSCONFDIR[0]) |
|
|
25 |
+ { |
26 |
+ { |
26 |
errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs); |
27 |
+ fprintf(stderr, |
27 |
+ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "/mysql", dirs); |
28 |
+ "error: Config file %s in invalid location, please move to or merge with %%PREFIX%%%s\n", |
|
|
29 |
+ name,name); |
30 |
+ goto err; |
28 |
+ } |
31 |
+ } |
29 |
#endif /* DEFAULT_SYSCONFDIR */ |
32 |
+ |
|
|
33 |
while (mysql_file_fgets(buff, sizeof(buff) - 1, fp)) |
34 |
{ |
35 |
line++; |
36 |
@@ -1067,7 +1067,8 @@ |
37 |
if (name[0] == FN_HOMELIB) /* Add . to filenames in home */ |
38 |
*end++= '.'; |
39 |
strxmov(end, conf_file, *ext, " ", NullS); |
40 |
- fputs(name, stdout); |
41 |
+ if (strstr(name, "/etc") != name) |
42 |
+ fputs(name, stdout); |
43 |
} |
44 |
} |
45 |
} |
46 |
@@ -1226,10 +1226,8 @@ |
47 |
errors += add_directory(alloc, "/etc/", dirs); |
48 |
errors += add_directory(alloc, "/etc/mysql/", dirs); |
49 |
|
50 |
-#if defined(DEFAULT_SYSCONFDIR) |
51 |
- if (DEFAULT_SYSCONFDIR[0]) |
52 |
- errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs); |
53 |
-#endif /* DEFAULT_SYSCONFDIR */ |
54 |
+ errors += add_directory(alloc, "%%PREFIX%%/etc/", dirs); |
55 |
+ errors += add_directory(alloc, "%%PREFIX%%/etc/mysql/", dirs); |
30 |
|
56 |
|
31 |
#endif |
57 |
#endif |
|
|
58 |
|