diff options
| author | bptato <nincsnevem662@gmail.com> | 2024-10-23 22:07:23 +0200 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2024-10-23 22:09:40 +0200 |
| commit | 8d12707ccedd7b1ef3d88a4a4da9cfa96f9e0029 (patch) | |
| tree | c3ea9191684f7221cc3fe5f63e6258bdf61982b0 /src | |
| parent | ee0ad00ecc2942af2420bb353b3fd426c9d4d037 (diff) | |
| download | chawan-8d12707ccedd7b1ef3d88a4a4da9cfa96f9e0029.tar.gz | |
sandbox: use relative path to the object file
Diffstat (limited to 'src')
| -rw-r--r-- | src/utils/sandbox.nim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/utils/sandbox.nim b/src/utils/sandbox.nim index 67c0315e..d5c969de 100644 --- a/src/utils/sandbox.nim +++ b/src/utils/sandbox.nim @@ -79,7 +79,12 @@ elif SandboxMode == stPledge: doAssert pledge("stdio", nil) == 0 elif SandboxMode == stSeccomp: - {.passl: "lib/chaseccomp/chaseccomp.o".} + proc sourceParent(): string = + var s = currentSourcePath() + while s.len > 0 and s[^1] != '/': + s.setLen(s.len - 1) + return s + {.passl: sourceParent() & "../../lib/chaseccomp/chaseccomp.o".} import std/posix |