summaryrefslogtreecommitdiff
path: root/openbsd_priv.c
diff options
context:
space:
mode:
authorStanisław Pitucha <viraptor@gmail.com>2018-07-08 21:01:34 +1000
committerdormando <dormando@rydia.net>2019-08-28 14:36:03 -0700
commitec34cb718b64dccb91ba440846eafa97aa5ca5db (patch)
tree4108c0b7d2689294bf0dff421a36c9b512e418a4 /openbsd_priv.c
parent05693047c81a7ace8111d5e541d47f74b1d884a7 (diff)
downloadmemcached-ec34cb718b64dccb91ba440846eafa97aa5ca5db.tar.gz
Add a handler for seccomp crashes
When seccomp causes a crash, use a SIGSYS action and handle it to print out an error. Most functions are not allowed at that point (no buffered output, no ?printf functions, no abort, ...), so the implementation is as minimal as possible. Print out a message with the syscall number and exit the process (all threads).
Diffstat (limited to 'openbsd_priv.c')
-rw-r--r--openbsd_priv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/openbsd_priv.c b/openbsd_priv.c
index 1e26ece..46e0883 100644
--- a/openbsd_priv.c
+++ b/openbsd_priv.c
@@ -26,3 +26,6 @@ void drop_privileges() {
}
}
}
+
+void drop_worker_privileges(void) {
+}