diff options
author | drh <drh@noemail.net> | 2007-03-15 01:16:47 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2007-03-15 01:16:47 +0000 |
commit | 3f56e6ebac0cdb6c257cfd65f13ae9b354d68dae (patch) | |
tree | 4a733bcc5a865be1efb818ee393da5cb5c4263cd /src/os_unix.c | |
parent | 34c68fbab6247f7abba114c6978bb08003f61737 (diff) | |
download | sqlite-3f56e6ebac0cdb6c257cfd65f13ae9b354d68dae.tar.gz sqlite-3f56e6ebac0cdb6c257cfd65f13ae9b354d68dae.zip |
Enhanced temp-file security under unix. There are no known attacks against
prior versions - this check-in is just an added precaution. (CVS 3687)
FossilOrigin-Name: 5af61402f65bddc4040a20470f267c9404cba631
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 67b7425af..5508240fe 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -864,7 +864,7 @@ int sqlite3UnixOpenExclusive(const char *zFilename, OsFile **pId, int delFlag){ assert( 0==*pId ); h = open(zFilename, O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_LARGEFILE|O_BINARY, - SQLITE_DEFAULT_FILE_PERMISSIONS); + delFlag ? 0600 : SQLITE_DEFAULT_FILE_PERMISSIONS); if( h<0 ){ return SQLITE_CANTOPEN; } |