From patchwork Tue Nov 14 14:16:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 3432 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:3c06:b0:f2:62eb:61c1 with SMTP id e6csp2205673dys; Tue, 14 Nov 2023 06:17:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IEwFLHNm0kWzCXN/B4MR96q5gMFclFPDaVqIpuPbvpORugv77Gz9aUVzF9B7uadKHu/hrYU X-Received: by 2002:a17:902:e74f:b0:1cd:fbc7:270e with SMTP id p15-20020a170902e74f00b001cdfbc7270emr2512236plf.2.1699971450094; Tue, 14 Nov 2023 06:17:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699971450; cv=none; d=google.com; s=arc-20160816; b=gAjvSmWZYbYJtxThYNXXSNuRi2DISxzl1I3Mjn5pMbz2WYA2Aam2gQbZGtG37wkx4R oNyU1PaCoGEeYhhMI4E1e2E2lpAfYsvLLsXaVKyzcaifXn0Zh26DVCe7TuwTQZRt/JlI dHZbQBM0Pjy8LCWdTlQLGOnvDd3yr/huDnlYHDY3stnzWrDtacwODflv4KGB4FF1rPzw h4HQM5TH7u1UkyeqA1ka5UGhgKgMPaxBxTscg2itOTkfr4ZHqhJ/WGxLXWbk2vMf7Iev sv5PUfCZfg6iHIeNu1GuEyBx/mBzoOacYXcD/cc2WyAe68JjKfXnHa+JDdNwdXqiy30n RjeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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; bh=ASCexDQVM01bZX0AO7mN+369bVtudmLFiOPqe/Ozl+0=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=BeKqXVF9i1qfXDzAHRbPL3D7A4F71DIwNLp8Ec6W9qdZMOZXbsEJ86gAdRt5XpyllE 0249HwHAVjP0A0NHMYlCC0oxfflBcZSXO/8+783XheSBgiqbsznTjSa/WTFBQfj/TpZa yhd+jeF3FikR06Esw8UsiskZqSe1unDexF01+wCC6wpTZClKanMxtDJduW7iV6Y1/zBD BU95h3H4dPDFqX50m3nuGQN5rhEA7U0uXoHnXO/BGEwyMuCN39e7APEKTITPdjfu/uod 4/LRJyd5RHZq+c0xkIcSm0nNRKAKBVblAqwd9MVQgN1nlyCoB0iUswv2XxzM1rEGB3jO hvUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=BamoGVld; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=HNZPwXhA; 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 c9-20020a170902848900b001cdfb3e2b19si7862971plo.611.2023.11.14.06.17.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Nov 2023 06:17:30 -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=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=BamoGVld; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=HNZPwXhA; 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 [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1r2uE2-0001UD-QI; Tue, 14 Nov 2023 14:17:09 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1r2uE0-0001U7-Ki for openvpn-devel@lists.sourceforge.net; Tue, 14 Nov 2023 14:17:07 +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-Subscribe:List-Post:List-Owner:List-Archive; bh=qbPCljhNEiWEcdoz1j2BBd7nuHZvG2seCs4PPxJSmqA=; b=BamoGVldeUWWUXw+NWXwZ/Bjhv 9wRgLQd3JvPT9UTIcUQfVExZ7gCFI35lBd/Aa3Ejoz+tTYSgR+z6ZRwBtIYbhqEgTC7ynB9t8wcGu EHL24tOCsubbOONlaTB0VLEEX4IPGsanESaQdduEEMru9aQzkum9IntsXLFRAuj+cKdw=; 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-Subscribe: List-Post:List-Owner:List-Archive; bh=qbPCljhNEiWEcdoz1j2BBd7nuHZvG2seCs4PPxJSmqA=; b=HNZPwXhAunXPTv9yGje8YCofBo X0DqkUMOzi5nvFiV41MR6GCkpYdbtIP7Scj8A01S90HOMfDzwymSwmvW2cEXZ3GBiEKxB3uTFye9Q lhLAMZ/jyQKD9PnFHKMGylTcw9JkYhGce5u2TdwMisbm9Qdf6vQQMPHovKT8lXNOhZUY=; Received: from dhcp-174.greenie.muc.de ([193.149.48.174] 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.95) id 1r2uDy-0001HH-4O for openvpn-devel@lists.sourceforge.net; Tue, 14 Nov 2023 14:17:07 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.17.1.9/8.17.1.9) with ESMTP id 3AEEGsOn010497 for ; Tue, 14 Nov 2023 15:16:54 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 3AEEGs25010496 for openvpn-devel@lists.sourceforge.net; Tue, 14 Nov 2023 15:16:54 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 14 Nov 2023 15:16:53 +0100 Message-ID: <20231114141653.10486-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", 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: Lev Stipakov This is a regression from commit 01341840 ("add basic CMake based build") Content analysis details: (-0.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1r2uDy-0001HH-4O Subject: [Openvpn-devel] [PATCH v1] config.h: fix incorrect defines for _wopen() 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: =?utf-8?q?1782549263034937896?= X-GMAIL-MSGID: =?utf-8?q?1782549263034937896?= From: Lev Stipakov This is a regression from commit 01341840 ("add basic CMake based build") S_IRUSR and S_IWUSR should NOT be defined as 0 but as _S_IREAD and _S_IWRITE, as it was already fixed in commit 077445d0 ("Fix some more wrong defines in config-msvc.h") Those are used as permission mode when opening a file. Passing zero makes file read-only, which break for example --status-file functionality. Github: fixes OpenVPN/openvpn#454 Trac: #1430 Change-Id: I53eaee85d7b284af6bc63da5f6d8f310ddd96c47 Signed-off-by: Lev Stipakov Acked-by: Gert Doering --- 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/+/429 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/config.h.cmake.in b/config.h.cmake.in index f2cdd39..1c0dd6f 100644 --- a/config.h.cmake.in +++ b/config.h.cmake.in @@ -469,8 +469,8 @@ #define strncasecmp strnicmp #define strcasecmp _stricmp -#define S_IRUSR 0 -#define S_IWUSR 0 +#define S_IRUSR _S_IREAD +#define S_IWUSR _S_IWRITE #define R_OK 4 #define W_OK 2 #define X_OK 1