Do not use umask() since it change the umask for the entire process, not just

the thread using SQLite.  Make whatever permission changes are needed using
fchmod() after the file is created, instead.

FossilOrigin-Name: 6c4c2b7dbadedac384d380efd54f12f6ccbf4ca9
This commit is contained in:
drh
2013-01-04 20:45:13 +00:00
parent e454f3d6f8
commit e1186ab260
5 changed files with 43 additions and 30 deletions
+8
View File
@@ -883,12 +883,20 @@ do_execsql_test pager1.4.7.1 {
tv filter {}
db close
tv delete
catch {
test_syscall install fchmod
test_syscall fault 1 1
}
do_test pager1.4.7.2 {
faultsim_restore_and_reopen
catch {file attributes test.db-journal -permissions r--------}
catch {file attributes test.db-journal -readonly 1}
catchsql { SELECT * FROM t1 }
} {1 {unable to open database file}}
catch {
test_syscall reset
test_syscall fault 0 0
}
do_test pager1.4.7.3 {
db close
catch {file attributes test.db-journal -permissions rw-rw-rw-}