| Message ID | 20230518173345.2722530-1-selva.nair@gmail.com |
|---|---|
| State | Accepted |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:7300:7b9a:b0:c3:1364:a2a2 with SMTP id j26csp539514dyk;
Thu, 18 May 2023 10:34:28 -0700 (PDT)
X-Google-Smtp-Source:
ACHHUZ5/Bdjao8kozd0iyjgstocogdtGlyDIv08HILTPcZjU9Juzbb2eHSog9r34SYU7voZd9+uv
X-Received: by 2002:a6b:ee0b:0:b0:760:eeac:e1dd with SMTP id
i11-20020a6bee0b000000b00760eeace1ddmr7041768ioh.18.1684431267530;
Thu, 18 May 2023 10:34:27 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1684431267; cv=none;
d=google.com; s=arc-20160816;
b=Il/TCB9JeBCbUG2xl7FH+0yInn9g4NUkZFN9a+BMlFD2E70qv1VUkj7pQ7Ux/hi+id
lqvTs0+AHF4qalz+6Jx/v1nWLdz4J/J/ZfHkhbjBChkmhcOf8uEvlfq9ajyPeIFsiZgV
kLWlp8spWrRDGMJum+QgzWuPXiKcjivhfsf1h6RrVZcpL1XzDtaE/iqLQZNJhzK+pkH5
YSKb2/XjRwhaDm90Vt8UTHO+QaexCn8EFW/i8N8kyk76G1CevCXAc1Zwn+l0akLBxQT6
WRkmXmv+JGd411baUileRhJgwQnpB5CTSoIqCHYuXBzB0uidwdzpJbZk/bEsXAe6ReLe
BUjg==
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:message-id:date:to:from:dkim-signature:dkim-signature
:dkim-signature;
bh=ENarAOnNs8z+5ctyamqCqwOYPqdAaU5+jtBk7p3oSVU=;
b=Zm9uR4zHFeKKBSXR9PPAMacraawhM7OcVPNhklAsnXqMFkqYjZ5uOj8+zbMwgPCbHu
nyCIhYkIgQR+bwKgCOQOBZOkI4hDFWTjZiEG0ZEay0Myzw627d+2M7V+Kl/MHygL6MKI
nEzqAJSJxHBLu1MqVefxwN/Wkz+kIAAQ5l/Hw6JY46ByPqkV3CkJO9f1LNbx+zYq8YJM
8BwqDiZLBFWkQPV1gQJgt70g4VbYpB4P+QjmxK6agf8ja3NF6aAY6BLDBosK/7j2kQF/
wUv+Q1IgcTZi2IMgEEVXsqGS/MWGP94N55Q1Uf0GHuWUXhJfsDzQhOJ/3NrMsOyrog5I
6fZA==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=IOgat5Ee;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=PjWRYpxv;
dkim=neutral (body hash did not verify) header.i=@gmail.com
header.s=20221208 header.b="Ytc0UD1/";
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=QUARANTINE dis=NONE) header.from=gmail.com
Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7])
by mx.google.com with ESMTPS id
f26-20020a02b79a000000b0041677f3f642si1081369jam.161.2023.05.18.10.34.27
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Thu, 18 May 2023 10:34:27 -0700 (PDT)
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=IOgat5Ee;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=PjWRYpxv;
dkim=neutral (body hash did not verify) header.i=@gmail.com
header.s=20221208 header.b="Ytc0UD1/";
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=QUARANTINE dis=NONE) header.from=gmail.com
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.95)
(envelope-from <openvpn-devel-bounces@lists.sourceforge.net>)
id 1pzhVp-0004OJ-66;
Thu, 18 May 2023 17:34:01 +0000
Received: from [172.30.20.202] (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.95)
(envelope-from <selva.nair@gmail.com>) id 1pzhVl-0004OC-TH
for openvpn-devel@lists.sourceforge.net;
Thu, 18 May 2023 17:33:57 +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=Z07Bf7es2l9AmjONk368b3mDt6iPBS2okMcaypIBdsg=; b=IOgat5EeMtwnF6ZqF6yTQha6gp
ZRkOZKk8lGw5q1jHUknl302q5O+epvrQIRY42TUGXfXQi1TGroAechZytJw0H7M7OX3A5ynuZI/1O
egVOyRPF2nyjrJl68Hct3FxjxAEsDhecGsC3v12nUu59ejdiRF4N4asWq+zEegY4iTu0=;
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=Z07Bf7es2l9AmjONk368b3mDt6iPBS2okMcaypIBdsg=; b=P
jWRYpxvifOaB+p+7U8tiKOFXW5iQfF5vmg16ZzGOWUKcLja5Hz8hJYh7sNBlqpB8kcDRtfRLGFyEh
3O3ejFeebVafwGQ2ljbuDHbr0oc+pVjDzcD1F4ubgu2GksYRoKiC5jfAW0+psMEwUb+MMUfQWxNTU
6Ckcqar8QnBgYABo=;
Received: from mail-yw1-f177.google.com ([209.85.128.177])
by sfi-mx-2.v28.lw.sourceforge.com with esmtps
(TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95)
id 1pzhVk-0006uu-Lj for openvpn-devel@lists.sourceforge.net;
Thu, 18 May 2023 17:33:57 +0000
Received: by mail-yw1-f177.google.com with SMTP id
00721157ae682-561d1c4846cso3240787b3.1
for <openvpn-devel@lists.sourceforge.net>;
Thu, 18 May 2023 10:33:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20221208; t=1684431231; x=1687023231;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=Z07Bf7es2l9AmjONk368b3mDt6iPBS2okMcaypIBdsg=;
b=Ytc0UD1/k0dykx8jTxttgUg/hvWPKvmw8xy9Rxg251WTbFrLmjB0J0ZeAbMU3jrVOm
w3k3vftjlqj5Up1Y8rrLc3JuM5HW4t6O9fBsNpPK2DyDeCS2TC9GHfXj2Y2eQSBnyfpD
YK00FIP9dkZKKzBwgB7R+tTsmS1US9rbcKIXZ4vHq+P6eVD2/1+OHXu9MdxuVe1fOUFx
Xy8zLJ2abTqIQde7qqNWolpkQYLj76pCjL3MUV0CRw3O+QtAruh0zz4fhq38X0pD5IIn
8kiTvsRlIwkho7TZGF6th9+RdA3QKsJaVybjLWGxxnCOIPBeGgqrHvV5t6HQDy2Pwgsf
+spQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20221208; t=1684431231; x=1687023231;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=Z07Bf7es2l9AmjONk368b3mDt6iPBS2okMcaypIBdsg=;
b=NC+ht6oRFNefrZv6qryOkq0vEPyCWAwTwmuIjFNDNS2FiQxbUHVhcWH1M9Zcplvxkp
A+V96D51WNe+BHVb1JC1HpARvy7fgNc9hgPlaOcXoKV9pir5loiszaBS6zgdWkSwpz2B
1SbVciDB8xhjisCf/bvsSnUKSz+4DzuQSiepuGzLs4J2HqSkcnzZq444vRgIDEj6qdxH
/9427x7vFB0lbpR+i1zkLgOPkVugJtvAiEmXc+jM4Ab4qc3gOVsYeDvC7aACBLP668vf
/hUIWM2syI+mhhcycI9ANDAy4e20jPqORgrU8GxSRrneTLbxHUhdR7E87KV40ePJfJKM
WerA==
X-Gm-Message-State: AC+VfDzFFp4qJlLbvewLiqOUXPUWyjp4GB+1XQ6nRaqn8v0HvalD1s7f
7q6bXky9U2K+xee5N5jqrukomE1HbhY=
X-Received: by 2002:a81:4c05:0:b0:561:1c43:c4c2 with SMTP id
z5-20020a814c05000000b005611c43c4c2mr5444372ywa.5.1684431230629;
Thu, 18 May 2023 10:33:50 -0700 (PDT)
Received: from uranus.sansel.ca
(bras-vprn-tnhlon4053w-lp130-01-70-51-222-24.dsl.bell.ca. [70.51.222.24])
by smtp.gmail.com with ESMTPSA id
t4-20020a0dea04000000b0055a1069886fsm543104ywe.129.2023.05.18.10.33.49
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 18 May 2023 10:33:49 -0700 (PDT)
From: selva.nair@gmail.com
To: openvpn-devel@lists.sourceforge.net
Date: Thu, 18 May 2023 13:33:45 -0400
Message-Id: <20230518173345.2722530-1-selva.nair@gmail.com>
X-Mailer: git-send-email 2.34.1
MIME-Version: 1.0
X-Spam-Score: -0.2 (/)
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 Setting the desktop as "winsta0\default"
does not always work when run from a non-interactive session which may not
have access to the the window station "Winsta0". Leave this as NULL to let
the syste [...]
Content analysis details: (-0.2 points, 6.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider [selva.nair[at]gmail.com]
0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record
-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.128.177 listed in list.dnswl.org]
-0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from
envelope-from domain
-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 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2)
[209.85.128.177 listed in wl.mailspike.net]
X-Headers-End: 1pzhVk-0006uu-Lj
Subject: [Openvpn-devel] [PATCH] Interactive service: do not force a target
desktop for openvpn.exe
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
X-GMAIL-THRID: =?utf-8?q?1766254200857919500?=
X-GMAIL-MSGID: =?utf-8?q?1766254200857919500?=
|
| Series |
[Openvpn-devel] Interactive service: do not force a target desktop for openvpn.exe
|
|
Commit Message
Selva Nair
May 18, 2023, 5:33 p.m. UTC
From: Selva Nair <selva.nair@gmail.com> Setting the desktop as "winsta0\default" does not always work when run from a non-interactive session which may not have access to the the window station "Winsta0". Leave this as NULL to let the system automatically assign a window station and desktop. Test runs on Win10 confirm that "Winsta0\Default" still gets selected when run interactively (e.g., using the GUI or from task scheduler as an interactive job). This is the same behaviour as now. The change allows "interactive service" to be used for launching OpenVPN from non-interactive sessions. For example, when service client is a non-interactive task from the task scheduler, the default desktop in a custom window station gets assigned to openvpn.exe. Note that we already run openvpn.exe in a non-interactive window station when directly launched by "automatic service". Github: Fixes OpenVPN/openvpn-gui#626 Signed-off-by: Selva Nair <selva.nair@gmail.com> --- src/openvpnserv/interactive.c | 1 - 1 file changed, 1 deletion(-)
Comments
Acked-by: Gert Doering <gert@greenie.muc.de> This is all voodoo to me, but it doesn't break compilation, doesn't bring in unsafe pointer constructs, and people say "it makes their use case work", so it sounds like a good fix. Microsoft documentation on https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessasuserw says interesting things... "The user must have full access to both the specified window station and desktop. If you want the process to be interactive, specify winsta0\default. If the lpDesktop member is NULL, the new process inherits the desktop and window station of its parent process. If this member is an empty string, "", the new process connects to a window station using the rules described in Process Connection to a Window Station." .. so we're moving from "winsta0\default" to "NULL" (startup_info is ZeroMemory'ed), which sounds like "now it will run in the desktop environment of the iservice", whatever *that* might be... but it's certainly a valid and documented choice... and since openvpn.exe "as run from iservice" doesn't want any windows etc., whatever makes it succeed sounds good to me. Your patch has been applied to the master and release/2.6 branch. (Not sure this is a "bugfix" or a "mini feature", but it certainly warrants a bit more thorough testing across Windows variants before releasing 2.6.5) commit 244d9b7942dabf0297c8f689457eeb0f9fa0aa1e (master) commit 9e112be5dde043cdc1f073f33ada0a1810b730a6 (release/2.6) Author: Selva Nair Date: Thu May 18 13:33:45 2023 -0400 Interactive service: do not force a target desktop for openvpn.exe Signed-off-by: Selva Nair <selva.nair@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20230518173345.2722530-1-selva.nair@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26705.html Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering
diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index ec196274..d73cef04 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -1868,7 +1868,6 @@ RunOpenvpn(LPVOID p) } startup_info.cb = sizeof(startup_info); - startup_info.lpDesktop = L"winsta0\\default"; startup_info.dwFlags = STARTF_USESTDHANDLES; startup_info.hStdInput = stdin_read; startup_info.hStdOutput = stdout_write;