Thiago Macieira
2018-05-23 13:27:09 UTC
You may want to wait for 5.11.1 or apply the fix[1].
The reason is we're using O_TMPFILE for temporary files now, but the solution
to materialise the file suggested in the man page[2]
char path[PATH_MAX];
fd = open("/path/to/dir", O_TMPFILE | O_RDWR,
S_IRUSR | S_IWUSR);
/* File I/O on 'fd'... */
snprintf(path, PATH_MAX, "/proc/self/fd/%d", fd);
linkat(AT_FDCWD, path, AT_FDCWD, "/path/for/file",
AT_SYMLINK_FOLLOW);
fails because Android security permissions block the link(2) and linkat(2)
system calls. Since you can't have nice things on Android, I've disabled the
O_TMPFILE support as well as the rename-overwrite-race-prevention one
(renameat(2) system call also blocked and can't use link(2)).
statx(2) is also blocked, so you can't get file birth times either.
[1] http://code.qt.io/cgit/qt/qtbase.git/commit/?
id=f86fbc45667528ac9a496d1476bd139f26b3b5bc
[2] http://man7.org/linux/man-pages/man2/open.2.html
The reason is we're using O_TMPFILE for temporary files now, but the solution
to materialise the file suggested in the man page[2]
char path[PATH_MAX];
fd = open("/path/to/dir", O_TMPFILE | O_RDWR,
S_IRUSR | S_IWUSR);
/* File I/O on 'fd'... */
snprintf(path, PATH_MAX, "/proc/self/fd/%d", fd);
linkat(AT_FDCWD, path, AT_FDCWD, "/path/for/file",
AT_SYMLINK_FOLLOW);
fails because Android security permissions block the link(2) and linkat(2)
system calls. Since you can't have nice things on Android, I've disabled the
O_TMPFILE support as well as the rename-overwrite-race-prevention one
(renameat(2) system call also blocked and can't use link(2)).
statx(2) is also blocked, so you can't get file birth times either.
[1] http://code.qt.io/cgit/qt/qtbase.git/commit/?
id=f86fbc45667528ac9a496d1476bd139f26b3b5bc
[2] http://man7.org/linux/man-pages/man2/open.2.html
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center