Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
357766ec
Commit
357766ec
authored
Mar 10, 2003
by
serg@serg.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ignore world-writeable my.cnf's
parent
d086e735
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
mysys/default.c
mysys/default.c
+13
-2
No files found.
mysys/default.c
View file @
357766ec
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#include "mysys_priv.h"
#include "mysys_priv.h"
#include "m_string.h"
#include "m_string.h"
#include "m_ctype.h"
#include "m_ctype.h"
#include <my_dir.h>
char
*
defaults_extra_file
=
0
;
char
*
defaults_extra_file
=
0
;
...
@@ -66,7 +67,7 @@ NullS,
...
@@ -66,7 +67,7 @@ NullS,
#define windows_ext ".ini"
#define windows_ext ".ini"
#endif
#endif
static
my_bool
search_default_file
(
DYNAMIC_ARRAY
*
args
,
MEM_ROOT
*
alloc
,
static
my_bool
search_default_file
(
DYNAMIC_ARRAY
*
args
,
MEM_ROOT
*
alloc
,
const
char
*
dir
,
const
char
*
config_file
,
const
char
*
dir
,
const
char
*
config_file
,
const
char
*
ext
,
TYPELIB
*
group
);
const
char
*
ext
,
TYPELIB
*
group
);
...
@@ -241,6 +242,16 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
...
@@ -241,6 +242,16 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
{
{
strmov
(
name
,
config_file
);
strmov
(
name
,
config_file
);
}
}
fn_format
(
name
,
name
,
""
,
""
,
4
);
#if !defined(__WIN__) && !defined(OS2)
{
MY_STAT
stat_info
;
if
(
!
my_stat
(
name
,
&
stat_info
,
MYF
(
MY_WME
)))
return
0
;
if
(
stat_info
.
st_mode
&
S_IWOTH
)
/* ignore world-writeable files */
return
0
;
}
#endif
if
(
!
(
fp
=
my_fopen
(
fn_format
(
name
,
name
,
""
,
""
,
4
),
O_RDONLY
,
MYF
(
0
))))
if
(
!
(
fp
=
my_fopen
(
fn_format
(
name
,
name
,
""
,
""
,
4
),
O_RDONLY
,
MYF
(
0
))))
return
0
;
/* Ignore wrong files */
return
0
;
/* Ignore wrong files */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment