Re: [dev] [quark] [PATCH] Add the chrootdir configuration variable

From: FRIGN <>
Date: Sat, 29 Nov 2014 09:28:24 +0100

On Sat, 29 Nov 2014 08:42:17 +0100
Ivan Delalande <> wrote:

> Change the behavior of docroot, which is now used as a prefix path for
> all file operations related to static files. And add chrootdir, which is
> just the old docroot behavior and allows to control the path into which
> quark will chroot.
> Not having properly distinct configuration variables for chroot,
> document root and CGI root was specially annoying since commit 2822488
> which allowed users to retrieve the CGI script or binary by just
> guessing its path, since quark was chrooting into docroot before
> anything else, and thus the CGI script/binary was in the user accessible
> path.
> This is implemented by moving the reqbuf buffer in the middle of a
> bigger buffer, reqpath. That buffer contains the value of docroot at its
> beginning and reqbuf simply points to the first byte after this value.

Hey Ivan,

thanks for your patch! I'll take a close look at it as soon as I have
the time (probably this evening).
You may want to note that current development has been happening in a
branch[0] by Hiltjo Posthuma converting quark away from an accept-based
infrastructure to a stack-based one.
Hiltjo told me he was almost done with the changes, so as soon as he
finishes this masterpiece, I'll merge it into mainline.
If you like you can check out if the problem still exists in the heavily
modified branch.




Received on Sat Nov 29 2014 - 09:28:24 CET

This archive was generated by hypermail 2.3.0 : Sat Nov 29 2014 - 09:36:08 CET