1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Make sure the directory used by os_unix.c for shared-memory files is always

the same, regardless of individual client permissions and environment
variable settings.

FossilOrigin-Name: f97bd520f06a16c61ccdd9ebeda7e138896b9ac2
This commit is contained in:
drh
2010-06-02 15:59:05 +00:00
parent 38933f2c11
commit c11895b808
3 changed files with 12 additions and 12 deletions

View File

@@ -4233,7 +4233,7 @@ static const char *unixTempFileDir(int allowShm){
if( allowShm ){
zDir = "/dev/shm";
i = 0;
i = 2; /* Skip the app-defined temp locations for shared-memory */
}else{
zDir = azDirs[0];
i = 1;
@@ -4242,7 +4242,7 @@ static const char *unixTempFileDir(int allowShm){
if( zDir==0 ) continue;
if( stat(zDir, &buf) ) continue;
if( !S_ISDIR(buf.st_mode) ) continue;
if( access(zDir, 07) ) continue;
if( !allowShm && access(zDir, 07) ) continue;
break;
}
return zDir;