Opened 9 years ago

Closed 8 years ago

#106 closed Bug / Defect (fixed)

option --register-dns does not work in conjunction with --win-sys

Reported by: JJK Owned by: David Sommerseth
Priority: minor Milestone:
Component: Configuration Version: OpenVPN 2.1.4 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords: register-dns win-sys PATH
Cc:

Description

the option --register-dns does not work in conjunction with --win-sys ; regardless of the value for --win-sys the path for the commands used for --register-dns (net start, ipconfig) is ALWAYS c:\windows.

Daniel van der Soest reported this bug; I can confirm it.

Change History (4)

comment:1 Changed 9 years ago by David Sommerseth

Milestone: beta 2.3
Owner: set to David Sommerseth
Status: newaccepted

Will this be solved together with trac ticket #66?

comment:2 Changed 9 years ago by Samuli Seppänen

There seem to be some hardcoded paths left in win32.c in latest "master":

win32.c:89:  fp = fopen ("c:\\windows\\system32\\route.exe", "rb");
win32.c:108: buf_printf (&newpath, "C:\\WINDOWS\\System32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem%s%s",
win32.c:877: char * force_path = "PATH=C:\\Windows\\System32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem";

comment:3 Changed 9 years ago by Samuli Seppänen

Comment from dazo in IRC meeting of 24th Nov 2011:

"89 must be fixed. 108 and 877 just sets some environment variables, so they're "safer""

comment:4 Changed 8 years ago by David Sommerseth

Keywords: PATH added
Milestone: beta 2.3
Resolution: fixed
Status: acceptedclosed

After having glared a bit more on this, the issue in line 89 seems to be fine for now. This seems to be part of some workaround fix for Windows paths not always being set when using --script-security with the 'system' flag. The whole configure_win_path() function should be reviewed by Windows coders to see if this could be solved more elegantly. Or maybe this isn't needed on newer Windows versions?

The initial bug is believed to be fixed with the patch mentioned in trac ticket #66. Closing this one, and will create a new ticket in regards to cleaning up configure_win_path().

Note: See TracTickets for help on using tickets.