[tracker-miners/wip/carlosg/parallel-installable: 6/41] libtracker-miners-common: Allow sched_setattr syscall



commit b4566aa90cffa52cbc94435817485152fcad0d39
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Feb 19 18:27:35 2020 +0100

    libtracker-miners-common: Allow sched_setattr syscall
    
    https://gitlab.gnome.org/GNOME/glib/issues/2039 has taught us two
    things:
    - Even if sched_setattr failures aren't handled as g_error() in
      glib, there will be some kind of warning. It's not desirable to
      extractor modules to indirectly trigger it.
    - Since priorities cannot be risen back without special capabilities
      (results in EPERM), it's not that bad to simply allow this syscall.
    
    So simply allow the sched_setattr syscall in our seccomp filter.

 src/libtracker-miners-common/tracker-seccomp.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/src/libtracker-miners-common/tracker-seccomp.c b/src/libtracker-miners-common/tracker-seccomp.c
index 68fea08d7..aabed1548 100644
--- a/src/libtracker-miners-common/tracker-seccomp.c
+++ b/src/libtracker-miners-common/tracker-seccomp.c
@@ -114,6 +114,7 @@ tracker_seccomp_init (void)
        ALLOW_RULE (rt_sigprocmask);
        ALLOW_RULE (sched_yield);
        ALLOW_RULE (sched_getaffinity);
+       ALLOW_RULE (sched_setattr);
        ALLOW_RULE (nanosleep);
        ALLOW_RULE (clock_nanosleep);
        ALLOW_RULE (waitid);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]