- got the gethostbyname() failure problem solved.
(the resolver needs a shared lib that was tried to load AFTER chrooting...)
This commit is contained in:
parent
00dfe93a0d
commit
4f96757513
@ -1,5 +1,8 @@
|
||||
0.5.0
|
||||
=====
|
||||
23-Nov-2003: - got the gethostbyname() failure problem solved.
|
||||
(the resolver needs a shared lib that was tried
|
||||
to load AFTER chrooting...)
|
||||
22-Nov-2003: - utils.c: use gethostbyname_r() in favor of
|
||||
gethostbyname - if available (siproxd uses threads!)
|
||||
- some small items & cleanup
|
||||
|
||||
@ -233,6 +233,15 @@ void secure_enviroment (void) {
|
||||
* change root directory into chroot jail
|
||||
*/
|
||||
if (configuration.chrootjail) {
|
||||
/* !!!
|
||||
* Before chrooting I must at leat once trigger the resolver
|
||||
* as it loads some dynamic libraries. Once chrootet
|
||||
* these libraries will *not* be found and gethostbyname()
|
||||
* calls will simply fail (return NULL pointer and h_errno=0).
|
||||
* Took me a while to figure THIS one out
|
||||
*/
|
||||
struct in_addr dummy;
|
||||
get_ip_by_host("foobar", &dummy);
|
||||
DEBUGC(DBCLASS_CONFIG,"chrooting to %s",
|
||||
configuration.chrootjail);
|
||||
sts = chroot(configuration.chrootjail);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user