| Message ID | 20211015175330.15760-1-selva.nair@gmail.com |
|---|---|
| State | Accepted |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net> Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director12.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id gGxFD2zAaWH1SAAAIUCqbw (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) for <patchwork@openvpn.net>; Fri, 15 Oct 2021 13:54:52 -0400 Received: from proxy19.mail.ord1d.rsapps.net ([172.30.191.6]) by director12.mail.ord1d.rsapps.net with LMTP id 8BbvDmzAaWF1KgAAIasKDg (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) for <patchwork@openvpn.net>; Fri, 15 Oct 2021 13:54:52 -0400 Received: from smtp3.gate.ord1c ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy19.mail.ord1d.rsapps.net with LMTPS id CFbPDmzAaWFBSAAAyH2SIw (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) for <patchwork@openvpn.net>; Fri, 15 Oct 2021 13:54:52 -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: smtp3.gate.ord1c.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; dkim=fail (signature verification failed) header.d=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Suspicious-Flag: YES X-Classification-ID: fecc5d8a-2de0-11ec-8cbd-842b2b47481a-1-1 Received: from [216.105.38.7] ([216.105.38.7:54206] helo=lists.sourceforge.net) by smtp3.gate.ord1c.rsapps.net (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 0D/A7-28333-B60C9616; Fri, 15 Oct 2021 13:54:51 -0400 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.90_1) (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) id 1mbROp-00043g-Q8; Fri, 15 Oct 2021 17:53:43 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from <selva.nair@gmail.com>) id 1mbROo-00043a-NI for openvpn-devel@lists.sourceforge.net; Fri, 15 Oct 2021 17:53:42 +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=PlAvRCFMTossMmNnNrrvKfo6+MAtnRCvZyxFl9Zrp44=; b=ds7xPpG4GRUTFwRNnBV7n3Q/PI 6tzLrFMTcZm9MRaAfuhNuRRlhJYmO4OA7cjey23mCV99SBNtuTmyoaiuaUPQvSVVMtp+8Zs8aHx3y LY3M7wYC3xMnINjBLkw1G8fvHn6KU6YAsQ9FhzfuOT17MnXx9zo45GdCHKNxuvsHZCh8=; 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=PlAvRCFMTossMmNnNrrvKfo6+MAtnRCvZyxFl9Zrp44=; b=O UlVjkXYKGumRUIYzgSjO7k9xB/bK3vY4LPeb8JyfpLJeRUDunp9i8yas5JQSok4FG5tKXpCLZ+hsK +2p+YLPatSi7Iz3pckbOHeh1rx1DaYtgqXsRWv8lcfLu2JIKlzxaSo9By/knEVrMl63iXWj+vncz2 k+n9sVYz5yOHiTJI=; Received: from mail-io1-f51.google.com ([209.85.166.51]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.3) id 1mbROm-0000Yg-UU for openvpn-devel@lists.sourceforge.net; Fri, 15 Oct 2021 17:53:42 +0000 Received: by mail-io1-f51.google.com with SMTP id b188so3755026iof.8 for <openvpn-devel@lists.sourceforge.net>; Fri, 15 Oct 2021 10:53:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PlAvRCFMTossMmNnNrrvKfo6+MAtnRCvZyxFl9Zrp44=; b=OAtwkGPOhDqckHeN21TBqt4qYJbafVtyVzn3p9x5Px4W8JO+ReKQylY7YFbpJzlraI CdyFPOFE704EMJFjkYRvFTaMw6bjvraVW6lDppKfbryvmFouSrhQDJPxv2HmWtuNksIo +6riGIoQPXFgIXAvRVsO1NKDILpvA2CUjOTQxj0vNr9WLJzrIm20S54zznlVMouTgNd6 fNXSUoqUCRxE/gECNTzfsnftSG8uOCMVEL8sl54aKg1w48patHsINWIqkHcdnz4hkBz0 ii8eLpz55YHRtpA4EHO3KOepJFj88W2fLjvEzXBXPtpWdxfRyfsZF159+INtx3S177Mb ta1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PlAvRCFMTossMmNnNrrvKfo6+MAtnRCvZyxFl9Zrp44=; b=VpRnr5DtB27gY2HILO1ffORlRQugpb9y1NHZLYXIGx36dEKrWgVReWigUOw1yG+hU+ 3EbxAkv86NKqIrH8lpCGw6DTYOMeBBdyeI6BXc8zUqSdOINE27GS/7WCfGqhs8J6zhS/ ks1VJMUS/3dqOwEjpx/T1qZYOhSKzPURBGU2qfsW8Y6VldvZhM17El7NQj4gfzh9LyT3 KDdDDXPJYA8KDZPpe2Myyk2reevkhS0YCzwPLkfREQWqWbYz9WlE6rRKt08to8Ezr4nd YCNG9YjvdA59/I5wFJCF1FxQgECxlNU3QEtcMHHGYvzZoum//2bYUfTjneeUVojUUXt5 TxKA== X-Gm-Message-State: AOAM532Oylvs0kt9fSBB5bo1Emq3pGQvOXbWT9WYhne/O4v9QY3aZ29Y hwkIeSfVBjxgiC0E2wjF8sP6E4sKjbE= X-Google-Smtp-Source: ABdhPJxpVkVphVwQAtxcXrwwlOWguHjGwLoOyYfJEBebgeCKagAoYkZyt9csPdHU8cAbPLGWR5OJew== X-Received: by 2002:a6b:b40f:: with SMTP id d15mr4819733iof.5.1634320414811; Fri, 15 Oct 2021 10:53:34 -0700 (PDT) Received: from uranus.home.sansel.ca (bras-vprn-tnhlon4053w-lp130-02-70-51-223-227.dsl.bell.ca. [70.51.223.227]) by smtp.gmail.com with ESMTPSA id r18sm3065741ilo.35.2021.10.15.10.53.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 10:53:34 -0700 (PDT) From: selva.nair@gmail.com To: openvpn-devel@lists.sourceforge.net Date: Fri, 15 Oct 2021 13:53:30 -0400 Message-Id: <20211015175330.15760-1-selva.nair@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.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: Selva Nair Not sure where these came from, but here goes: S_IRUSR = 0 --> _S_IREAD S_IWUSR = 0 --> _S_IWRITE Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [selva.nair[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.51 listed in list.dnswl.org] -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_H2 RBL: Average reputation (+2) [209.85.166.51 listed in wl.mailspike.net] X-Headers-End: 1mbROm-0000Yg-UU Subject: [Openvpn-devel] [PATCH] Fix some more wrong defines in config-msvc.h X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: <openvpn-devel.lists.sourceforge.net> List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe> List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel> List-Post: <mailto:openvpn-devel@lists.sourceforge.net> List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help> List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox |
| Series |
[Openvpn-devel] Fix some more wrong defines in config-msvc.h
|
|
Commit Message
Selva Nair
Oct. 15, 2021, 6:53 a.m. UTC
From: Selva Nair <selva.nair@gmail.com>
Not sure where these came from, but here goes:
S_IRUSR = 0 --> _S_IREAD
S_IWUSR = 0 --> _S_IWRITE
ENABLE_DEBUG is on, but I do not think we want it in production build.
Changed to ENABLE_DEBUG 0
S_IRGRP is not defined but seems to be used. I have added it, remove if
not required.
This define is based on mingw and matches MS docs on <filesystem>
(https://docs.microsoft.com/en-us/cpp/standard-library/filesystem-enumerations?view=msvc-160)
Should fix Trac #1430 but untested (I do not have a setup at hand for msvc build).
---
config-msvc.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Comments
On Fri, Oct 15, 2021 at 1:53 PM <selva.nair@gmail.com> wrote: > From: Selva Nair <selva.nair@gmail.com> > > Not sure where these came from, but here goes: > > S_IRUSR = 0 --> _S_IREAD > S_IWUSR = 0 --> _S_IWRITE > > ENABLE_DEBUG is on, but I do not think we want it in production build. > Changed to ENABLE_DEBUG 0 > > S_IRGRP is not defined but seems to be used. I have added it, remove if > not required. > This define is based on mingw and matches MS docs on <filesystem> > ( > https://docs.microsoft.com/en-us/cpp/standard-library/filesystem-enumerations?view=msvc-160 > ) > > Should fix Trac #1430 but untested (I do not have a setup at hand for msvc > build). > The patch for master doesn't apply cleantly to 2.5. Please use the next one marked "for 2.5" on the release branch. Selva <div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 15, 2021 at 1:53 PM <<a href="mailto:selva.nair@gmail.com">selva.nair@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Selva Nair <<a href="mailto:selva.nair@gmail.com" target="_blank">selva.nair@gmail.com</a>><br> <br> Not sure where these came from, but here goes:<br> <br> S_IRUSR = 0 --> _S_IREAD<br> S_IWUSR = 0 --> _S_IWRITE<br> <br> ENABLE_DEBUG is on, but I do not think we want it in production build.<br> Changed to ENABLE_DEBUG 0<br> <br> S_IRGRP is not defined but seems to be used. I have added it, remove if<br> not required.<br> This define is based on mingw and matches MS docs on <filesystem><br> (<a href="https://docs.microsoft.com/en-us/cpp/standard-library/filesystem-enumerations?view=msvc-160" rel="noreferrer" target="_blank">https://docs.microsoft.com/en-us/cpp/standard-library/filesystem-enumerations?view=msvc-160</a>)<br> <br> Should fix Trac #1430 but untested (I do not have a setup at hand for msvc build).<br></blockquote><div><br></div><div>The patch for master doesn't apply cleantly to 2.5. Please use the next one marked "for 2.5" on the release branch.<div><br></div><div>Selva</div></div></div></div>
Hi, > Not sure where these came from, but here goes: According to git blame, those dates back to 2012: https://github.com/OpenVPN/openvpn/commit/4b1a82db0975088dbfe69c2a97f0a96ef972b2a4#diff-f17c6f8c8df2b2934b574e407cbde107338969c6898ce8e8965dc289ae979fc6R97 > S_IRUSR = 0 --> _S_IREAD > S_IWUSR = 0 --> _S_IWRITE MSFT docs says that: "If a value other than some combination of _S_IREAD and _S_IWRITE is specified for pmode—even if it would specify a valid pmode in another operating system—or if any value other than the allowed oflag values is specified, the function generates an assertion in Debug mode and invokes the invalid parameter handler, as described in Parameter Validation." I tried Debug build with --status but haven't seen any assertions. Anyway, it is clear that passing 0 was incorrect. > Should fix Trac #1430 but untested (I do not have a setup at hand for msvc build). If you push your branch to GitHub, it will kick off GitHub Actions build which produces MSVC-built artifacts. Built and tested locally, works as expected - status file is created without "readonly" attribute. Acked-by: Lev Stipakov <lstipakov@gmail.com>
I am sorry, I need to take the ack back. Probably cron2 can fix it in place? -#define ENABLE_DEBUG 1 +#define ENABLE_DEBUG 0 This doesn't really undef ENABLE_DEBUG. Can we just remove "-#define ENABLE_DEBUG 1" ? -- -Lev
Thanks. As with the 2.5 patch, removed the DEBUG #define, and changed
commit message to just refer to trac with "Trac: #1430"
Your patch has been applied to the master branch.
commit 077445d0d82128dc90e50043546d4a2d8647eb9c
Author: Selva Nair
Date: Fri Oct 15 13:53:30 2021 -0400
Fix some more wrong defines in config-msvc.h
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Message-Id: <20211015175330.15760-1-selva.nair@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22942.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
diff --git a/config-msvc.h b/config-msvc.h index b28d8742..301e7ebc 100644 --- a/config-msvc.h +++ b/config-msvc.h @@ -4,7 +4,7 @@ #define ENABLE_PF 1 #define ENABLE_CRYPTO_OPENSSL 1 -#define ENABLE_DEBUG 1 +#define ENABLE_DEBUG 0 #define ENABLE_FRAGMENT 1 #define ENABLE_HTTP_PROXY 1 #define ENABLE_LZO 1 @@ -67,8 +67,9 @@ #define in_addr_t uint32_t #define ssize_t SSIZE_T -#define S_IRUSR 0 -#define S_IWUSR 0 +#define S_IRUSR _S_IREAD +#define S_IWUSR _S_IWRITE +#define S_IRGRP (S_IRUSR >> 3) #define R_OK 4 #define W_OK 2 #define X_OK 1