From patchwork Mon Nov 23 13:49:01 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5769 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:91c9:10b0:11b:d6c:f273 with SMTP id tl9-n1csp2774886lad; Mon, 23 Nov 2026 05:49:35 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErHkT4utMCzH+7jcsSlqmEJQzV/saOjsLJ2YbuI8o16b8yZnFYv1+txvXYBsxyFRfyZw8KJRbYO/erc=@openvpn.net X-Received: by 2002:a05:7301:c089:b0:372:14fb:2573 with SMTP id 5a478bee46e88-3856fd5bf76mr11765030eec.20.1795441774905; Mon, 23 Nov 2026 05:49:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795441774; cv=none; d=google.com; s=arc-20260327; b=Iz2SREqiuDDEDvbpYRrdjD+rU/3lbf3mZ9dQq9XIheEE7cpeCtqijHEhIrMlRem272 kq1oK3RFRTKnQYcjQmEgbE83Y90bqXfjPFQZcFKE4f5irvPNeQf7H8y5X0Sv5zTLNH6o Nc5bH6GgXJwVEVToKCl1uIDPIu2dSAaEDBMT8U2lwSulZm4dwuAS5md0NjE5B2RGDYWJ bT968a6JnxB1teNGbZgcbIVk+j32CVz/XPUKKHzcNjsx0YzH9kVQAmbnSmFFrigcj1/W NCckNz4bHzOjMROJUA4JBMv8S8RNZotnbdfR6pAuZljtm16XYE2Jfs/4EnKgjTOOjaqs g8jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=errors-to:content-transfer-encoding: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; bh=1y3B4n5JbQu8cQhnVsL7rHHa7wThdTDm2GT+oZm014g=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=JGWkLt8PdVahCTwPui9GQrlb/FkBoqGl8e8xmTEvaI2+E4cddu7uoSNRqt7AgXtJFK J48InSZrKZZk7MkrkD8+3YCC+uDJyF21XmkDrlMGiDo/mnVfC5+z81I2XKJ1ZbfcZ0RF GSm1EIC/wJ+OJ4oa1WV/kMr730lVgUmebXVNBrz65PGd9Z57E9DMz0q9ZSKURs5lzb4l z9TcKjnixqteD/vFLea8azLwsxp7FbSg8LV0pdbIhlnAv2so5iteG36STXEHnCHRp2QN Ratj0wayevg3rrM9OyHHOmKnG/S2F8RPztatZKXLOMc/vWFsGdm1R+nl3vkR2wpvZ72P gCCA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=BimCixDz; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=msGJrPDS; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=eHjOQCnw; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 5a478bee46e88-38564768160si46898360eec.3.2026.11.23.05.49.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Nov 2026 05:49:34 -0800 (PST) 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=BimCixDz; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=msGJrPDS; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=eHjOQCnw; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de 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: 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:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=1y3B4n5JbQu8cQhnVsL7rHHa7wThdTDm2GT+oZm014g=; b=BimCixDzrmlCv9 PSMmJ72B1b1eLjkbf+l1Z6aEStnISNEzAzYKdX6zCIwxolukIGEWRXRwZYWSMIRVkjTmHVwVF/El3 JLwbK1JpCpjUNX0IbDUwYtlc4fmuY9n0J8pSe4yV4E+13IyNP4lF9+u5ixEJlVyaCK14S3yR6yqsh VAI=; Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.100.1) (envelope-from ) id 1xVUQH-000000003k5-3Qy7; Mon, 23 Nov 2026 13:49:33 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xVUQG-000000003jX-1Cxk for openvpn-devel@lists.sourceforge.net; Mon, 23 Nov 2026 13:49:32 +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:To:From:Sender:Reply-To:Cc: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-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=PExV2HQw8cjzHVoCbqjb6Tu9g2celH2E3PNt9eoTd7U=; b=msGJrPDSoQlkfN1yNx/XIvAqKI SNNMQruu6pvBlT4ybhvTbpc0hOeIKdPrfs2zd5WAZ9FBbjyduVsDVBIQ3vB/4nF3wj/lpxo5oEytE u8HEEb5fkdfBs/dNZGyyRvSG381i38agIVnocmP61kgGoZtjcsX5V5GXtTvrO8SY+t4k=; 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:To:From:Sender:Reply-To:Cc: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-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PExV2HQw8cjzHVoCbqjb6Tu9g2celH2E3PNt9eoTd7U=; b=eHjOQCnwot+sgx0Y0N82rWqoPu DkRwQOTjXJ/oVF0Xl/GuS0tLOqdAeHi/CXBKqtakYQYH7sQh9iZ/Iv16q4PhAtPrOZYU0idgKniX9 whQHkevIfEuY1U1+tSbMoW9wPLGax2FqfxTXJpzmTL9AQT6dnkZudcHWWf5MFiV9/qw4=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1) id 1xVUPx-00000000370-3XAo for openvpn-devel@lists.sourceforge.net; Mon, 23 Nov 2026 13:49:15 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 6ANDn7BG031712 for ; Mon, 23 Nov 2026 14:49:07 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6ANDn7bx031711 for openvpn-devel@lists.sourceforge.net; Mon, 23 Nov 2026 14:49:07 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Mon, 23 Nov 2026 14:49:01 +0100 Message-ID: <20261123134906.31644-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-2.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: Razvan Cojocaru man_need() already guarantees p[1] for log and echo, and up_query_type is non-NULL once "needed" holds in man_query_password_base64(). Change-Id: I58b88ca3934e52cfc5140a564c9ed7260857ce80 Signed-off-by: Razvan Cojocaru Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/o [...] Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1xVUPx-00000000370-3XAo Subject: [Openvpn-devel] [PATCH v1] manage: drop redundant NULL checks 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: 1882657154416638612 X-GMAIL-MSGID: 1882657154416638612 From: Razvan Cojocaru man_need() already guarantees p[1] for log and echo, and up_query_type is non-NULL once "needed" holds in man_query_password_base64(). Change-Id: I58b88ca3934e52cfc5140a564c9ed7260857ce80 Signed-off-by: Razvan Cojocaru Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2238 --- 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/+/2238 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c index 86c498e..d5b1ff8 100644 --- a/src/openvpn/manage.c +++ b/src/openvpn/manage.c @@ -1051,7 +1051,7 @@ msg(M_CLIENT, "ERROR: no password is currently needed at this time"); return; } - if (!man->connection.up_query_type || !streq(man->connection.up_query_type, type)) + if (!streq(man->connection.up_query_type, type)) { msg(M_CLIENT, "ERROR: password of type '%s' entered, but we need one of type '%s'", type, man->connection.up_query_type); @@ -1684,10 +1684,7 @@ { if (man_need(p, 1, MN_AT_LEAST)) { - if (p[1]) - { - man_log(man, p[1]); - } + man_log(man, p[1]); if (p[2]) { man_log(man, p[2]); @@ -1698,10 +1695,7 @@ { if (man_need(p, 1, MN_AT_LEAST)) { - if (p[1]) - { - man_echo(man, p[1]); - } + man_echo(man, p[1]); if (p[2]) { man_echo(man, p[2]);