Commit 85ecaa65 authored by unknown's avatar unknown

Merge mysql.com:/home/bkroot/mysql-4.1 into mysql.com:/home/bk/c4944-4.1

parents 2c032db5 8c95f6cf
......@@ -750,6 +750,7 @@ mwagner@work.mysql.com|mysql-test/r/3.23/sel000001.result|20001010091454|28284|3
mwagner@work.mysql.com|mysql-test/r/3.23/sel000002.result|20001010091454|29230|d1787e6fd5dbc1cc
nick@nick.leippe.com|mysql-test/r/rpl_empty_master_crash.result|20020531235552|47718|615f521be2132141
nick@nick.leippe.com|mysql-test/t/rpl_empty_master_crash.test|20020531235552|52328|99464e737639ccc6
reggie@mdk10.(none)|mysql-test/t/reserved_win_names-master.opt|20050520210356|14878|e56da049a7ce9a5b
sasha@mysql.sashanet.com|BitKeeper/etc/logging_ok|20000801000905|12967|5b7d847a2158554
sasha@mysql.sashanet.com|build-tags|20011125054855|05181|7afb7e785b80f97
sasha@mysql.sashanet.com|build-tags|20011201050944|25384|b6f6fff142121618
......
......@@ -49,6 +49,7 @@ dlenev@mysql.com
ejonore@mc03.ndb.mysql.com
evgen@moonbone.(none)
evgen@moonbone.local
gbichot@bk-internal.mysql.com
gbichot@production.mysql.com
gbichot@quadita2.mysql.com
gbichot@quadxeon.mysql.com
......
......@@ -83,3 +83,9 @@ create table t2 like T1;
drop table t1, t2;
show tables;
Tables_in_test
use lpt1;
ERROR 42000: Unknown database 'lpt1'
use com1;
ERROR 42000: Unknown database 'com1'
use prn;
ERROR 42000: Unknown database 'prn'
......@@ -82,3 +82,14 @@ create table t2 like T1;
drop table t1, t2;
show tables;
#
#Bug 9148: Denial of service
#
--error 1049
use lpt1;
--error 1049
use com1;
--error 1049
use prn;
......@@ -33,9 +33,22 @@ FILE *my_fopen(const char *FileName, int Flags, myf MyFlags)
DBUG_ENTER("my_fopen");
DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %d",
FileName, Flags, MyFlags));
make_ftype(type,Flags);
if ((fd = fopen(FileName, type)) != 0)
/*
if we are not creating, then we need to use my_access to make sure
the file exists since Windows doesn't handle files like "com1.sym"
very well
*/
#ifdef __WIN__
if (! (Flags & O_CREAT) && my_access(FileName, F_OK))
fd=0;
else
#endif
{
make_ftype(type,Flags);
fd = fopen(FileName, type);
}
if (fd != 0)
{
/*
The test works if MY_NFILE < 128. The problem is that fileno() is char
......
......@@ -46,6 +46,13 @@ File my_open(const char *FileName, int Flags, myf MyFlags)
DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %d",
FileName, Flags, MyFlags));
#if defined(MSDOS) || defined(__WIN__) || defined(__EMX__) || defined(OS2)
/*
if we are not creating, then we need to use my_access to make
sure the file exists since Windows doesn't handle files like
"com1.sym" very well
*/
if (! (Flags & O_CREAT) && my_access(FileName, F_OK))
return -1;
if (Flags & O_SHARE)
fd = sopen((my_string) FileName, (Flags & ~O_SHARE) | O_BINARY, SH_DENYNO,
MY_S_IREAD | MY_S_IWRITE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment