From c100143341e74737d828bba36bf774f5b58f7a04 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 25 Dec 2019 11:08:55 +0000 Subject: [PATCH 1/2] libsandbox/libsandbox.c: add errno output for internal sandbox violations Signed-off-by: Sergei Trofimovich --- libsandbox/libsandbox.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libsandbox/libsandbox.c b/libsandbox/libsandbox.c index 77e9959..0ee92ae 100644 --- a/libsandbox/libsandbox.c +++ b/libsandbox/libsandbox.c @@ -971,8 +971,14 @@ static int check_syscall(sbcontext_t *sbcontext, int sb_nr, const char *func, return 2; /* If we get here, something bad happened */ - sb_ebort("ISE: %s(%s)\n\tabs_path: %s\n\tres_path: %s\n", - func, file, absolute_path, resolved_path); + sb_ebort("ISE: %s(%s)\n" + "\tabs_path: %s\n" + "\tres_path: %s\n" + "\terrno=%i: %s\n", + func, file, + absolute_path, + resolved_path, + errno, strerror(errno)); } bool is_sandbox_on(void) -- 2.24.1