You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Pane <bp...@pacbell.net> on 2002/05/26 22:18:58 UTC

suexec, userdir, and mod_cgid Re: suexec related patches for PR 7810, 7791, 8291, 9038

On Sat, 2002-05-25 at 20:17, Colm MacCárthaigh wrote:
> 
> Since there have been some changes to the affected source files
> and multiple problems presented themselves in unixd.c, my patches
> to make suexec + [ mod_include | mod_userdir | mod_cgid ] work
> were getting stale. So I've rediffed them against CVS.
> 
> I also had a good look through all of the suexec bugs, I'm using
> the patches on a production system now with over 2000 shell users
> (redbrick.dcu.ie) and it's proving stable.
> 
> Anyway, I think they fix these :
> 
>  PR 7810 - suexec + mod_userdir + mod_cgid needed fixing (also 
>            it's currently insecure by default, this really needs
>            to be fixed)
>  PR 7791 - malformed arguments array passed to suexec
>  PR 8291 - mod_include + suexec "exec cmd" not working
>  PR 9038 - really a duplicate of 7810
> 
> Some notes:
> 
>   1: http://redbrick.dcu.ie/~colmmacc/patches/mod_cgid.patch
>   2: http://redbrick.dcu.ie/~colmmacc/patches/unixd.patch
>   3: http://redbrick.dcu.ie/~colmmacc/patches/mod_include.patch
> 
>   patch 1 (mod_cgid.c)    fixes 7810/9039/mod_cgid, it just works.

Patch 1 didn't work when I tried it.  The problem was that it depends
on mod_userdir's get_suexec_id_doer() to create a proper suexec
config based on the userdir.  But mod_userdir's get_suexec_id_doer()
function never is invoked, because mod_suexec's get_suexec_id_doer()
is called first.

I modified mod_userdir to insert its suexec identity function in
front of mod_suexec's.  The suexec+cgid+userdir combination now works
properly in my test environment, but I'd like a second opinion before
I commit.

Thanks,
--Brian


Re: suexec, userdir, and mod_cgid Re: suexec related patches for PR 7810, 7791, 8291, 9038

Posted by Brian Pane <bp...@pacbell.net>.
On Sun, 2002-05-26 at 13:18, Brian Pane wrote:
> On Sat, 2002-05-25 at 20:17, Colm MacCárthaigh wrote:

> >   patch 1 (mod_cgid.c)    fixes 7810/9039/mod_cgid, it just works.
> 
> Patch 1 didn't work when I tried it.  The problem was that it depends
> on mod_userdir's get_suexec_id_doer() to create a proper suexec
> config based on the userdir.  But mod_userdir's get_suexec_id_doer()
> function never is invoked, because mod_suexec's get_suexec_id_doer()
> is called first.
> 
> I modified mod_userdir to insert its suexec identity function in
> front of mod_suexec's.  The suexec+cgid+userdir combination now works
> properly in my test environment, but I'd like a second opinion before
> I commit.

Actually, as Colm pointed out in PR 9083, the precedence of
mod_userdir vs mod_suexec is a more general design issue,
independent of mod_cgid.  With patch1 and without a mod_userdir
change, the combination of cgid+userdir+suexec works as long
as there's no global SuexecUserGroup directive.  That brings
cgid up to par with cgi, so I'll commit the cgid patch.

--Brian