aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2007-03-15 01:16:47 +0000
committerdrh <drh@noemail.net>2007-03-15 01:16:47 +0000
commit3f56e6ebac0cdb6c257cfd65f13ae9b354d68dae (patch)
tree4a733bcc5a865be1efb818ee393da5cb5c4263cd /src/os_unix.c
parent34c68fbab6247f7abba114c6978bb08003f61737 (diff)
downloadsqlite-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.c2
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;
}