if (unshare(CLONE_NEWUTS) < 0) {
if (!ERRNO_IS_NOT_SUPPORTED(errno) && !ERRNO_IS_PRIVILEGE(errno)) {
*ret_exit_status = EXIT_NAMESPACE;
- return log_exec_error_errno(c,
- p,
- errno,
- "Failed to set up UTS namespacing: %m");
+ return log_exec_error_errno(c, p, errno, "Failed to set up UTS namespacing: %m");
}
- log_exec_warning(c,
- p,
- "ProtectHostname=yes is configured, but UTS namespace setup is "
- "prohibited (container manager?), ignoring namespace setup.");
+ log_exec_warning(c, p,
+ "ProtectHostname=%s is configured, but UTS namespace setup is prohibited (container manager?), ignoring namespace setup.",
+ protect_hostname_to_string(c->protect_hostname));
}
} else
- log_exec_warning(c,
- p,
- "ProtectHostname=yes is configured, but the kernel does not "
- "support UTS namespaces, ignoring namespace setup.");
+ log_exec_warning(c, p,
+ "ProtectHostname=%s is configured, but the kernel does not support UTS namespaces, ignoring namespace setup.",
+ protect_hostname_to_string(c->protect_hostname));
#if HAVE_SECCOMP
if (c->protect_hostname == PROTECT_HOSTNAME_YES) {