diff --git a/ChangeLog b/ChangeLog index 8fcdfaaf4..3e90fcab1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-04-20 Richard Frith-Macdonald + + * Tools/gdomap.c: Don't do chdir/chroot on sysv - it screws up + their streams so we can't handle incoming connections. + 2000-04-20 Richard Frith-Macdonald * Source/NSCalendarDate.m: Fix memory leak when initialising from diff --git a/Tools/gdomap.c b/Tools/gdomap.c index afb4890e3..1ec034d10 100644 --- a/Tools/gdomap.c +++ b/Tools/gdomap.c @@ -2145,10 +2145,15 @@ handle_request(int desc) * probing, try to select one on the same network to send back. * otherwise, respond with the address it was probing. */ - if (is_local_host(laddr) == 0) + if (is_local_host(laddr) == 0 + || laddr.s_addr == loopback.s_addr) { for (i = 0; i < interfaces; i++) { + if (addr[i].s_addr == loopback.s_addr) + { + continue; + } if ((mask[i].s_addr && addr[i].s_addr) == (mask[i].s_addr && r_info[desc].addr.sin_addr.s_addr)) { @@ -3335,11 +3340,13 @@ printf( { setuid (-1); } +#if !defined(__svr4__) /* * As another level of paranoia - restrict this process to /tmp */ chdir("/tmp"); chroot("/tmp"); +#endif init_probe(); /* Probe other name servers on net. */