From 9e6e543c173460f394ea13c9b2aa572aef1f6833 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 20 Mar 2019 18:59:59 +0100 Subject: [PATCH] seccomp: add debug messages to seccomp_protect_hostname() --- src/shared/seccomp-util.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/shared/seccomp-util.c b/src/shared/seccomp-util.c index ba3f433106b..9a8a4cf0aba 100644 --- a/src/shared/seccomp-util.c +++ b/src/shared/seccomp-util.c @@ -1776,16 +1776,20 @@ int seccomp_protect_hostname(void) { SCMP_ACT_ERRNO(EPERM), SCMP_SYS(sethostname), 0); - if (r < 0) + if (r < 0) { + log_debug_errno(r, "Failed to add sethostname() rule for architecture %s, skipping: %m", seccomp_arch_to_string(arch)); continue; + } r = seccomp_rule_add_exact( seccomp, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(setdomainname), 0); - if (r < 0) + if (r < 0) { + log_debug_errno(r, "Failed to add setdomainname() rule for architecture %s, skipping: %m", seccomp_arch_to_string(arch)); continue; + } r = seccomp_load(seccomp); if (IN_SET(r, -EPERM, -EACCES)) -- 2.47.3