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:
pandora-release 2013-11-14 15:56:04 +00:00
parent 4b3b4f0ea8
commit 9ad03d2b5b
2 changed files with 12 additions and 1 deletions

View File

@ -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>
* modules/pandora_module_factory.cc: Fixed a bug when a macro has

View File

@ -47,6 +47,7 @@ main (int argc, char *argv[]) {
unsigned int pos;
bool process = false;
string home;
string binary_path;
service = Pandora_Windows_Service::getInstance ();
service->setValues (Pandora::name, Pandora::display_name,
@ -68,7 +69,13 @@ main (int argc, char *argv[]) {
for (int i = 1; i < argc; i++) {
if (_stricmp(argv[i], SERVICE_INSTALL_CMDLINE_PARAM) == 0) {
/* 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;