From patchwork Mon Apr 20 00:21:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1092 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director9.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id qDieDd53nV5/XAAAIUCqbw for ; Mon, 20 Apr 2020 06:22:22 -0400 Received: from proxy1.mail.ord1d.rsapps.net ([172.30.191.6]) by director9.mail.ord1d.rsapps.net with LMTP id gGR8Dd53nV6DLAAAalYnBA ; Mon, 20 Apr 2020 06:22:22 -0400 Received: from smtp36.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy1.mail.ord1d.rsapps.net with LMTP id KMfkDd53nV50ZwAAasrz9Q ; Mon, 20 Apr 2020 06:22:22 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp36.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=unstable.cc X-Suspicious-Flag: YES X-Classification-ID: d1e88b3c-82f0-11ea-909f-525400c11307-1-1 Received: from [216.105.38.7] ([216.105.38.7:35270] helo=lists.sourceforge.net) by smtp36.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 29/B4-15791-DD77D9E5; Mon, 20 Apr 2020 06:22:22 -0400 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jQTYU-0001eL-9M; Mon, 20 Apr 2020 10:21:34 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jQTYS-0001eA-PR for openvpn-devel@lists.sourceforge.net; Mon, 20 Apr 2020 10:21: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: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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6BPFQ5f6GhlQHzQP3hW054nT9Ao2Cuz8ZiRTX079OJU=; b=kh+KpSDcSm2CqyO2etoJJk2KMK vdQdtv6oYqY0e9cJiAOJm5kQsn2mWSfuNeMfgWkE3Gy/AZIsvLmRbqXN1jKbAWGbZ8di71kL0XgYr 1AXIlTFT2wd4TwkNVupdrYFHRIpHhQOBojnTofbIvb7duSMik29/j2GDPYGuEZ7X+VD8=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version: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:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=6BPFQ5f6GhlQHzQP3hW054nT9Ao2Cuz8ZiRTX079OJU=; b=i 7pcDL1xch29+ZjbM2dHDO9urUlrhOFak2Ymup/ZETDEpFDFZgsccf9JjCbFVNzybWn0blmViUZySq IRXKNiIb21aUVXIs3PBoEsJ9irvrBSTu9796sLXYrz5nyz9zjvWqMlY3jgBGx2/7vhB2clcaOmzmG aqyU54lryuUsLkWs=; Received: from s2.neomailbox.net ([5.148.176.60]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1jQTYN-0075Ka-AB for openvpn-devel@lists.sourceforge.net; Mon, 20 Apr 2020 10:21:32 +0000 From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Mon, 20 Apr 2020 12:21:02 +0200 Message-Id: <20200420102102.20981-1-a@unstable.cc> MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [5.148.176.60 listed in list.dnswl.org] 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: unstable.cc] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1jQTYN-0075Ka-AB Subject: [Openvpn-devel] [PATCH] remove bogus file check on --genkey argument 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: Antonio Quartulli Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox When invoking openvpn as standalone with the --genkey argument, options_postprocess() is not called at all because do_genkey() takes over the execution earlier. For this reason, checking the --genkey argument in options_postprocess_filechecks() is a no-op. Geti rid of the bogus check altogether. Signed-off-by: Antonio Quartulli Acked-by: Gert Doering Acked-By: Arne Schwabe genkey_filename, R_OK, - "--genkey"); errs |= check_file_access(CHKACC_FILE|CHKACC_INLINE|CHKACC_PRIVATE, options->shared_secret_file, R_OK, "--secret");