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:
+15
-1
@@ -32,7 +32,7 @@ if {$tcl_platform(platform) != "unix"} {
|
||||
# tkt3457-1.3: Application has write but not read permission on
|
||||
# the hot-journal file. Result: SQLITE_CANTOPEN.
|
||||
#
|
||||
# tkt3457-1.4: Application has read but not write permission on
|
||||
# tkt3457-1.4: Application has read but not write permission ongrep
|
||||
# the hot-journal file. Result: SQLITE_CANTOPEN.
|
||||
#
|
||||
# tkt3457-1.5: Application has read/write permission on the hot-journal
|
||||
@@ -62,6 +62,14 @@ do_test tkt3457-1.1 {
|
||||
execsql COMMIT
|
||||
} {}
|
||||
|
||||
# Disable fchmod to make sure SQLite itself does not try to change the
|
||||
# permission bits on us
|
||||
#
|
||||
catch {
|
||||
test_syscall install fchmod
|
||||
test_syscall fault 1 1
|
||||
}
|
||||
|
||||
do_test tkt3457-1.2 {
|
||||
forcecopy bak.db-journal test.db-journal
|
||||
file attributes test.db-journal -permissions ---------
|
||||
@@ -84,4 +92,10 @@ do_test tkt3457-1.5 {
|
||||
catchsql { SELECT * FROM t1 }
|
||||
} {0 {1 2 3 4 5 6}}
|
||||
|
||||
# Reenable fchmod
|
||||
catch {
|
||||
test_syscall uninstall
|
||||
test_syscall fault 0 0
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
Reference in New Issue
Block a user