aboutsummaryrefslogtreecommitdiff
path: root/service-win32/service.c
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2010-08-16 20:28:37 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2010-08-16 20:28:37 +0200
commit0afa8dfb078fb61def8fa62ff57229251f2baa6f (patch)
tree7cfb6e69e20d48a52ad7e70a3c0bcebe75a72eff /service-win32/service.c
parentFixed compiler warning in ssl.c (diff)
parentWindows security issue: (diff)
downloadopenvpn-0afa8dfb078fb61def8fa62ff57229251f2baa6f.tar.xz
Merge branch 'svn-BETA21' into beta2.2
Diffstat (limited to 'service-win32/service.c')
-rw-r--r--service-win32/service.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/service-win32/service.c b/service-win32/service.c
index d5211bd..91b5821 100644
--- a/service-win32/service.c
+++ b/service-win32/service.c
@@ -370,11 +370,13 @@ int CmdInstallService()
int ret = 0;
- if ( GetModuleFileName( NULL, szPath, 512 ) == 0 )
+ if ( GetModuleFileName( NULL, szPath+1, 510 ) == 0 )
{
_tprintf(TEXT("Unable to install %s - %s\n"), TEXT(SZSERVICEDISPLAYNAME), GetLastErrorText(szErr, 256));
return 1;
}
+ szPath[0] = '\"';
+ strcat(szPath, "\"");
schSCManager = OpenSCManager(
NULL, // machine (NULL == local)