[BusyBox] httpd setgid support and CGI SERVER_ADDR var
Vladimir N. Oleynik
dzo at simtreas.ru
Wed Oct 22 09:27:02 UTC 2003
John,
>>Hmm. Best method: call httpd with setted and exported this environs,
>>and patch httpd to don`t unset this vars, see saving PATH code.
>
>
> Sounds good. I've done that and included a default of gethostname() as
> well. So SERVER_NAME gets set to:
> SERVER_NAME env var
But, if I set server_name from apache config then my apache redirecting
from other name in URL to specified name from config and this
> or gethostname()
> or calculated SERVER_ADDR value
code don`t called ;-)
Also, server adderess may be configured as bind/listen address.
Also. I think, we can use libbb/change_identity() for change gid/uid.
The code all grows and grows. But the most simple would be to make so:
cgi-bin/start:
#!/bin/sh
. /var/www/cgi-bin/www_vars
exec your_boa_cgi
/var/www/cgi-bin/www_vars:
#!/bin/sh
export SERVER_NAME=www.domain
export SERVER_ADDRESS=IP_inteface (or parse ifconfig out message)
;-)
--w
vodz
More information about the busybox
mailing list