On Mon, Feb 03, 2014 at 09:09:06PM +0100, Steinar H. Gunderson wrote:
> On Fri, Jan 10, 2014 at 10:13:45PM +0000, brian m. carlson wrote:
> > Let me provide you with a testcase.  I can't quite get it to hang in the
> > same way, but I definitely get the same error message, so hopefully this
> > will help.  I'll try to get all the steps right here, but I may have
> > forgotten some.  Feel free to substitute bmc for some other user.
> 
> That's a very complicated test case. :-) Do you think you could try to narrow
> it down a bit?

I've tried to narrow it down further, but I haven't found a better
testcase.  This is essentially what I have set up on my server, and it
works with the 2.2 patches, but not the 2.4 patches.  So clearly there's
a regression here, but I'm not sure what exactly triggers the problem.

> I installed Apache and mpm-itk, enabled the cgi module, set AssignUserID
> to “sesse www-data” (sesse is not normally a member of www-data). Then I
> wrote a little shell .cgi script to put in /usr/lib/cgi-bin:
> 
>   #! /bin/sh
>   echo Content-type: text/plain
>   echo
>   id
> 
> When going to http://127.0.0.1/cgi-bin/test.cgi, it outputs:
> 
>   uid=1000(sesse) gid=33(www-data) 
> groups=1000(sesse),20(dialout),24(cdrom),25(floppy),29(audio),33(www-data),44(video),46(plugdev),107(powerdev),119(kvm),120(netdev)
> 
> So as far as I can see, in the case that doesn't involve git and whatnot,
> this works just like it should.

git basically makes two HTTP requests: one to info/refs and one to
git-receive-pack.  What I think might be happening is that the first
one, which runs as www-data:www-data, is somehow causing problems for
the second one, which runs as bmc:www-data.  That's all I have to go on.

I can say that I still have the problem if I force the info/refs call to
be bmc:www-data as well by placing the AssignUserID statement into the
<LocationMatch "^/git/"> block.  However, if I place it outside of the
block, in the main VirtualHost, it works just fine.  Hopefully that's
helpful.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature

Reply via email to