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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
252ba8aa
Commit
252ba8aa
authored
Apr 28, 2003
by
monty@mashka.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better test for regular files.
parent
938933af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
mysys/default.c
mysys/default.c
+7
-2
No files found.
mysys/default.c
View file @
252ba8aa
...
@@ -249,8 +249,13 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
...
@@ -249,8 +249,13 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
MY_STAT
stat_info
;
MY_STAT
stat_info
;
if
(
!
my_stat
(
name
,
&
stat_info
,
MYF
(
0
)))
if
(
!
my_stat
(
name
,
&
stat_info
,
MYF
(
0
)))
return
0
;
return
0
;
/* ignore world-writeable _regular_ files */
/*
if
(
stat_info
.
st_mode
&
S_IWOTH
&&
stat_info
.
st_mode
&
S_IFREG
)
Ignore world-writable regular files.
This is mainly done to protect us to not read a file created by
the mysqld server, but the check is still valid in most context.
*/
if
((
stat_info
.
st_mode
&
S_IWOTH
)
&&
(
stat_info
.
st_mode
&
S_IFMT
)
==
S_IFREG
)
{
{
fprintf
(
stderr
,
"warning: World-writeable config file %s is ignored
\n
"
,
fprintf
(
stderr
,
"warning: World-writeable config file %s is ignored
\n
"
,
name
);
name
);
...
...
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