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); _resp->restimespe
> does not get set
>
> 2. App calls gethostbyname(), all is fine.
>
> 3. App does chroot.
>
> 4. App calls gethostbyname(), which calls _res_init(0). Let's assume
> the recheck is done. The stat() will fail, but since _resp->restimespec
> is not set, it will fall through and try to read /etc/resolv.conf from
> within the chroot.

yes, i think making it set restimespec to now (long ago?) would be a good fix.

Reply via email to