Opened 3 years ago

Closed 2 years ago

#66 closed Bug / Defect (fixed)

the win-sys variable is not respected in all cases

Reported by: panos Owned by: dazo
Priority: major Milestone: beta 2.3
Component: Configuration Version: 2.2-beta / 2.2-RC
Severity: Patch Queue: New / awaiting ACK Keywords: win-sys
Cc:

Description

Setting the win-sys variable to either env or a specific path does not solve the problem of some win32 commands trying to run from the hardcoded C:\WINDOWS path. For example setting win-sys to env still produces the following errors on my connection:

Sun Oct 31 09:03:51 2010 OpenVPN 2.2-beta3 i686-pc-mingw32 [SSL] [LZO2] [PKCS11] built on Sep 2 2010
...
Sun Oct 31 09:04:15 2010 NOTE: Release of DHCP-assigned IP address lease on TAP-Win32 adapter failed: The system cannot find the file specified. (code=2)
...
Sun Oct 31 09:04:20 2010 C:\WIN\system32\route.exe ADD x.x.x.x MASK 255.255.255.255 10.0.0.1
Sun Oct 31 09:04:20 2010 Route addition via IPAPI succeeded [adaptive]
...
Sun Oct 31 09:04:19 2010 C:\WINDOWS\system32\net.exe stop dnscache
Sun Oct 31 09:04:19 2010 openvpn_execve: CreateProcess? C:\WINDOWS\system32\net.exe failed: The system cannot find the path specified. (errno=3)

Change History (6)

comment:1 Changed 3 years ago by dazo

  • Milestone changed from beta 2.2 to beta 2.3

comment:2 Changed 3 years ago by dazo

  • Keywords C:\WINDOWS removed

comment:3 Changed 3 years ago by dazo

This one popped up in the mailing list again:

http://thread.gmane.org/gmane.network.openvpn.user/32508/focus=32509

I second moving over to '--win-sys env' as the default. Any objections?

comment:4 Changed 2 years ago by dazo

  • Severity changed from Not set (if unsure, select this one) to Patch Queue: New / awaiting ACK

A fix is proposed:
http://thread.gmane.org/gmane.network.openvpn.devel/5097

A test compilation with this fix is available here:
http://build.openvpn.net/downloads/snapshots/openvpn-2.x-20111118-win-sys-install.exe
(unfortunately, this compile requires Vista or newer)

comment:5 Changed 2 years ago by dazo

  • Owner set to dazo
  • Status changed from new to accepted

comment:6 Changed 2 years ago by dazo

  • Resolution set to fixed
  • Status changed from accepted to closed

commit 9f6ac06b6d15e14566b820018f295233e831eb68
Author: David Sommerseth <davids@…>
Date: Fri Nov 18 13:21:43 2011 +0100

Make '--win-sys env' default


Without this patch, the default path used by OpenVPN is hard coded
to C:\WINDOWS. As users might install Windows in a different directory,
this approach will cause OpenVPN to malfunction in some configurations.


OpenVPN have supported using the system path, by adding --win-sys env.
This patch removes the hard coded approach and uses the --win-sys env
approach by default instead.


Trac-ticket: 66
URL: http://thread.gmane.org/gmane.network.openvpn.user/32508
Signed-off-by: David Sommerseth <davids@…>
Tested-by: Samuli Seppänen <samuli@…>
Acked-by: Gert Doering <gert@…>

Note: See TracTickets for help on using tickets.