diff options
author | unknown <serg@serg.mylan> | 2005-03-03 19:51:29 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2005-03-03 19:51:29 +0100 |
commit | 8104faa08305df5cbc848fe593444d2716ba49eb (patch) | |
tree | 6a871c4d1335ae125f6cd13af89645ec25365e37 /mysys/mf_tempfile.c | |
parent | 026bb52678a2a8ca1cc2b242b5dfaa38c56261b9 (diff) | |
download | mariadb-git-8104faa08305df5cbc848fe593444d2716ba49eb.tar.gz |
Fixes for bugs reported by Stefano Di Paola (stefano.dipaola@wisec.it)
include/my_global.h:
O_NOFOLLOW
isam/create.c:
create table files with O_EXCL|O_NOFOLLOW
merge/mrg_create.c:
create table files with O_EXCL|O_NOFOLLOW
myisam/mi_create.c:
create files of temporary tables with O_EXCL|O_NOFOLLOW
myisammrg/myrg_create.c:
create table files with O_EXCL|O_NOFOLLOW
mysys/mf_tempfile.c:
create temporary files with O_EXCL|O_NOFOLLOW
sql/ha_myisam.cc:
let mi_create know if the table is TEMPORARY
sql/mysql_priv.h:
--allow_suspicious_udfs
sql/mysqld.cc:
--allow_suspicious_udfs
sql/share/english/errmsg.txt:
typo
sql/sql_udf.cc:
--allow_suspicious_udfs
don't allow xxx() udf without any of xxx_init/deinit/add/reset
check paths when loading from mysql.func
sql/table.cc:
create frm of temporary table with O_EXCL|O_NOFOLLOW
Diffstat (limited to 'mysys/mf_tempfile.c')
-rw-r--r-- | mysys/mf_tempfile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c index ca9912d9210..c84222ba77f 100644 --- a/mysys/mf_tempfile.c +++ b/mysys/mf_tempfile.c @@ -70,7 +70,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix, { strmake(to,res,FN_REFLEN-1); (*free)(res); - file=my_create(to,0, mode, MyFlags); + file=my_create(to,0, mode | O_EXCL | O_NOFOLLOW, MyFlags); } environ=old_env; } @@ -81,7 +81,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix, { strmake(to,res,FN_REFLEN-1); (*free)(res); - file=my_create(to, 0, mode, MyFlags); + file=my_create(to, 0, mode | O_EXCL | O_NOFOLLOW, MyFlags); } #elif defined(HAVE_MKSTEMP) && !defined(__NETWARE__) { @@ -143,7 +143,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix, strmake(to,res,FN_REFLEN-1); (*free)(res); file=my_create(to,0, - (int) (O_RDWR | O_BINARY | O_TRUNC | + (int) (O_RDWR | O_BINARY | O_TRUNC | O_EXCL | O_NOFOLLOW | O_TEMPORARY | O_SHORT_LIVED), MYF(MY_WME)); @@ -186,7 +186,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix, } (void) strmov(end_pos,TMP_EXT); file=my_create(to,0, - (int) (O_RDWR | O_BINARY | O_TRUNC | + (int) (O_RDWR | O_BINARY | O_TRUNC | O_EXCL | O_NOFOLLOW | O_TEMPORARY | O_SHORT_LIVED), MYF(MY_WME)); } |