mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Prevent sqlite from opening directories as databases under unix. Fix for test cae in misc7.test. (CVS 4342)
FossilOrigin-Name: e30546504c59c7d92d83a32d9b7e83edc175e247
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Check\sin\sextra\sfixes\sfor\smalloc4.test.\s(CVS\s4341)
|
C Prevent\ssqlite\sfrom\sopening\sdirectories\sas\sdatabases\sunder\sunix.\sFix\sfor\stest\scae\sin\smisc7.test.\s(CVS\s4342)
|
||||||
D 2007-08-30T15:46:07
|
D 2007-08-30T16:13:34
|
||||||
F Makefile.in bfcc303429a5d9dcd552d807ee016c77427418c3
|
F Makefile.in bfcc303429a5d9dcd552d807ee016c77427418c3
|
||||||
F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
|
F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
|
||||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||||
@@ -116,7 +116,7 @@ F src/os_os2.c 8769301bff502de642ad2634cedcb77d967ce199
|
|||||||
F src/os_os2.h c3f7d0af7e3453d1d7aa81b06c0a56f5a226530b
|
F src/os_os2.h c3f7d0af7e3453d1d7aa81b06c0a56f5a226530b
|
||||||
F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c
|
F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c
|
||||||
F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3
|
F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3
|
||||||
F src/os_unix.c 0f3997dc16c4e83e1d5f4b392c30e1b20f0a77ba
|
F src/os_unix.c 84dcfc01006ae0b4f8e16cf094de4bdaf7ddf1a8
|
||||||
F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
|
F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
|
||||||
F src/os_win.c 3ffd3aacff4cb69848284e29dcec0feff23b0752
|
F src/os_win.c 3ffd3aacff4cb69848284e29dcec0feff23b0752
|
||||||
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
|
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
|
||||||
@@ -568,7 +568,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
|
|||||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||||
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
||||||
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
|
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
|
||||||
P 23746924db3c005d1f75572c6cbb91db6fc41eb4
|
P 49ce3a838194f0316c883dbe1596d13c0c0fad1b
|
||||||
R 80f8d106415c810b911e5727899048d8
|
R b30cf53f87f8589eddcd76cb86e9eb93
|
||||||
U danielk1977
|
U danielk1977
|
||||||
Z d2507462ebb24d1bb162827dff859cd2
|
Z f3d625c775127ec08c26228a50386eb4
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
49ce3a838194f0316c883dbe1596d13c0c0fad1b
|
e30546504c59c7d92d83a32d9b7e83edc175e247
|
||||||
@@ -2395,7 +2395,7 @@ static int unixOpen(
|
|||||||
|
|
||||||
memset(pFile, 0, sizeof(unixFile));
|
memset(pFile, 0, sizeof(unixFile));
|
||||||
fd = open(zPath, oflags, isDelete?0600:SQLITE_DEFAULT_FILE_PERMISSIONS);
|
fd = open(zPath, oflags, isDelete?0600:SQLITE_DEFAULT_FILE_PERMISSIONS);
|
||||||
if( fd<0 && isReadWrite && !isExclusive ){
|
if( fd<0 && errno!=EISDIR && isReadWrite && !isExclusive ){
|
||||||
/* Failed to open the file for read/write access. Try read-only. */
|
/* Failed to open the file for read/write access. Try read-only. */
|
||||||
flags &= ~(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE);
|
flags &= ~(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE);
|
||||||
flags |= SQLITE_OPEN_READONLY;
|
flags |= SQLITE_OPEN_READONLY;
|
||||||
|
|||||||
Reference in New Issue
Block a user