]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Prevent sqlite from opening directories as databases under unix. Fix for test cae...
authordanielk1977 <danielk1977@noemail.net>
Thu, 30 Aug 2007 16:13:33 +0000 (16:13 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Thu, 30 Aug 2007 16:13:33 +0000 (16:13 +0000)
FossilOrigin-Name: e30546504c59c7d92d83a32d9b7e83edc175e247

manifest
manifest.uuid
src/os_unix.c

index b23537e5adc6ac8848c5c6ea52ff681f96d41325..3008355ef5e857b139a2baa815f349026f99ec2f 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Check\sin\sextra\sfixes\sfor\smalloc4.test.\s(CVS\s4341)
-D 2007-08-30T15:46:07
+C Prevent\ssqlite\sfrom\sopening\sdirectories\sas\sdatabases\sunder\sunix.\sFix\sfor\stest\scae\sin\smisc7.test.\s(CVS\s4342)
+D 2007-08-30T16:13:34
 F Makefile.in bfcc303429a5d9dcd552d807ee016c77427418c3
 F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -116,7 +116,7 @@ F src/os_os2.c 8769301bff502de642ad2634cedcb77d967ce199
 F src/os_os2.h c3f7d0af7e3453d1d7aa81b06c0a56f5a226530b
 F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c
 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_win.c 3ffd3aacff4cb69848284e29dcec0feff23b0752
 F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
@@ -568,7 +568,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 23746924db3c005d1f75572c6cbb91db6fc41eb4
-R 80f8d106415c810b911e5727899048d8
+P 49ce3a838194f0316c883dbe1596d13c0c0fad1b
+R b30cf53f87f8589eddcd76cb86e9eb93
 U danielk1977
-Z d2507462ebb24d1bb162827dff859cd2
+Z f3d625c775127ec08c26228a50386eb4
index 0bd7b01f97f869df728e1ed0a8691bccc5a3143a..600e597135cdbdbe7c2778a06b23b530b0afa61c 100644 (file)
@@ -1 +1 @@
-49ce3a838194f0316c883dbe1596d13c0c0fad1b
\ No newline at end of file
+e30546504c59c7d92d83a32d9b7e83edc175e247
\ No newline at end of file
index a1a0041e9b2d9e0782608e6e7a54b85e7583e296..c46d82407b9aeddcd3affaaaa43b6afefb766d22 100644 (file)
@@ -2395,7 +2395,7 @@ static int unixOpen(
 
   memset(pFile, 0, sizeof(unixFile));
   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. */
     flags &= ~(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE);
     flags |= SQLITE_OPEN_READONLY;