From ccde3fb7a2b8776212cadc2631a17e27dacdc3f0 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Tue, 12 Sep 2017 13:12:45 +0200 Subject: [PATCH] seccomp: Improve error message Print "SECCOMP_FILE not specified" instead of "failed to load (null)". Signed-off-by: Michal Sojka --- jail/preload.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jail/preload.c b/jail/preload.c index 5466f27..24358c6 100644 --- a/jail/preload.c +++ b/jail/preload.c @@ -27,6 +27,11 @@ static int __preload_main__(int argc, char **argv, char **envp) { char *env_file = getenv("SECCOMP_FILE"); + if (!env_file || !env_file[0]) { + ERROR("SECCOMP_FILE not specified\n"); + return -1; + } + if (install_syscall_filter(*argv, env_file)) return -1; -- 2.11.0