Re: gethostbyname in 3.8 returns error -1

2005-12-07 Thread Federico Giannici
Otto Moerbeek wrote: On Tue, 6 Dec 2005, Federico Giannici wrote: Since I upgraded an OpenBSD/amd64 3.7 to 3.8 (following instructions in the Upgrade Guide) sometimes gethostbyname() returns NULL with h_errno equal to -1 (Resolver internal error). What is the value of errno? errno is 2.

Re: gethostbyname in 3.8 returns error -1

2005-12-07 Thread Federico Giannici
Federico Giannici wrote: Otto Moerbeek wrote: On Tue, 6 Dec 2005, Federico Giannici wrote: Since I upgraded an OpenBSD/amd64 3.7 to 3.8 (following instructions in the Upgrade Guide) sometimes gethostbyname() returns NULL with h_errno equal to -1 (Resolver internal error). What is the

Re: gethostbyname in 3.8 returns error -1

2005-12-07 Thread Ted Unangst
On 12/7/05, Federico Giannici [EMAIL PROTECTED] wrote: May it be relevant that the program is run chrootted??? I'm going to make some tests, as soon as I have the time... Got it! I simply copied /etc/resolv.conf to the chrootted path and the problem disappeared. So something changed

Re: gethostbyname in 3.8 returns error -1

2005-12-07 Thread Otto Moerbeek
On Wed, 7 Dec 2005, Ted Unangst wrote: On 12/7/05, Federico Giannici [EMAIL PROTECTED] wrote: May it be relevant that the program is run chrootted??? I'm going to make some tests, as soon as I have the time... Got it! I simply copied /etc/resolv.conf to the chrootted path and the

Re: gethostbyname in 3.8 returns error -1

2005-12-07 Thread Ted Unangst
On 12/7/05, Otto Moerbeek [EMAIL PROTECTED] wrote: i made some changes to the resolver, though they should deal with this situation (unless there's a bug). I only grepped through the code of openser briefly, but this scenario seems likely. 1. App calls res_init() which calls _res_init(1);

Re: gethostbyname in 3.8 returns error -1

2005-12-07 Thread Ted Unangst
try this, i think it covers the chroot case better. Index: res_init.c === RCS file: /cvs/src/lib/libc/net/res_init.c,v retrieving revision 1.33 diff -u -r1.33 res_init.c --- res_init.c 2005/08/06 20:30:04 1.33 +++ res_init.c

gethostbyname in 3.8 returns error -1

2005-12-06 Thread Federico Giannici
Since I upgraded an OpenBSD/amd64 3.7 to 3.8 (following instructions in the Upgrade Guide) sometimes gethostbyname() returns NULL with h_errno equal to -1 (Resolver internal error). The program (OpenSER 1.0.0) had no problems under 3.7. The domain string is correct. The error seems to appear

Re: gethostbyname in 3.8 returns error -1

2005-12-06 Thread Otto Moerbeek
On Tue, 6 Dec 2005, Federico Giannici wrote: Since I upgraded an OpenBSD/amd64 3.7 to 3.8 (following instructions in the Upgrade Guide) sometimes gethostbyname() returns NULL with h_errno equal to -1 (Resolver internal error). What is the value of errno? The program (OpenSER 1.0.0) had no