summaryrefslogtreecommitdiffstats
path: root/sandbox-seccomp-filter.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2022-08-11 00:58:28 +0200
committerDamien Miller <djm@mindrot.org>2022-08-11 00:58:28 +0200
commit2580916e48721802220c61ce9e0df1297c00bc07 (patch)
tree97c3ea42d6fb0e690e30ba9c533beea674cafbe4 /sandbox-seccomp-filter.c
parentTest hostbased auth on github runners. (diff)
downloadopenssh-2580916e48721802220c61ce9e0df1297c00bc07.tar.xz
openssh-2580916e48721802220c61ce9e0df1297c00bc07.zip
fix SANDBOX_SECCOMP_FILTER_DEBUG
Diffstat (limited to 'sandbox-seccomp-filter.c')
-rw-r--r--sandbox-seccomp-filter.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c
index 4ce80cb2a..9929bdb68 100644
--- a/sandbox-seccomp-filter.c
+++ b/sandbox-seccomp-filter.c
@@ -23,17 +23,20 @@
* E.g.
* auditctl -a task,always -F uid=<privsep uid>
*/
-/* #define SANDBOX_SECCOMP_FILTER_DEBUG 1 */
-
-/* XXX it should be possible to do logging via the log socket safely */
+#define SANDBOX_SECCOMP_FILTER_DEBUG 1
+#if 0
+/*
+ * For older toolchains, it may be necessary to use the kernel
+ * headers directly.
+ */
#ifdef SANDBOX_SECCOMP_FILTER_DEBUG
-/* Use the kernel headers in case of an older toolchain. */
# include <asm/siginfo.h>
# define __have_siginfo_t 1
# define __have_sigval_t 1
# define __have_sigevent_t 1
#endif /* SANDBOX_SECCOMP_FILTER_DEBUG */
+#endif
#include "includes.h"
@@ -362,7 +365,7 @@ ssh_sandbox_init(struct monitor *monitor)
#ifdef SANDBOX_SECCOMP_FILTER_DEBUG
extern struct monitor *pmonitor;
-void mm_log_handler(LogLevel level, const char *msg, void *ctx);
+void mm_log_handler(LogLevel level, int forced, const char *msg, void *ctx);
static void
ssh_sandbox_violation(int signum, siginfo_t *info, void *void_context)
@@ -372,7 +375,7 @@ ssh_sandbox_violation(int signum, siginfo_t *info, void *void_context)
snprintf(msg, sizeof(msg),
"%s: unexpected system call (arch:0x%x,syscall:%d @ %p)",
__func__, info->si_arch, info->si_syscall, info->si_call_addr);
- mm_log_handler(SYSLOG_LEVEL_FATAL, msg, pmonitor);
+ mm_log_handler(SYSLOG_LEVEL_FATAL, 0, msg, pmonitor);
_exit(1);
}