From patchwork Tue Nov 17 17:52:16 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5730 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:cb07:b0:37a:c59:1bbd with SMTP id nc7csp4958492dyb; Tue, 17 Nov 2026 09:53:04 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErEqqC010SEaiNuEG9G4OE38HK7B1V27r++w0jgDpAvF17L87C/bI6c2FXeufb1Xw+2tGv3uEYa+NWY=@openvpn.net X-Received: by 2002:a05:7022:7e83:b0:1b2:60ab:1e9d with SMTP id a92af1059eb24-1b543c3fb96mr369969c88.37.1794937984205; Tue, 17 Nov 2026 09:53:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794937984; cv=none; d=google.com; s=arc-20260327; b=k2oSFBTrZwMVLFz8oUr1QZ7086ODy/UTSPlCjWZvrv67p+0aGzt1gucX3QmoBXlpD2 iarQ2tSe+MLVvv8tDYdJrB+JQbfXRVs+ZxLJ01F0NtHPTO3gddInjU/yreXuJf4uBFCl DaPxIbXXPqVoGwG+ktB/lcW1IGB+IX12oEo3POCZ3w2KyHqhFmIJl4kj3RI2UKqM83Bi 7O13b9rNasJ/1R1n+wOqu5Ftf05xd2dUsSSgL78SXzn+zpHcLv60VKOzFnTBJMgsOQbF 8RAfu6+LgJ3slQC785DKb6OtI0MgzMX1pd30M8O/Rxw2bBplwlq9Xc0H/qfqG+Ab8U1t t2EQ== 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=qel6GX7SKD499gtGvssscw+b4jk5lt38ngtoTQk1Wtg=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=lb6gyJ35Yl2Sh5qNQPrmc9cK2IvYKMcqrZyhLB9JGYQzyxcImiiVhEGRPpbfHtnIHe I/TQR6B1V/cyk7ghrZo9G6qgTKhFul3E5ezmE+kYHBmp8hjK4IxuOnGdn8ObZyr9MbWB jLH6DEEvO+g7nXWkz8tllLb/Ukuq68DGc98KXzNvPzFJFzBuCMZg5o584o0kt3G43DQJ 3jFkHHwO4Yu2NpKjoXhmf/60GbzGeVoAZQhvjvjsdHodleeyLKaDsGNiehQQEZw9lAGn l7F6jRzG38dxq1ayfKwAcOHIBZDy5Y5a2LJqjoPejy2hOpaDpi8cqIJQopIlEaEazq0c SS2Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=GVRGVHAI; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=YCJ00UOJ; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=JgajfpXu; 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 a92af1059eb24-1b5031fe903si39244494c88.24.2026.11.17.09.53.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Nov 2026 09:53:04 -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=GVRGVHAI; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=YCJ00UOJ; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=JgajfpXu; 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=qel6GX7SKD499gtGvssscw+b4jk5lt38ngtoTQk1Wtg=; b=GVRGVHAI61iwgU etLoU2KqFXLzSYf0qH4S/hOwMER9VPdafKz8242KwO0230Tbv7ZlNvISAqM+Wm7X2Q2i1TKOB3zk+ 5RDn9XWgwoDqC8k/kTR+fWTMPMdcHjedDu5Mnn+fKxnglYzxN5xwLirK0mDXVX61qEvHpsj9oCrdl mCs=; 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 1xTNMc-000000003Iy-0N5V; Tue, 17 Nov 2026 17:53:02 +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 1xTNMD-000000003IO-339Z for openvpn-devel@lists.sourceforge.net; Tue, 17 Nov 2026 17:52:37 +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=XWEmDnNH5UFT/GLjfoOHI50Zk9LrHUrT1J5lfd/M/x8=; b=YCJ00UOJnRkuMVJdWJetqB/Ctc AQz4szJ25B/3WrAYTwsDllmci942yUlUXfgFAFv1jjclzvmLjK1Z4XwiUBSguclof2KH2XrMG0pHy Rgc+Wbg6bk6BT+O94P+G899ToxOWHMJ6KPR/DO9pdhZ6lJRp6KmB9P4HPRUlcp2VBPJ8=; 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=XWEmDnNH5UFT/GLjfoOHI50Zk9LrHUrT1J5lfd/M/x8=; b=JgajfpXuvGAWNn6Pqxua0Oz1l1 BtvsCseA+Z9S42Xk/Lbc6WYmfWkTnZtfwebhctLzbjGzsVHFwk6vIGklAOV/wn4MRiSbuDBAOE25t kyNc9Fmys9FgRxNXdlqtIeKbjWEBW9vjNHLNV8/9aB43Oky51X9zjk2PaI4MBzwcJu9M=; 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 1xTNM6-000000005F1-2Avv for openvpn-devel@lists.sourceforge.net; Tue, 17 Nov 2026 17:52:32 +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 6AHHqOkU014571 for ; Tue, 17 Nov 2026 18:52:24 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6AHHqNja014570 for openvpn-devel@lists.sourceforge.net; Tue, 17 Nov 2026 18:52:23 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 17 Nov 2026 18:52:16 +0100 Message-ID: <20261117175223.14555-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 read() returning -1 was taken as success, so a failed read from systemd-ask-password yielded an empty response instead of an error. Change-Id: Ic49db236b36014ea6ee621a09252a534e3d05ef7 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: 1xTNM6-000000005F1-2Avv Subject: [Openvpn-devel] [PATCH v2] console_systemd: treat read() error as failure 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: 1882128891641192896 X-GMAIL-MSGID: 1882128891641192896 From: Razvan Cojocaru read() returning -1 was taken as success, so a failed read from systemd-ask-password yielded an empty response instead of an error. Change-Id: Ic49db236b36014ea6ee621a09252a534e3d05ef7 Signed-off-by: Razvan Cojocaru Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2205 --- 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/+/2205 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/src/openvpn/console_systemd.c b/src/openvpn/console_systemd.c index f0ca7fa..059686f 100644 --- a/src/openvpn/console_systemd.c +++ b/src/openvpn/console_systemd.c @@ -76,7 +76,7 @@ return false; } memset(input, 0, capacity); - if (read(std_out, input, capacity - 1) != 0) + if (read(std_out, input, capacity - 1) > 0) { chomp(input); ret = true;