2011-11-22 Ramon Novoa <rnovoa@artica.es>
* pandora_windows_service.cc: Fixed a bug that resulted in a buffer overflow. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5150 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
d1fd9d677e
commit
f260ae4bd7
|
@ -1,3 +1,8 @@
|
||||||
|
2011-11-22 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* pandora_windows_service.cc: Fixed a bug that resulted in a buffer
|
||||||
|
overflow.
|
||||||
|
|
||||||
2011-11-15 Ramon Novoa <rnovoa@artica.es>
|
2011-11-15 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* build.sh, modules/pandora_module_odbc.cc, Makefile.am: Made
|
* build.sh, modules/pandora_module_odbc.cc, Makefile.am: Made
|
||||||
|
|
|
@ -216,17 +216,10 @@ Pandora_Windows_Service::pandora_init () {
|
||||||
string name_agent, name;
|
string name_agent, name;
|
||||||
string proxy_mode, server_ip;
|
string proxy_mode, server_ip;
|
||||||
int pos, num;
|
int pos, num;
|
||||||
static unsigned char first_run = 0;
|
static unsigned char first_run = 1;
|
||||||
|
|
||||||
setPandoraDebug (true);
|
setPandoraDebug (true);
|
||||||
|
|
||||||
// Add the util subdirectory to the PATH
|
|
||||||
util_dir = Pandora::getPandoraInstallDir ();
|
|
||||||
util_dir += "util";
|
|
||||||
path = getenv ("PATH");
|
|
||||||
env = "PATH=" + path + ";" + util_dir;
|
|
||||||
putenv (env.c_str ());
|
|
||||||
|
|
||||||
conf_file = Pandora::getPandoraInstallDir ();
|
conf_file = Pandora::getPandoraInstallDir ();
|
||||||
conf_file += "pandora_agent.conf";
|
conf_file += "pandora_agent.conf";
|
||||||
|
|
||||||
|
@ -273,7 +266,6 @@ Pandora_Windows_Service::pandora_init () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
srand ((unsigned) time (0));
|
|
||||||
this->setSleepTime (this->interval);
|
this->setSleepTime (this->interval);
|
||||||
|
|
||||||
/*Check if proxy mode is set*/
|
/*Check if proxy mode is set*/
|
||||||
|
@ -292,8 +284,19 @@ Pandora_Windows_Service::pandora_init () {
|
||||||
((UDP_Server *)this->udp_server)->start ();
|
((UDP_Server *)this->udp_server)->start ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (first_run == 0) {
|
if (first_run == 1) {
|
||||||
first_run = 1;
|
first_run = 0;
|
||||||
|
|
||||||
|
// Add the util subdirectory to the PATH
|
||||||
|
util_dir = Pandora::getPandoraInstallDir ();
|
||||||
|
util_dir += "util";
|
||||||
|
path = getenv ("PATH");
|
||||||
|
env = "PATH=" + path + ";" + util_dir;
|
||||||
|
putenv (env.c_str ());
|
||||||
|
|
||||||
|
// Set the seed for rand
|
||||||
|
srand ((unsigned) time (0));
|
||||||
|
|
||||||
pandoraLog ("Pandora agent started");
|
pandoraLog ("Pandora agent started");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue