X-Git-Url: http://git.home-dn.net/?p=manu%2Fsuphp.git;a=blobdiff_plain;f=src%2FApplication.cpp;h=2a3c2354663504adf7a262b56d08ccbb07ba005b;hp=dd2a02ea830caad1ba96b9993bdedb285a99b9ef;hb=47bcf8ba77fa8011f9be728c23dbe6915d70251b;hpb=1d5c20a335c25ab89adf2e0d3d74c810b679e719 diff --git a/src/Application.cpp b/src/Application.cpp index dd2a02e..2a3c235 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -89,6 +89,12 @@ int suPHP::Application::run(CommandLine& cmdline, Environment& env) { this->checkScriptFile(scriptFilename, config, env); + // Root privileges are needed for chroot() + // so do this before changing process permissions + if (config.getChrootPath().length() > 0) { + api.chroot(config.getChrootPath()); + } + this->changeProcessPermissions(scriptFilename, config, env); interpreter = this->getInterpreter(env, config);