Blob Blame History Raw
From 9403394dad6d148ac2da4317ecaf5c4da21beb0d Mon Sep 17 00:00:00 2001
From: Kaushal M <kshlmster@gmail.com>
Date: Fri, 13 Jan 2023 21:34:52 +0530
Subject: [PATCH] Add `mincore` to SystemCallFilter
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Calling the `lookandfeeltool` crashes when running `darkman` under
Plasma Wayland. Truncated log of the crash from journalctl is below.

```
.
.
.
Jan 14 01:17:23 archxps systemd-coredump[3599]: [🡕] Process 3219 (lookandfeeltool) of user 1000 dumped core.

                                                Stack trace of thread 3219:
                                                #0  0x00007f0614b19b1b mincore (libc.so.6 + 0x100b1b)
.
.
.
Jan 14 01:17:23 archxps darkman[3214]: /home/kaushal/.local/share/dark-mode.d/00-dark.sh: line 2:  3219 Bad system call         (core dumped) lookandfeeltool -a org.kde.breezedark.desktop
.
.
.
```

Allowing the `mincore` system call allows `lookandfeeltool` to run
successfully.
---
 darkman.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/darkman.service b/darkman.service
index e795fdb..0c85669 100644
--- a/darkman.service
+++ b/darkman.service
@@ -13,7 +13,7 @@ Slice=background.slice
 LockPersonality=yes
 RestrictNamespaces=yes
 SystemCallArchitectures=native
-SystemCallFilter=@system-service @timer
+SystemCallFilter=@system-service @timer mincore
 MemoryDenyWriteExecute=yes
 
 [Install]
-- 
GitLab