X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fwin32%2Fsetup-win.c;h=c31b9c48ae79f76912dbd709210d4ec5317eb8af;hb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;hp=ed54ee1fda9c997badd83c8e9b14bbf07846a649;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a;p=ossec-hids.git diff --git a/src/win32/setup-win.c b/src/win32/setup-win.c index ed54ee1..c31b9c4 100755 --- a/src/win32/setup-win.c +++ b/src/win32/setup-win.c @@ -1,14 +1,15 @@ -/* @(#) $Id: setup-win.c,v 1.42 2009/06/24 18:53:10 dcid Exp $ */ +/* @(#) $Id: ./src/win32/setup-win.c, 2011/09/08 dcid Exp $ + */ /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * * This program is a free software; you can redistribute it * and/or modify it under the terms of the GNU General Public - * License (version 3) as published by the FSF - Free Software + * License (version 2) as published by the FSF - Free Software * Foundation */ - + #include "setup-shared.h" @@ -22,19 +23,19 @@ int main(int argc, char **argv) printf("Try: '%s directory'\n\n", argv[0]); return(0); } - + /* Trying to chdir to ossec directory. */ if(chdir(argv[1]) != 0) { printf("%s: Invalid directory: '%s'.\n", argv[0], argv[1]); return(0); } - + /* Checking if ossec was installed already (upgrade) */ if(!fileexist(OSSECCONF)) { char cmd[OS_MAXSTR +1]; - + /* Copy default config to ossec.conf */ snprintf(cmd, OS_MAXSTR, "copy %s %s", OSSECDEF, OSSECCONF); system(cmd); @@ -44,7 +45,7 @@ int main(int argc, char **argv) /* Setting up local files */ system("add-localfile.exe \"C:\\Windows\\pfirewall.log\" --quiet"); system("add-localfile.exe \"C:\\Documents and Settings\\All Users\\Application Data\\Symantec\\Symantec AntiVirus Corporate Edition\\7.5\\Logs\\\%m\%d20\%y.log\" --quiet"); - + /* Configure ossec for automatic startup */ system("sc config OssecSvc start= auto"); @@ -53,7 +54,7 @@ int main(int argc, char **argv) /* Changing permissions. */ checkVista(); - + if(isVista) { char cmd[OS_MAXSTR +1]; @@ -78,7 +79,7 @@ int main(int argc, char **argv) /* Changing permissions. */ system("echo y|cacls * /T /G Administrators:f "); - + /* Copying them back. */ snprintf(cmd, OS_MAXSTR, "move ..\\os_win32ui.exe ."); system(cmd);