projects
/
manu
/
suphp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.6.1-1 release
[manu/suphp.git]
/
src
/
Application.cpp
diff --git
a/src/Application.cpp
b/src/Application.cpp
index
dd2a02e
..
2a3c235
100644
(file)
--- 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);
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);
this->changeProcessPermissions(scriptFilename, config, env);
interpreter = this->getInterpreter(env, config);