Hi,

I think that sqlite has a wrong behavior when it comes to the access
checks on /tmp:
 - it checks that it has the read access on /tmp, but read is useless,
it only needs write + execute as it should not have to scan the /tmp
folder.

Here is the strace log:

stat64("/var/tmp", 0xbede7020)          = -1 ENOENT (No such file or
directory)
stat64("/usr/tmp", 0xbede7020)          = -1 ENOENT (No such file or
directory)
stat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0733, st_size=40, ...}) = 0
access("/tmp", R_OK|W_OK|X_OK)          = -1 EACCES (Permission
denied)
access("./etilqs_rN0pHXRlK95X67T", F_OK) = -1 ENOENT (No such file or
directory)
umask(0)                                = 022
open("./etilqs_rN0pHXRlK95X67T",
O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE|O_NOFOLLOW|O_CLOEXEC, 0600) = -1
EROFS (Read-only file system)

sqlite can create its file in /tmp/ but does the wrong check because
it checks for W_OK.

I used the last version of sqlite: 3.7.14.1.

Thanks :)

-- 
Alexandre Bique
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to