diff options
author | unknown <serg@serg.mylan> | 2004-12-07 12:08:20 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-12-07 12:08:20 +0100 |
commit | 9d48570cd45f3381891583544d091703a21e7310 (patch) | |
tree | a87992474f2627227ecd0f749bd6e9ce504ee267 /sql/sql_class.cc | |
parent | 59abcd447cc373c1c3dfc0184f12642aa6d2ab70 (diff) | |
download | mariadb-git-9d48570cd45f3381891583544d091703a21e7310.tar.gz |
two fixes for potential security bugs
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 4 |
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() |