Commit 9195e54c authored by Rasmus Thomsen's avatar Rasmus Thomsen

seccomp: fix on musl

the syscalls being called may differ between libcs. As such two additional
syscalls have to be called on musl and one has to be disabled due to it
not being available.
parent dd888cbf
Pipeline #137125 passed with stage
in 1 minute and 49 seconds
......@@ -138,7 +138,6 @@ tracker_seccomp_init (void)
/* Descriptors */
ALLOW_RULE (close);
ALLOW_RULE (read);
ALLOW_RULE (pread64);
ALLOW_RULE (lseek);
ALLOW_RULE (_llseek);
ALLOW_RULE (fadvise64);
......@@ -209,6 +208,14 @@ tracker_seccomp_init (void)
SCMP_CMP(2, SCMP_CMP_MASKED_EQ, O_RDWR, O_RDWR)) < 0)
goto out;
/* Syscalls may differ between libcs */
#if !defined(__GLIBC__)
ALLOW_RULE (rt_sigreturn);
ALLOW_RULE (readv);
#else
ALLOW_RULE (pread64);
#endif
g_debug ("Loading seccomp rules.");
if (seccomp_load (ctx) >= 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment