/ Check-in [b38fe522]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the fix to the temporary directory search algorithm so that it continues to return "." as a fallback if that directory has the correct permissions.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b38fe522cfc971b37ca04e7b63a92bbb6e0b01e1
User & Date: drh 2016-04-23 20:59:23
Context
2016-04-25
01:43
Fix a typo in the Makefile. check-in: d0a579b3 user: mistachkin tags: trunk
2016-04-23
21:16
Merge the temporary directory search algorithm fix from trunk. check-in: 9b8fec60 user: drh tags: tempfiles-25
20:59
Fix the fix to the temporary directory search algorithm so that it continues to return "." as a fallback if that directory has the correct permissions. check-in: b38fe522 user: drh tags: trunk
2016-04-21
23:37
Change the temporary directory search algorithm on unix so that directories with only -wx permission are allowed. And do not allow "." to be returned if it lacks -wx permission. check-in: 67985761 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

  5412   5412     };
  5413   5413     unsigned int i;
  5414   5414     struct stat buf;
  5415   5415     const char *zDir = sqlite3_temp_directory;
  5416   5416   
  5417   5417     if( !azDirs[0] ) azDirs[0] = getenv("SQLITE_TMPDIR");
  5418   5418     if( !azDirs[1] ) azDirs[1] = getenv("TMPDIR");
  5419         -  for(i=0; i<sizeof(azDirs)/sizeof(azDirs[0]); zDir=azDirs[i++]){
         5419  +  for(i=0; i<=sizeof(azDirs)/sizeof(azDirs[0]); zDir=azDirs[i++]){
  5420   5420       if( zDir==0 ) continue;
  5421   5421       if( osStat(zDir, &buf) ) continue;
  5422   5422       if( !S_ISDIR(buf.st_mode) ) continue;
  5423   5423       if( osAccess(zDir, 03) ) continue;
  5424   5424       return zDir;
  5425   5425     }
  5426   5426     return 0;