diff options
author | drh <drh@noemail.net> | 2010-06-02 15:59:05 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2010-06-02 15:59:05 +0000 |
commit | c11895b808c89ba0331b248e4bbfd8b3df887f89 (patch) | |
tree | 638993cc7835ef4f051dd34d4787ef28767b0175 /src/os_unix.c | |
parent | 38933f2c1173eaf8e5e351df7902730b2c222af8 (diff) | |
download | sqlite-c11895b808c89ba0331b248e4bbfd8b3df887f89.tar.gz sqlite-c11895b808c89ba0331b248e4bbfd8b3df887f89.zip |
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
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 95f20bad9..0a1c3e741 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -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; |