From: Yu Watanabe Date: Wed, 28 Jan 2026 01:48:10 +0000 (+0900) Subject: sd-bus: do not log in higher than LOG_DEBUG from library X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65b50ae2c89d8d1a4d131b47d2f52eb56e276d03;p=thirdparty%2Fsystemd.git sd-bus: do not log in higher than LOG_DEBUG from library Follow-up for 6c8de404c98fb9b965cba68360c2db1e3f55b776. This also adds full stop to the log message, and make "vs" followed by dot for consistency to other messages. --- diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index 69975c53711..c300d511ab1 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -4206,21 +4206,21 @@ static int message_parse_fields(sd_bus_message *m, bool got_ctrunc) { * we also accept fewer fds than declared. Any attempt to actually use a truncated fd will fail later * when sd_bus_message_read_basic() finds the fd index out of range. Too many fds is always wrong. */ if (m->n_fds > n_unix_fds_declared) - return log_error_errno(SYNTHETIC_ERRNO(EBADMSG), - "Received a bus message with too many fds: %" PRIu32 " received vs. %" PRIu32 " declared", + return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG), + "Received a bus message with too many fds: %" PRIu32 " received vs. %" PRIu32 " declared.", m->n_fds, n_unix_fds_declared); if (m->n_fds < n_unix_fds_declared) { if (!got_ctrunc) - return log_error_errno(SYNTHETIC_ERRNO(EBADMSG), - "Received a bus message with too few fds: %" PRIu32 " received vs. %" PRIu32 " declared", + return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG), + "Received a bus message with too few fds: %" PRIu32 " received vs. %" PRIu32 " declared.", m->n_fds, n_unix_fds_declared); - log_error("Received a bus message with MSG_CTRUNC set with %" PRIu32 " fds received vs %" PRIu32 " declared", + log_debug("Received a bus message with MSG_CTRUNC set with %" PRIu32 " fds received vs. %" PRIu32 " declared.", m->n_fds, n_unix_fds_declared); } else if (got_ctrunc) - return log_error_errno(SYNTHETIC_ERRNO(EBADMSG), + return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG), "Received a bus message with truncated control data, refusing."); switch (m->header->type) {