2013-11-14 Ramon Novoa <rnovoa@artica.es>
* main.cc: Quote the path to the service binary to avoid exploits. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9080 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
4b3b4f0ea8
commit
9ad03d2b5b
|
@ -1,3 +1,7 @@
|
||||||
|
2013-11-14 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* main.cc: Quote the path to the service binary to avoid exploits.
|
||||||
|
|
||||||
2013-11-12 Ramon Novoa <rnovoa@artica.es>
|
2013-11-12 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* modules/pandora_module_factory.cc: Fixed a bug when a macro has
|
* modules/pandora_module_factory.cc: Fixed a bug when a macro has
|
||||||
|
|
|
@ -47,6 +47,7 @@ main (int argc, char *argv[]) {
|
||||||
unsigned int pos;
|
unsigned int pos;
|
||||||
bool process = false;
|
bool process = false;
|
||||||
string home;
|
string home;
|
||||||
|
string binary_path;
|
||||||
|
|
||||||
service = Pandora_Windows_Service::getInstance ();
|
service = Pandora_Windows_Service::getInstance ();
|
||||||
service->setValues (Pandora::name, Pandora::display_name,
|
service->setValues (Pandora::name, Pandora::display_name,
|
||||||
|
@ -68,7 +69,13 @@ main (int argc, char *argv[]) {
|
||||||
for (int i = 1; i < argc; i++) {
|
for (int i = 1; i < argc; i++) {
|
||||||
if (_stricmp(argv[i], SERVICE_INSTALL_CMDLINE_PARAM) == 0) {
|
if (_stricmp(argv[i], SERVICE_INSTALL_CMDLINE_PARAM) == 0) {
|
||||||
/* Install parameter */
|
/* Install parameter */
|
||||||
service->install (Pandora::getPandoraInstallPath ().c_str ());
|
|
||||||
|
/* Quote the path to the service binary to avoid exploits */
|
||||||
|
binary_path = "\"";
|
||||||
|
binary_path += Pandora::getPandoraInstallPath ().c_str ();
|
||||||
|
binary_path += "\"";
|
||||||
|
|
||||||
|
service->install (binary_path.c_str());
|
||||||
|
|
||||||
delete service;
|
delete service;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue