diff --git a/include/kore/python_api.h b/include/kore/python_api.h index cb381b5..7ebf465 100644 --- a/include/kore/python_api.h +++ b/include/kore/python_api.h @@ -36,8 +36,8 @@ void kore_python_log_error(const char *); PyObject *kore_python_callable(PyObject *, const char *); #if defined(__linux__) -void kore_python_seccomp_hook(void); void kore_python_seccomp_cleanup(void); +void kore_python_seccomp_hook(const char *); #endif #if !defined(KORE_SINGLE_BINARY) diff --git a/src/python.c b/src/python.c index 6901308..77344a1 100644 --- a/src/python.c +++ b/src/python.c @@ -486,12 +486,12 @@ kore_python_proc_reap(void) #if defined(__linux__) void -kore_python_seccomp_hook(void) +kore_python_seccomp_hook(const char *method) { struct kore_runtime *rt; PyObject *func, *result; - if ((func = kore_module_getsym("koreapp.seccomp", &rt)) == NULL) + if ((func = kore_module_getsym(hook, &rt)) == NULL) return; if (rt->type != KORE_RUNTIME_PYTHON) @@ -506,7 +506,7 @@ kore_python_seccomp_hook(void) result = PyObject_CallFunctionObjArgs(func, (PyObject *)py_seccomp, NULL); - kore_python_log_error("koreapp.seccomp"); + kore_python_log_error(hook); kore_seccomp_filter("koreapp", py_seccomp->filters, py_seccomp->elm); diff --git a/src/seccomp.c b/src/seccomp.c index 0382ec5..37da274 100644 --- a/src/seccomp.c +++ b/src/seccomp.c @@ -202,7 +202,7 @@ kore_seccomp_enable(void) #if defined(KORE_USE_PYTHON) ufilter = TAILQ_FIRST(&filters); - kore_python_seccomp_hook(); + kore_python_seccomp_hook("koreapp.seccomp"); ufilter = NULL; #endif