aboutsummaryrefslogtreecommitdiffstats
path: root/src/bindings/pledge.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-10-23 17:35:03 +0200
committerbptato <nincsnevem662@gmail.com>2024-10-23 19:08:39 +0200
commit5c24b64fe5b242bdba68fe3d48489bed26b48eae (patch)
treec7408078c44792314cac43cfa23ae5e56996630e /src/bindings/pledge.nim
parentb0bb61e830e76169f41db186b5946ae6859f4e6a (diff)
downloadchawan-5c24b64fe5b242bdba68fe3d48489bed26b48eae.tar.gz
sandbox: replace libseccomp with chaseccomp
This drops libseccomp as a dependency. Also, move the capsicum/pledge definitions from bindings to sandbox.nim because they are only used there. Interestingly, after integrating chaseccomp I found that the stbi process would mysteriously crash by a getrandom(2) syscall. Closer investigation revealed it is only called on the initialization of glibc's malloc; presumably it had never surfaced before because libseccomp would always allocate before entering the sandbox. So I've added getrandom to our filter as well.
Diffstat (limited to 'src/bindings/pledge.nim')
-rw-r--r--src/bindings/pledge.nim6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/bindings/pledge.nim b/src/bindings/pledge.nim
deleted file mode 100644
index 8d265fe6..00000000
--- a/src/bindings/pledge.nim
+++ /dev/null
@@ -1,6 +0,0 @@
-{.push header: "<unistd.h>", importc.}
-
-proc pledge*(promises, execpromises: cstring): cint
-proc unveil*(path, permissions: cstring): cint
-
-{.pop.}