You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Natassia <na...@protonmail.com.INVALID> on 2021/08/06 17:11:20 UTC

[users@httpd] Retrieve the content of the "SuexecUserGroup" variable in a module

Hello to all,

I'm developing a module that I'm going to publish on GitHub when finished, maybe people will be in the same "search" as me.

I am trying to access the "SuexecUserGroup" variable. But in the Apache documentation, they don't reference the access.
I tried several methods, but Apache returns the contents of the "SuexecUserGroup" variable of the last loaded VHOST.

Do you know the path to the variable in C ?

I can get other variables from the VHOST and the content, but this one, impossible.

Solution, create my own variable and fill it. But I like to work with what is native. So Apache already has the information in the VHOST and I find it clean to retrieve it and not make a new one.

Best Regards,
Nat

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Retrieve the content of the "SuexecUserGroup" variable in a module

Posted by Nick Kew <ni...@apache.org>.

> On 6 Aug 2021, at 18:11, Natassia <na...@protonmail.com.INVALID> wrote:
> 
> Hello to all,
> 
> I'm developing a module that I'm going to publish on GitHub when finished, maybe people will be in the same "search" as me.
> 
> I am trying to access the "SuexecUserGroup" variable. But in the Apache documentation, they don't reference the access.

Perhaps because it's not part of any API.

> I tried several methods, but Apache returns the contents of the "SuexecUserGroup" variable of the last loaded VHOST.
> 
> Do you know the path to the variable in C ?

That's a property of mod_suexec.  For another module to access it requires that you
break modularity, and look up mod_suexec's config for the virtual host.

> I can get other variables from the VHOST and the content, but this one, impossible.
> 
> Solution, create my own variable and fill it. But I like to work with what is native. So Apache already has the information in the VHOST and I find it clean to retrieve it and not make a new one.

I'm not clear from that how you've tried to retrieve it.  If you're already doing what I
said, you may be doing it in a hook where the vhost doesn't actually exist as a
current server_rec identity.  If so there's an even more messy way to get it (provided
you're at least after config has happened): iterate through server_recs and find yours.
But if that's the solution, it suggests the problem may want re-thinking!

-- 
Nick Kew
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org