You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by "Jeremy R." <je...@novawave.net> on 2010/08/28 21:09:22 UTC

Hooking get_suexec_identity and returning NULL

I'm writing a module which I want to disable suexec under some circumstances. Unfortunately, get_suexec_identity is declared in such a way that I don't see a clean way to achieve this.

I can hook get_suexec_identity and return NULL when the conditions I want arise, but this simply causes the next module to handle the hook (mod_userdir, for instance, always handles the hook if it's a userdir request). I want to override that and force NULL (that is, not calling suexec). The two approaches I've come across so far:

1. Put in a bogus identity, handle it by modifying suexec.
2. Modify the mod_userdir_user table so that mod_userdir doesn't handle get_suexec_identity.

Neither of these is particularly palatable (it would be nice if "no identity" and "declined" were distinct values); is there a better option? If not, which of these two options would be better? I'm completely new to Apache development, so any insight or pointers would be appreciated.

Thanks,

-- 
Jeremy R.