void-packages/srcpkgs/tracker-miners/patches/sqlite-seccomp.patch

25 lines
825 B
Diff

Change ioctl(..., F2FS_IOC_GET_FEATURES, ...) from an assertion to an errno.
This is necessary for sqlite SQLITE_ENABLE_BATCH_ATOMIC_WRITE.
--- a/src/libtracker-miners-common/tracker-seccomp.c
+++ b/src/libtracker-miners-common/tracker-seccomp.c
@@ -34,6 +34,7 @@
#include <sys/prctl.h>
#include <sys/syscall.h>
#include <sys/socket.h>
+#include <sys/ioctl.h>
#include <fcntl.h>
#include <seccomp.h>
@@ -246,6 +247,10 @@ tracker_seccomp_init (void)
SCMP_CMP(0, SCMP_CMP_EQ, 2)) < 0)
goto out;
+ if (seccomp_rule_add (ctx, SCMP_ACT_ERRNO (EACCES), SCMP_SYS(ioctl), 1,
+ SCMP_CMP(1, SCMP_CMP_EQ, _IOR(0xf5, 12, __u32))) < 0)
+ goto out;
+
/* Special requirements for open/openat, allow O_RDONLY calls,
* but fail if write permissions are requested.
*/