| Message ID | 20200819070746.197-1-lstipakov@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 director11.mail.ord1d.rsapps.net ([172.31.255.6]) by backend30.mail.ord1d.rsapps.net with LMTP id ePF4BBnQPF8JTQAAIUCqbw for <patchwork@openvpn.net>; Wed, 19 Aug 2020 03:09:13 -0400 Received: from proxy16.mail.iad3b.rsapps.net ([172.31.255.6]) by director11.mail.ord1d.rsapps.net with LMTP id GGdoBBnQPF9UBwAAvGGmqA (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) for <patchwork@openvpn.net>; Wed, 19 Aug 2020 03:09:13 -0400 Received: from smtp13.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy16.mail.iad3b.rsapps.net with LMTPS id CNLiOBjQPF+bEwAAPj+4aA (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) for <patchwork@openvpn.net>; Wed, 19 Aug 2020 03:09:12 -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: smtp13.gate.iad3b.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: e2203564-e1ea-11ea-ad0f-5254001dfc40-1-1 Received: from [216.105.38.7] ([216.105.38.7:59270] helo=lists.sourceforge.net) by smtp13.gate.iad3b.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 BF/78-17202-810DC3F5; Wed, 19 Aug 2020 03:09:12 -0400 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) id 1k8ICo-0007za-Ha; Wed, 19 Aug 2020 07:08:18 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from <lstipakov@gmail.com>) id 1k8ICn-0007zQ-Np for openvpn-devel@lists.sourceforge.net; Wed, 19 Aug 2020 07:08:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding: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=wx0079oexxge96ApqiBl9x1aDsyIiQFPAxLyyqGagxs=; b=J3DQlw/ep6sjBDEmUHPhQYQsEx DjDDu4pwZmJWUFj0bytZadhJEwOhMEyuCQ9Rn6xOynbv1WWYxJDQET4M93O3zYQlZj4nFb+XVsZHd okH3fYbBhhPrbvqp6XrLz85ZrwlW1Vdjnd7Rwog6LAEjjvN0rGLlpcvKeOocSctMTLXc=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version: Content-Type:Content-Transfer-Encoding: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=wx0079oexxge96ApqiBl9x1aDsyIiQFPAxLyyqGagxs=; b=G9EK1CuUhM4V70vUloWfdLClQz U5/dB2dP53Az3PhFqlyWkh0oL0T/GAIL1hfqe2OWxbO4jyhVvmuXpee1CGILsga2p8E7phT2gkqFG 9jQt+s6qdmSRL/lwqLsCo6MkHEcKtFpE2ReFOR2uGxoO1Jy2R+RgY3liP8OLqE23etO4=; Received: from mail-wr1-f66.google.com ([209.85.221.66]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1k8ICj-00165f-TC for openvpn-devel@lists.sourceforge.net; Wed, 19 Aug 2020 07:08:17 +0000 Received: by mail-wr1-f66.google.com with SMTP id p20so20434425wrf.0 for <openvpn-devel@lists.sourceforge.net>; Wed, 19 Aug 2020 00:08:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=wx0079oexxge96ApqiBl9x1aDsyIiQFPAxLyyqGagxs=; b=PQwNmnQSceNEod/7MzfVCzkEaZ5iAg5MhHpddSx0yHrXV2aB5KefT0thV1xjH6wBBx yoMkFPkqDs0gnyklWAcu/FlatguzCJ40KG7rq7BMo1XNII3oONdg69sxQEUqvLO9ArG8 BU9VDcf7Z7jELC76sfEOH/DD94+yYPbdCGHQH4eGL6YfIRR3YIi94IDKnR2SYu+/7rPh p4+HJRIePIFJmwsBt5UXRFhqhOGotIkrZMpYuBKYKdKMFeOw6eWfI6Eryk0zt3ieHeoV 1Mv5CXYNKc16dMwqw5yn4bxhjZei6nJfCNZcViNtpiOkKnYBqxNQ4wzE1THdPSE7nGQY ilwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wx0079oexxge96ApqiBl9x1aDsyIiQFPAxLyyqGagxs=; b=MLuQudX46FI5A643BvTDs0dV+DyoE1aaQ3lNUEcscV9sTAOtlSEbxWT/E40umaugvI fMSRRH+ZzVaegx8TWsQxBG5Io1GvonMszALcTJNnn3TcF+G1qhuSiwmnWy+Samu2q/3T 26H8ZNcPKAD+/WdE1nzf1fzh1cnAs+mQYIUh/SivgeH9n0Ttb67mzJSlANHgynLA6Cb6 rijq/8DqLqeSxUS5Mm04DSZ3tnVR5LdjcsfRG7lsUT84EnZG3FDnpIqafwasJ1kK48nl +PLYpOWujRQNUcxDvNrtxL+mvwREQ66K7lfhJ4epp+v07ucgCtmZ9tln3FS/FAv2OXnR zPrA== X-Gm-Message-State: AOAM531BI1pbfsbKfZA1OHQlIgyP2nJqswf/8fPRLRsojl2o0uUVmhHE GgteVriRSo25Uyef56EfcxMRGylOByE= X-Google-Smtp-Source: ABdhPJwd6k3h0g+KxJV4saeld4P+5mMfp3lY48gUvOklXT8wT5GEPEEHgOOXKGozWKzQ8uIuuqwF2Q== X-Received: by 2002:a5d:4fc2:: with SMTP id h2mr22469351wrw.333.1597820879966; Wed, 19 Aug 2020 00:07:59 -0700 (PDT) Received: from LAPTOP-4L3N7KFS.localdomain (nat2.panoulu.net. [185.38.2.2]) by smtp.gmail.com with ESMTPSA id a10sm41216505wrh.36.2020.08.19.00.07.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Aug 2020 00:07:59 -0700 (PDT) From: Lev Stipakov <lstipakov@gmail.com> To: openvpn-devel <openvpn-devel@lists.sourceforge.net> Date: Wed, 19 Aug 2020 10:07:46 +0300 Message-Id: <20200819070746.197-1-lstipakov@gmail.com> X-Mailer: git-send-email 2.17.1 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (lstipakov[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's 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 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: openvpn.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.66 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.66 listed in wl.mailspike.net] X-Headers-End: 1k8ICj-00165f-TC Subject: [Openvpn-devel] [PATCH] tun.c: enable using wintun driver under SYSTEM 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> Cc: Lev Stipakov <lev@openvpn.net> MIME-Version: 1.0 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] tun.c: enable using wintun driver under SYSTEM
|
|
Commit Message
Lev Stipakov
Aug. 18, 2020, 9:07 p.m. UTC
From: Lev Stipakov <lev@openvpn.net> Commit 6d19775a468 has removed SYSTEM elevation hack, but introduced regression - inability to use wintun without interactive service. Proceed with ring buffers registration even if iservice is unavailable and display relevant error message. Trac #1318 Signed-off-by: Lev Stipakov <lev@openvpn.net> --- src/openvpn/tun.c | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-)
Comments
Hi, On Wed, Aug 19, 2020 at 3:08 AM Lev Stipakov <lstipakov@gmail.com> wrote: > From: Lev Stipakov <lev@openvpn.net> > > Commit 6d19775a468 has removed SYSTEM elevation hack, > but introduced regression - inability to use wintun without interactive > service. > > Proceed with ring buffers registration even if iservice is unavailable and > display > relevant error message. > > Trac #1318 > > Signed-off-by: Lev Stipakov <lev@openvpn.net> > --- > src/openvpn/tun.c | 30 +++++++++++++++++++++++++----- > 1 file changed, 25 insertions(+), 5 deletions(-) > > diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c > index 30454454..62557364 100644 > --- a/src/openvpn/tun.c > +++ b/src/openvpn/tun.c > @@ -6158,12 +6158,32 @@ wintun_register_ring_buffer(struct tuntap *tt, > const char *device_guid) > } > else > { > - msg(M_FATAL, "ERROR: Wintun requires SYSTEM privileges and > therefore " > - "should be used with interactive service. If you > want to " > - "use openvpn from command line, you need to do > SYSTEM " > - "elevation yourself (for example with psexec)."); > - } > + if (!register_ring_buffers(tt->hand, > + tt->wintun_send_ring, > + tt->wintun_receive_ring, > + tt->rw_handle.read, > + tt->rw_handle.write)) > + { > + switch (GetLastError()) > + { > + case ERROR_ACCESS_DENIED: > + msg(M_FATAL, "ERROR: Wintun requires SYSTEM > privileges and therefore " > + "should be used with interactive > service. If you want to " > + "use openvpn from command line, you need > to do SYSTEM " > + "elevation yourself (for example with > psexec)."); > + break; > + > + case ERROR_ALREADY_INITIALIZED: > + msg(M_NONFATAL, "Adapter %s is already in use", > device_guid); > + break; > > + default: > + msg(M_NONFATAL | M_ERRNO, "Failed to register ring > buffers"); > + } > + ret = false; > + } > + > + } > return ret; > } > Looks good and running as SYSTEM works now as expected. Tested on 64 bit Windows 10. Acked-by: selva.nair@gmail.com <div dir="ltr"><div>Hi,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 19, 2020 at 3:08 AM Lev Stipakov <<a href="mailto:lstipakov@gmail.com">lstipakov@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: Lev Stipakov <<a href="mailto:lev@openvpn.net" target="_blank">lev@openvpn.net</a>><br> <br> Commit 6d19775a468 has removed SYSTEM elevation hack,<br> but introduced regression - inability to use wintun without interactive service.<br> <br> Proceed with ring buffers registration even if iservice is unavailable and display<br> relevant error message.<br> <br> Trac #1318<br> <br> Signed-off-by: Lev Stipakov <<a href="mailto:lev@openvpn.net" target="_blank">lev@openvpn.net</a>><br> ---<br> src/openvpn/tun.c | 30 +++++++++++++++++++++++++-----<br> 1 file changed, 25 insertions(+), 5 deletions(-)<br> <br> diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c<br> index 30454454..62557364 100644<br> --- a/src/openvpn/tun.c<br> +++ b/src/openvpn/tun.c<br> @@ -6158,12 +6158,32 @@ wintun_register_ring_buffer(struct tuntap *tt, const char *device_guid)<br> }<br> else<br> {<br> - msg(M_FATAL, "ERROR: Wintun requires SYSTEM privileges and therefore "<br> - "should be used with interactive service. If you want to "<br> - "use openvpn from command line, you need to do SYSTEM "<br> - "elevation yourself (for example with psexec).");<br> - }<br> + if (!register_ring_buffers(tt->hand,<br> + tt->wintun_send_ring,<br> + tt->wintun_receive_ring,<br> + tt->rw_handle.read,<br> + tt->rw_handle.write))<br> + {<br> + switch (GetLastError())<br> + {<br> + case ERROR_ACCESS_DENIED:<br> + msg(M_FATAL, "ERROR: Wintun requires SYSTEM privileges and therefore "<br> + "should be used with interactive service. If you want to "<br> + "use openvpn from command line, you need to do SYSTEM "<br> + "elevation yourself (for example with psexec).");<br> + break;<br> +<br> + case ERROR_ALREADY_INITIALIZED:<br> + msg(M_NONFATAL, "Adapter %s is already in use", device_guid);<br> + break;<br> <br> + default:<br> + msg(M_NONFATAL | M_ERRNO, "Failed to register ring buffers");<br> + }<br> + ret = false;<br> + }<br> +<br> + }<br> return ret;<br> }<br></blockquote><div><br></div><div>Looks good and running as SYSTEM works now as expected. Tested on 64 bit Windows 10.</div><div><br></div><div>Acked-by: <a href="mailto:selva.nair@gmail.com">selva.nair@gmail.com</a> </div></div></div>
Hi, When will this be available as an installable (beta) msi? Marvin > On Aug 21, 2020, at 2:13 PM, Selva Nair <selva.nair@gmail.com> wrote: > > Hi, > >> On Wed, Aug 19, 2020 at 3:08 AM Lev Stipakov <lstipakov@gmail.com> wrote: >> From: Lev Stipakov <lev@openvpn.net> >> >> Commit 6d19775a468 has removed SYSTEM elevation hack, >> but introduced regression - inability to use wintun without interactive service. >> >> Proceed with ring buffers registration even if iservice is unavailable and display >> relevant error message. >> >> Trac #1318 >> >> Signed-off-by: Lev Stipakov <lev@openvpn.net> >> --- >> src/openvpn/tun.c | 30 +++++++++++++++++++++++++----- >> 1 file changed, 25 insertions(+), 5 deletions(-) >> >> diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c >> index 30454454..62557364 100644 >> --- a/src/openvpn/tun.c >> +++ b/src/openvpn/tun.c >> @@ -6158,12 +6158,32 @@ wintun_register_ring_buffer(struct tuntap *tt, const char *device_guid) >> } >> else >> { >> - msg(M_FATAL, "ERROR: Wintun requires SYSTEM privileges and therefore " >> - "should be used with interactive service. If you want to " >> - "use openvpn from command line, you need to do SYSTEM " >> - "elevation yourself (for example with psexec)."); >> - } >> + if (!register_ring_buffers(tt->hand, >> + tt->wintun_send_ring, >> + tt->wintun_receive_ring, >> + tt->rw_handle.read, >> + tt->rw_handle.write)) >> + { >> + switch (GetLastError()) >> + { >> + case ERROR_ACCESS_DENIED: >> + msg(M_FATAL, "ERROR: Wintun requires SYSTEM privileges and therefore " >> + "should be used with interactive service. If you want to " >> + "use openvpn from command line, you need to do SYSTEM " >> + "elevation yourself (for example with psexec)."); >> + break; >> + >> + case ERROR_ALREADY_INITIALIZED: >> + msg(M_NONFATAL, "Adapter %s is already in use", device_guid); >> + break; >> >> + default: >> + msg(M_NONFATAL | M_ERRNO, "Failed to register ring buffers"); >> + } >> + ret = false; >> + } >> + >> + } >> return ret; >> } > > Looks good and running as SYSTEM works now as expected. Tested on 64 bit Windows 10. > > Acked-by: selva.nair@gmail.com > _______________________________________________ > Openvpn-devel mailing list > Openvpn-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openvpn-devel <html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi,<div><br></div><div>When will this be available as an installable (beta) msi?<br><br><div dir="ltr">Marvin </div><div dir="ltr"><br>On Aug 21, 2020, at 2:13 PM, Selva Nair <<a href="mailto:selva.nair@gmail.com">selva.nair@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div>Hi,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 19, 2020 at 3:08 AM Lev Stipakov <<a href="mailto:lstipakov@gmail.com">lstipakov@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: Lev Stipakov <<a href="mailto:lev@openvpn.net" target="_blank">lev@openvpn.net</a>><br> <br> Commit 6d19775a468 has removed SYSTEM elevation hack,<br> but introduced regression - inability to use wintun without interactive service.<br> <br> Proceed with ring buffers registration even if iservice is unavailable and display<br> relevant error message.<br> <br> Trac #1318<br> <br> Signed-off-by: Lev Stipakov <<a href="mailto:lev@openvpn.net" target="_blank">lev@openvpn.net</a>><br> ---<br> src/openvpn/tun.c | 30 +++++++++++++++++++++++++-----<br> 1 file changed, 25 insertions(+), 5 deletions(-)<br> <br> diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c<br> index 30454454..62557364 100644<br> --- a/src/openvpn/tun.c<br> +++ b/src/openvpn/tun.c<br> @@ -6158,12 +6158,32 @@ wintun_register_ring_buffer(struct tuntap *tt, const char *device_guid)<br> }<br> else<br> {<br> - msg(M_FATAL, "ERROR: Wintun requires SYSTEM privileges and therefore "<br> - "should be used with interactive service. If you want to "<br> - "use openvpn from command line, you need to do SYSTEM "<br> - "elevation yourself (for example with psexec).");<br> - }<br> + if (!register_ring_buffers(tt->hand,<br> + tt->wintun_send_ring,<br> + tt->wintun_receive_ring,<br> + tt->rw_handle.read,<br> + tt->rw_handle.write))<br> + {<br> + switch (GetLastError())<br> + {<br> + case ERROR_ACCESS_DENIED:<br> + msg(M_FATAL, "ERROR: Wintun requires SYSTEM privileges and therefore "<br> + "should be used with interactive service. If you want to "<br> + "use openvpn from command line, you need to do SYSTEM "<br> + "elevation yourself (for example with psexec).");<br> + break;<br> +<br> + case ERROR_ALREADY_INITIALIZED:<br> + msg(M_NONFATAL, "Adapter %s is already in use", device_guid);<br> + break;<br> <br> + default:<br> + msg(M_NONFATAL | M_ERRNO, "Failed to register ring buffers");<br> + }<br> + ret = false;<br> + }<br> +<br> + }<br> return ret;<br> }<br></blockquote><div><br></div><div>Looks good and running as SYSTEM works now as expected. Tested on 64 bit Windows 10.</div><div><br></div><div>Acked-by: <a href="mailto:selva.nair@gmail.com">selva.nair@gmail.com</a> </div></div></div> </div></blockquote><blockquote type="cite"><div dir="ltr"></div></blockquote><blockquote type="cite"><div dir="ltr"><span>_______________________________________________</span><br><span>Openvpn-devel mailing list</span><br><span><a href="mailto:Openvpn-devel@lists.sourceforge.net">Openvpn-devel@lists.sourceforge.net</a></span><br><span><a href="https://lists.sourceforge.net/lists/listinfo/openvpn-devel">https://lists.sourceforge.net/lists/listinfo/openvpn-devel</a></span><br></div></blockquote></div></body></html>
Hi,
On Fri, Aug 21, 2020 at 07:37:27PM -0700, Marvin Adeff wrote:
> When will this be available as an installable (beta) msi?
I'll merge the commit today or tomorrow (sorry for the lag on my side,
was travelling and had only limited access to "Internet and focus").
My plan is to do a formal "beta2" tag on Wednesday, but of course
Samuli/Lev could do a new installer ("beta1_1") earlier.
gert
No need to rush. I’m happy to wait until Wednesday for beta2. Cheers, Marvin Sent from my iPhone > On Aug 22, 2020, at 12:20 AM, Gert Doering <gert@greenie.muc.de> wrote: > > Hi, > >> On Fri, Aug 21, 2020 at 07:37:27PM -0700, Marvin Adeff wrote: >> When will this be available as an installable (beta) msi? > > I'll merge the commit today or tomorrow (sorry for the lag on my side, > was travelling and had only limited access to "Internet and focus"). > > My plan is to do a formal "beta2" tag on Wednesday, but of course > Samuli/Lev could do a new installer ("beta1_1") earlier. > > gert > -- > "If was one thing all people took for granted, was conviction that if you > feed honest figures into a computer, honest figures come out. Never doubted > it myself till I met a computer with a sense of humor." > Robert A. Heinlein, The Moon is a Harsh Mistress > > Gert Doering - Munich, Germany gert@greenie.muc.de
Your patch has been applied to the master and release/2.5 branch.
(I have not tested anything, but diffing tun.c to 6d19775a468~1 shows
that's it is the same code that was removed, except for a more detailed
error message)
commit ed47c097db63f8334f32bf9482da488928ff909b (master)
commit f4761dd12ec5eb10a5897ecb7dc427f54a9b0769 (release/2.5)
Author: Lev Stipakov
Date: Wed Aug 19 10:07:46 2020 +0300
tun.c: enable using wintun driver under SYSTEM
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Selva Nair <selva.nair@gmail.com>
Message-Id: <20200819070746.197-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg20780.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 30454454..62557364 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -6158,12 +6158,32 @@ wintun_register_ring_buffer(struct tuntap *tt, const char *device_guid) } else { - msg(M_FATAL, "ERROR: Wintun requires SYSTEM privileges and therefore " - "should be used with interactive service. If you want to " - "use openvpn from command line, you need to do SYSTEM " - "elevation yourself (for example with psexec)."); - } + if (!register_ring_buffers(tt->hand, + tt->wintun_send_ring, + tt->wintun_receive_ring, + tt->rw_handle.read, + tt->rw_handle.write)) + { + switch (GetLastError()) + { + case ERROR_ACCESS_DENIED: + msg(M_FATAL, "ERROR: Wintun requires SYSTEM privileges and therefore " + "should be used with interactive service. If you want to " + "use openvpn from command line, you need to do SYSTEM " + "elevation yourself (for example with psexec)."); + break; + + case ERROR_ALREADY_INITIALIZED: + msg(M_NONFATAL, "Adapter %s is already in use", device_guid); + break; + default: + msg(M_NONFATAL | M_ERRNO, "Failed to register ring buffers"); + } + ret = false; + } + + } return ret; }