Use nssm_imagepath().
authorIain Patterson <me@iain.cx>
Mon, 2 Mar 2015 11:03:59 +0000 (11:03 +0000)
committerIain Patterson <me@iain.cx>
Mon, 2 Mar 2015 11:08:00 +0000 (11:08 +0000)
commitfb96938cf944edf3bc0dfd99dbff416b0397df4f
tree5d161dea538ad58b4f5d8753238e7e1f999e8d85
parent4c25687ee744780127150e22640df47931d139a9
Use nssm_imagepath().

We were calling GetModuleFileName() in a number of places.  Use
nssm_imagepath() instead.

Ensure that a quoted path is used for the service image path when
creating the service, thus avoiding a theoretical security vulnerability
whereby the service manager could be tricked into launching the wrong
program.

When setting the path to NSSM in the environment for event hooks we
still use the unquoted path, as environment variables are typically
unquoted.

Thanks Gerald Haider.
README.txt
env.cpp
hook.cpp
nssm.cpp
registry.cpp
service.cpp