|
|
|
|
||||||
| comp.info.servers.unix Web servers for UNIX platforms. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
I've looked high and low and searched the groups for a solution. I understand that suexec strips environmental variables before it launches the child process. Looking at the c code it uses execve(). My question is: how can I get child processes to inherit some environmental variables from a central file (like source profilename). I.E. I'd like to have *one* file that specifies environmental variables for all sorts of cgi scripts (bash/perl/python/c) etc. Is that possible? Thanks in advance, Yi |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Sat, 07 May 2005 12:15:02 -0700 Yi Qiang <yqiang@washington.edu> wrote:
| I've looked high and low and searched the groups for a solution. I | understand that suexec strips environmental variables before it launches | the child process. Looking at the c code it uses execve(). My question | is: how can I get child processes to inherit some environmental | variables from a central file (like source profilename). I.E. I'd like | to have *one* file that specifies environmental variables for all sorts | of cgi scripts (bash/perl/python/c) etc. Is that possible? You can write your own C code into, or in place of, suexec.c (be beware if you don't know why absolutely everything it does is done, then you could be exposing your server to exploits). If you can program in C then there's no reason you can't make it do exactly what _you_ want it to do. That's one of the reasons for having things in open source. And if you can't or don't want to do that, I'm sure there are hundreds of people who (like me) could do it for you for some price. -- ----------------------------------------------------------------------------- | Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
phil-news-nospam@ipal.net wrote:
> On Sat, 07 May 2005 12:15:02 -0700 Yi Qiang <yqiang@washington.edu> wrote: > > | I've looked high and low and searched the groups for a solution. I > | understand that suexec strips environmental variables before it launches > | the child process. Looking at the c code it uses execve(). My question > | is: how can I get child processes to inherit some environmental > | variables from a central file (like source profilename). I.E. I'd like > | to have *one* file that specifies environmental variables for all sorts > | of cgi scripts (bash/perl/python/c) etc. Is that possible? > > You can write your own C code into, or in place of, suexec.c (be beware > if you don't know why absolutely everything it does is done, then you > could be exposing your server to exploits). If you can program in C then > there's no reason you can't make it do exactly what _you_ want it to do. > That's one of the reasons for having things in open source. And if you > can't or don't want to do that, I'm sure there are hundreds of people who > (like me) could do it for you for some price. > Modifying the c code is not so tricky, what becomes tricky will be maintaining apache for future upgrades. Yi |
|
![]() |
| Outils de la discussion | |
|
|