diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2007-04-25 21:37:49 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2007-04-25 21:37:49 +0000 |
commit | 657ecf14acc58a6d345341a5e36411bde5be9cd9 (patch) | |
tree | 4f5a53feb9c26991d822e2e606de511f57e32be6 /service-win32 | |
parent | Forgot to add changelog item about OpenVPN GUI being (diff) | |
download | openvpn-657ecf14acc58a6d345341a5e36411bde5be9cd9.tar.xz |
TAP driver now passes signing tests on Vista x64.
Added new settings to settings.in to better control
build process.
Removed some unneeded JYFIXMEs from source code.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1874 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'service-win32')
-rwxr-xr-x | service-win32/Makefile | 2 | ||||
-rwxr-xr-x | service-win32/mkpatch | 4 | ||||
-rwxr-xr-x | service-win32/openvpnserv.c | 8 | ||||
-rwxr-xr-x | service-win32/service.patch | 26 |
4 files changed, 23 insertions, 17 deletions
diff --git a/service-win32/Makefile b/service-win32/Makefile index 027b6dd..9a3cb5d 100755 --- a/service-win32/Makefile +++ b/service-win32/Makefile @@ -5,7 +5,7 @@ # applying service.patch to the Platform # SDK service sample. -EXE = openvpnserv.exe +EXE = ${PRODUCT_UNIX_NAME}serv.exe HEADERS = service.h diff --git a/service-win32/mkpatch b/service-win32/mkpatch index 5e65b94..83652e1 100755 --- a/service-win32/mkpatch +++ b/service-win32/mkpatch @@ -1,4 +1,4 @@ # build service.[ch] patch against original # SDK sample -diff -ub service.c.orig service.c >service.patch -diff -ub service.h.orig service.h >>service.patch +diff -ub service.c.orig service.c | u2d >service.patch +diff -ub service.h.orig service.h | u2d >>service.patch diff --git a/service-win32/openvpnserv.c b/service-win32/openvpnserv.c index 0a64a67..76323ca 100755 --- a/service-win32/openvpnserv.c +++ b/service-win32/openvpnserv.c @@ -65,13 +65,13 @@ struct security_attributes * Control Manager which will cause an asynchronous call * of ServiceStop below. */ -#define EXIT_EVENT_NAME "openvpn_exit_1" +#define EXIT_EVENT_NAME PRODUCT_UNIX_NAME "_exit_1" /* * Which registry key in HKLM should * we get config info from? */ -#define REG_KEY "SOFTWARE\\OpenVPN" +#define REG_KEY "SOFTWARE\\" PRODUCT_NAME static HANDLE exit_event = NULL; @@ -398,7 +398,7 @@ VOID ServiceStart (DWORD dwArgc, LPTSTR *lpszArgv) mysnprintf (log_path, "%s\\%s", log_dir, log_file); /* construct command line */ - mysnprintf (command_line, "openvpn --service %s 1 --config \"%s\"", + mysnprintf (command_line, PRODUCT_UNIX_NAME " --service %s 1 --config \"%s\"", EXIT_EVENT_NAME, find_obj.cFileName); @@ -406,7 +406,7 @@ VOID ServiceStart (DWORD dwArgc, LPTSTR *lpszArgv) be inherited. */ if (!init_security_attributes_allow_all (&sa)) { - MSG (M_SYSERR, "InitializeSecurityDescriptor start_openvpn failed"); + MSG (M_SYSERR, "InitializeSecurityDescriptor start_" PRODUCT_UNIX_NAME " failed"); goto finish; } diff --git a/service-win32/service.patch b/service-win32/service.patch index 3b45549..8e4ddf9 100755 --- a/service-win32/service.patch +++ b/service-win32/service.patch @@ -1,5 +1,5 @@ ---- service.c.orig Mon Jan 30 10:03:35 2006 -+++ service.c Mon Jan 30 10:16:33 2006 +--- service.c.orig Tue Apr 24 14:49:30 2007 ++++ service.c Tue Apr 24 12:20:08 2007 @@ -16,6 +16,7 @@ service_main(DWORD dwArgc, LPTSTR *lpszArgv); CmdInstallService(); @@ -319,27 +319,33 @@ } if ( lpszTemp ) ---- service.h.orig Mon Jan 30 10:03:35 2006 -+++ service.h Mon Jan 30 10:03:35 2006 -@@ -62,13 +62,13 @@ +--- service.h.orig Tue Apr 24 14:49:30 2007 ++++ service.h Tue Apr 24 11:58:48 2007 +@@ -57,18 +57,19 @@ + extern "C" { + #endif + ++#include "../autodefs/defs.h" + + ////////////////////////////////////////////////////////////////////////////// //// todo: change to desired strings //// // name of the executable -#define SZAPPNAME "Simple" -+#define SZAPPNAME "openvpnserv" ++#define SZAPPNAME PRODUCT_UNIX_NAME "serv" // internal name of the service -#define SZSERVICENAME "SimpleService" -+#define SZSERVICENAME "OpenVPNService" ++#define SZSERVICENAME PRODUCT_NAME "Service" // displayed name of the service -#define SZSERVICEDISPLAYNAME "Simple Service" -+#define SZSERVICEDISPLAYNAME "OpenVPN Service" ++#define SZSERVICEDISPLAYNAME PRODUCT_NAME " Service" // list of service dependencies - "dep1\0dep2\0\0" -#define SZDEPENDENCIES "" -+#define SZDEPENDENCIES "TAP0901\0Dhcp\0\0" ++#define SZDEPENDENCIES PRODUCT_TAP_ID "\0Dhcp\0\0" ////////////////////////////////////////////////////////////////////////////// -@@ -126,7 +126,10 @@ +@@ -126,7 +127,10 @@ // RETURN VALUE: // none // |