On Wed, Feb 05, 2014 at 03:40:48PM -0500, Jason Rhinelander wrote:
> What I'm seeing is the following, for a single request handled by
> /usr/lib/git-core/git-http-backend per bmc's config:
> 
> For 'POST /git/jagerman/foo.git/git-receive-pack', I see:
> 
> - itk_post_perdir_config gets called with r->uri =
> /git/jagerman/foo.git/git-receive-pack and r->filename =
> /usr/lib/git-core/git-http-backend.
> 
> setgid/initgroups/setuid runs and succeeds.
> 
> - in the same request, itk_post_perdir_config gets called again,
> this time with r->uri = /jagerman/foo.git/git-receive-pack and
> r->filename = /var/www/html/jagerman.
> 
> Notice the initial "/git" is gone now from r->uri.

Oh. It does sound like your mod_rewrite setup is somehow relevant for this,
then?

> It's this second call to itk_post_perdir_config that fails, because
> for that uri (/jagerman/foo.git/git-receive-pack), which doesn't
> exist, we aren't matching the <LocationMatch> with the AssignUserID
> anymore.  Thus the default (www-data:www-data) user applies.

This analysis makes a lot of sense for me; thanks for digging into it so
deeply. (I am unfortunately in a state where I can't dedicate too much time
to mpm-itk right now. :-/)

Is there a reason why you can't set AssignUserID on the entire vhost?

> Comparing the old code to the new, the apache hook setup is quite
> different: itk_post_perdir_config used to be set up via
> ap_hook_header_parser(...) (in apache2 2.4.6-3), while it's now
> ap_hook_post_perdir_config(...).

Note that there's no mpm-itk 2.4.6-3; I've lost track of what version of
mpm-itk that was actually shipped in there.

But there were a lot of changes, in particular as mpm-itk moved from being an
MPM in-tree to an MPM out-of-tree into finally a regular module out-of-tree.
It's not given that everything will be possible to support 100% equally as
before, unfortunately.

/* Steinar */
-- 
Homepage: http://www.sesse.net/


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to