From patchwork Fri Sep 12 13:16:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 4410 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:b149:b0:671:5a2c:6455 with SMTP id s9csp3799230maw; Fri, 12 Sep 2025 06:16:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX7hEo69sn+mP4nxd7NQTa8VTnVb3YAoMW+JXU3avVYCRd7I/+7/bALf5zoZByQ9cdlaM0kjI9DczQ=@openvpn.net X-Google-Smtp-Source: AGHT+IFmyP+xKNhronpb4x74TbBg00NmmXSHWIpZ9KE8x3nMwFEMd4FU1Lkwfr+aC3YrebXORIDn X-Received: by 2002:a05:6871:7589:b0:328:d4ef:941d with SMTP id 586e51a60fabf-32e56dbb479mr1560509fac.45.1757682988052; Fri, 12 Sep 2025 06:16:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1757682988; cv=none; d=google.com; s=arc-20240605; b=EO82Y7ke8S8yXQQqDOiVnaX8dN3/iEDu4cDdcdG/v9vpzuu/MXy1KZzALIVsiDvFu1 7LI9BW7+CDYT7vlbl/q8ssBoaboqvChWTo5okLug3sargfyJrbR8i9MLbXp7vIP9JXDt 44G63Rt+sCG1GPi6gtzuoIubTiWt1pli0Z5m2z53pDxqqkh2BFf6QBPcZh9Tv7/19ZOl iEzrKqWkuHbj1ly63UJPEZmtJzvETZIxLljGiKqWi7svFs9GjYrn0GMYmt6ju8vE9GDU myZpwMm42yXhRiEAUKeCM2B2snof3ZBTZ2i0+y5T/nZPRkroeDmgfX/6UQgZ0o/8vL0R X1JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:cc:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=08rnVh5KL5/jWYtqIJTdjsluP8kAyP+luYByaLQp5nI=; fh=Ah1vny6GT2h2jkNHfYFPIaYOg4hzkNSW0Qsu7DwT6uI=; b=knwOF8n1t8h7aHXGYPDafzy/XuZD3I1lOJX/sVUMPl3V3K9r6ni/1tcmSjC4khMe9K rrsBYA7n79qMvbjhBTGurnzr6roeLHFX+LCCT3Cla+BHnckCf07MZ9jE6Io+uneoi3iq Ifhc3i/8b6esNBD4y43brqfNwQ2aDb1gmE42+3xvEqgSP3yxpkWGr2Pv8H0P84WT/D6k V2HcB/ShuvLPXcVmsLbUfstbsb59135nqEN5dGW5gFhY3wuujzhWMZVb8aqkvTRAfNiG LgVoudEFZxXGfGvX1ODhewBBb4ciz0ooTqTPcRjCkUsdoQaJoHjHzOq84xFaHIJmEwD9 HWIA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=Gm0EpF1C; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="e/5FDJX6"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=gJHGDkve; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=BQE4jj6c; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 586e51a60fabf-32d354882dbsi1138550fac.196.2025.09.12.06.16.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Sep 2025 06:16:28 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=Gm0EpF1C; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="e/5FDJX6"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=gJHGDkve; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=BQE4jj6c; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-Id:Date:To:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=08rnVh5KL5/jWYtqIJTdjsluP8kAyP+luYByaLQp5nI=; b=Gm0EpF1Cnrt66mrTLrM2FAgEDb SB2wZnzLn5vkCYqq6XNHcHnfc4+g19YFg2vmZ2vk4HCy3Z5DD60FwDVtM3tcQpf+nCja1mQwQLFlG 5y2RdsIVQSc0zulgcrfprFDw10btdI9vBLA+1lIQk2r4XSU/PUsxb9Iy3vRFgBckrKlw=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1ux3dZ-00070L-Ke; Fri, 12 Sep 2025 13:16:25 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1ux3dY-00070C-LM for openvpn-devel@lists.sourceforge.net; Fri, 12 Sep 2025 13:16:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=H9WDT0Ld5b7RbCmllHySPzZitGPSTx6WX4rulYI2rAs=; b=e/5FDJX66BmbRY9h5URMiK9bEx 4r6ybaCV47ekOqPaXZoTAn6lltC2zRsvBOtEttYGAFQTbkRNA5SRvcfmOtKjDZR0CR0utQoiPCrJM wpPc0c9zijhfukS4aXVLEaD66SapyFKd5d/+BG/42opeBsD9UL7qjHGByaKV9aFvfIqw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=H9WDT0Ld5b7RbCmllHySPzZitGPSTx6WX4rulYI2rAs=; b=gJHGDkve3sW22IoN2QcFFe0lva gE8n+rTBJWNs6m5v8Y32mDacSysOVt7paOMOmN/aZShVsxW213AmjNl/KhcwQZFmkzlRRhC45xgcA mgTdQKZlbJjU3qs4r0fob0kh9zbNAYR4Hm/VX8ZG9hNRX2uxGgm4XoHKVuQJcBuzuZ5E=; Received: from mout-p-201.mailbox.org ([80.241.56.171]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1ux3dX-00014R-Up for openvpn-devel@lists.sourceforge.net; Fri, 12 Sep 2025 13:16:24 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4cNZgZ44LNz9smg; Fri, 12 Sep 2025 15:16:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com; s=MBO0001; t=1757682970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H9WDT0Ld5b7RbCmllHySPzZitGPSTx6WX4rulYI2rAs=; b=BQE4jj6cpHPcsDzrZG/NykUwuojktC7n+VEzPKmHCkqUy1/Ju3efpVQAba4J/oMFerFpsV x44Zr0gTNjUUFloeAHN6tvkBdxN88kVYg+/hTbpevL/gLCDkvYXmhgJzLkwdKDoTbSsQ+Z kR0ovqesDTvQZ4qDLHANnGnP2sPDAbQOd3dWA9JpdyV2REolJC+cLe7s4GVExveJPlBk6L rWy8ysNQ+Md8T5E6T/PV0gSvPuqTRQ1fhqrfPnq45Pz8Z76jnImhksaYnmQGO6Upb/zMOv ciOSutpuoI5+KSxQeChTbwxPovHtK9FwxT4tdxlYcDToxTsqNn9TIbt3HjxI8A== From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Fri, 12 Sep 2025 15:16:09 +0200 Message-Id: <20250912131609.43444-1-frank@lichtenheld.com> In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-1.hosts.colo.sdot.me", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Gert Doering Unlike debugging with printf(), or msg() calls do not need or want a '\n' at the end of the string. Remove those that were overlooked. Change-Id: I889b53ed72efaec546a6609491fae9715726ea00 Signed-off-by: Gert Doering Acked-by: Frank Lichtenheld --- Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 RCVD_IN_MSPIKE_H5 RBL: Excellent reputation (+5) [80.241.56.171 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Headers-End: 1ux3dX-00014R-Up Subject: [Openvpn-devel] [PATCH v1] remove newline characters at the end of msg() calls X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gert Doering Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1843064196512788242?= X-GMAIL-MSGID: =?utf-8?q?1843064196512788242?= From: Gert Doering Unlike debugging with printf(), or msg() calls do not need or want a '\n' at the end of the string. Remove those that were overlooked. Change-Id: I889b53ed72efaec546a6609491fae9715726ea00 Signed-off-by: Gert Doering Acked-by: Frank Lichtenheld --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1180 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 85975ff..7db4eda 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -1036,7 +1036,7 @@ #ifdef ENABLE_ASYNC_PUSH if (m->inotify_watchers) { - msg(D_MULTI_DEBUG, "inotify watchers count: %d\n", hash_n_elements(m->inotify_watchers)); + msg(D_MULTI_DEBUG, "inotify watchers count: %d", hash_n_elements(m->inotify_watchers)); } #endif } diff --git a/src/openvpn/plugin.c b/src/openvpn/plugin.c index e65a3bc..ea76a08 100644 --- a/src/openvpn/plugin.c +++ b/src/openvpn/plugin.c @@ -1007,7 +1007,7 @@ msg(msglevel, "PLUGIN #%d (%s)", i, prefix); while (l) { - msg(msglevel, "[%d] '%s' -> '%s'\n", ++count, l->name, l->value); + msg(msglevel, "[%d] '%s' -> '%s'", ++count, l->name, l->value); l = l->next; } } diff --git a/src/openvpn/socket_util.h b/src/openvpn/socket_util.h index 5ea37dd..361edff 100644 --- a/src/openvpn/socket_util.h +++ b/src/openvpn/socket_util.h @@ -475,7 +475,7 @@ default: #if 0 /* could be called from socket_do_accept() with empty addr */ - msg(M_ERR, "Bad address family: %d\n", af); + msg(M_ERR, "Bad address family: %d", af); ASSERT(0); #endif return 0; diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 6c3096b..29f74a2 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -2392,7 +2392,7 @@ { if (ioctl(if_fd, SIOCGLIFFLAGS, &ifr) < 0) { - msg(M_ERR, "Can't get flags\n"); + msg(M_ERR, "Can't get flags"); } strncpynt(ifr.lifr_name, tt->actual_name, sizeof(ifr.lifr_name)); ifr.lifr_ppa = ppa; @@ -2403,7 +2403,7 @@ } if (ioctl(if_fd, SIOCGLIFFLAGS, &ifr) < 0) { - msg(M_ERR, "Can't get flags\n"); + msg(M_ERR, "Can't get flags"); } /* Push arp module to if_fd */ if (ioctl(if_fd, I_PUSH, "arp") < 0) @@ -2422,18 +2422,18 @@ /* Push arp module to ip_fd */ if (ioctl(tt->ip_fd, I_PUSH, "arp") < 0) { - msg(M_ERR, "Can't push ARP module\n"); + msg(M_ERR, "Can't push ARP module"); } /* Open arp_fd */ if ((arp_fd = open(arp_node, O_RDWR, 0)) < 0) { - msg(M_ERR, "Can't open %s\n", arp_node); + msg(M_ERR, "Can't open %s", arp_node); } /* Push arp module to arp_fd */ if (ioctl(arp_fd, I_PUSH, "arp") < 0) { - msg(M_ERR, "Can't push ARP module\n"); + msg(M_ERR, "Can't push ARP module"); } /* Set ifname to arp */ @@ -2443,7 +2443,7 @@ strioc_if.ic_dp = (char *)𝔦 if (ioctl(arp_fd, I_STR, &strioc_if) < 0) { - msg(M_ERR, "Can't set ifname to arp\n"); + msg(M_ERR, "Can't set ifname to arp"); } } diff --git a/src/openvpn/xkey_helper.c b/src/openvpn/xkey_helper.c index 3820808..72a24b5 100644 --- a/src/openvpn/xkey_helper.c +++ b/src/openvpn/xkey_helper.c @@ -53,7 +53,7 @@ unsigned long e; while ((e = ERR_get_error())) { - msg(M_WARN, "OpenSSL error %lu: %s\n", e, ERR_error_string(e, NULL)); + msg(M_WARN, "OpenSSL error %lu: %s", e, ERR_error_string(e, NULL)); } } @@ -429,7 +429,7 @@ if (derlen > (int)capacity) { ECDSA_SIG_free(ecsig); - msg(M_NONFATAL, "Error: DER encoded ECDSA signature is too long (%d)\n", derlen); + msg(M_NONFATAL, "Error: DER encoded ECDSA signature is too long (%d)", derlen); return 0; } derlen = i2d_ECDSA_SIG(ecsig, &buf); diff --git a/src/openvpn/xkey_provider.c b/src/openvpn/xkey_provider.c index 1819ab0..168b554 100644 --- a/src/openvpn/xkey_provider.c +++ b/src/openvpn/xkey_provider.c @@ -944,7 +944,7 @@ signature_sign(void *ctx, unsigned char *sig, size_t *siglen, size_t sigsize, const unsigned char *tbs, size_t tbslen) { - xkey_dmsg(D_XKEY, "entry with siglen = %zu\n", *siglen); + xkey_dmsg(D_XKEY, "entry with siglen = %zu", *siglen); XKEY_SIGNATURE_CTX *sctx = ctx; ASSERT(sctx); diff --git a/tests/unit_tests/openvpn/test_cryptoapi.c b/tests/unit_tests/openvpn/test_cryptoapi.c index 0cfc952..6e83465 100644 --- a/tests/unit_tests/openvpn/test_cryptoapi.c +++ b/tests/unit_tests/openvpn/test_cryptoapi.c @@ -64,7 +64,7 @@ unsigned long e; while ((e = ERR_get_error())) { - msg(flags, "OpenSSL error %lu: %s\n", e, ERR_error_string(e, NULL)); + msg(flags, "OpenSSL error %lu: %s", e, ERR_error_string(e, NULL)); } } diff --git a/tests/unit_tests/openvpn/test_pkcs11.c b/tests/unit_tests/openvpn/test_pkcs11.c index 56125df..9ba6cfc 100644 --- a/tests/unit_tests/openvpn/test_pkcs11.c +++ b/tests/unit_tests/openvpn/test_pkcs11.c @@ -52,7 +52,7 @@ unsigned long e; while ((e = ERR_get_error())) { - msg(flags, "OpenSSL error %lu: %s\n", e, ERR_error_string(e, NULL)); + msg(flags, "OpenSSL error %lu: %s", e, ERR_error_string(e, NULL)); } } @@ -170,7 +170,7 @@ } else { - msg(M_NONFATAL, "ERROR: get_user_pass called with unknown request <%s> ignored\n", prefix); + msg(M_NONFATAL, "ERROR: get_user_pass called with unknown request <%s> ignored", prefix); ret = false; }