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 | 70e24138dca5bc24c626b3d5aadf9dd390304436 (patch) | |
tree | 6a871c4d1335ae125f6cd13af89645ec25365e37 /isam | |
parent | f40d2cd62b889b5d35da7e0047fccb49e781c4bf (diff) | |
download | mariadb-git-70e24138dca5bc24c626b3d5aadf9dd390304436.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 'isam')
-rw-r--r-- | isam/create.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/isam/create.c b/isam/create.c index 4c23f3edd11..204d3157d00 100644 --- a/isam/create.c +++ b/isam/create.c @@ -58,13 +58,14 @@ int nisam_create(const char *name,uint keys,N_KEYDEF *keyinfo, base_pos=512; /* Enough for N_STATE_INFO */ bzero((byte*) &share,sizeof(share)); if ((file = my_create(fn_format(buff,name,"",N_NAME_IEXT,4),0, - O_RDWR | O_TRUNC,MYF(MY_WME))) < 0) + O_RDWR | O_EXCL | O_NOFOLLOW,MYF(MY_WME))) < 0) goto err; errpos=1; VOID(fn_format(buff,name,"",N_NAME_DEXT,2+4)); if (!(flags & HA_DONT_TOUCH_DATA)) { - if ((dfile = my_create(buff,0,O_RDWR | O_TRUNC,MYF(MY_WME))) < 0) + if ((dfile = my_create(buff,0,O_RDWR | O_EXCL | O_NOFOLLOW, + MYF(MY_WME))) < 0) goto err; errpos=2; } |