summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-12-07 12:08:20 +0100
committerunknown <serg@serg.mylan>2004-12-07 12:08:20 +0100
commit9d48570cd45f3381891583544d091703a21e7310 (patch)
treea87992474f2627227ecd0f749bd6e9ce504ee267 /sql/sql_class.cc
parent59abcd447cc373c1c3dfc0184f12642aa6d2ab70 (diff)
downloadmariadb-git-9d48570cd45f3381891583544d091703a21e7310.tar.gz
two fixes for potential security bugs
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index c829778151b..9dd75b32d5d 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -564,7 +564,7 @@ select_export::prepare(List<Item> &list)
return 1;
}
/* Create the file world readable */
- if ((file=my_create(path, 0666, O_WRONLY, MYF(MY_WME))) < 0)
+ if ((file=my_create(path, 0666, O_WRONLY|O_EXCL, MYF(MY_WME))) < 0)
return 1;
#ifdef HAVE_FCHMOD
(void) fchmod(file,0666); // Because of umask()
@@ -803,7 +803,7 @@ select_dump::prepare(List<Item> &list __attribute__((unused)))
return 1;
}
/* Create the file world readable */
- if ((file=my_create(path, 0666, O_WRONLY, MYF(MY_WME))) < 0)
+ if ((file=my_create(path, 0666, O_WRONLY|O_EXCL, MYF(MY_WME))) < 0)
return 1;
#ifdef HAVE_FCHMOD
(void) fchmod(file,0666); // Because of umask()