From: Lennart Poettering Date: Wed, 20 Mar 2019 17:59:59 +0000 (+0100) Subject: seccomp: add debug messages to seccomp_protect_hostname() X-Git-Tag: v242-rc1~5^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9e6e543c173460f394ea13c9b2aa572aef1f6833;p=thirdparty%2Fsystemd.git seccomp: add debug messages to seccomp_protect_hostname() --- 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))