Subject: Re: Problem applying Security Advisory 2007-003 fix
To: None <jgw@tx0.org, netbsd-help@netbsd.org>
From: David H. Gutteridge <dhgutteridge@sympatico.ca>
List: netbsd-help
Date: 03/15/2007 11:12:39
> > The macro PORT_NONBLOCK isn't getting defined anywhere for some
> > reason.  What version of dist/bind/lib/bind/configure.in is in your 
>tree?
> > (The correct one should include a definition of that macro.  If you
> > updated everything, it should have got pulled in, but give it a grep.)
>
>from my copy of /usr/src/dist/bind/lib/bind/configure.in:
>...
>AC_REVISION($Revision: 1.1.1.2.4.1 $)
>
>AC_INIT(resolv/herror.c)
>AC_PREREQ(2.13)
>...
>PORT_NONBLOCK="#define PORT_NONBLOCK O_NONBLOCK"
>...
>
>So it is getting defined here but not coming into the build process prior
>to /usr/src/dist/bind/lib/isc/unix/entropy.c .  Weird.  Maybe I'll just
>update the whole src tree and try again, and if it still fails I'll wait
>until 4.0 comes out; the risk of this issue is almost nil for me.

Ugh.  I think I have the answer.  There are also make files for
BIND in the tree under usr.sbin/bind.  When updating your source
tree try bumping those files too.  There appears to be a relevant
file here: usr.sbin/bind/include/config.h.  That file contains this:

#define PORT_NONBLOCK O_NONBLOCK

So that should be the real thing, perhaps the configure.in was
a red herring.  (Like you, I'm not a NetBSD developer, just an
end user, so I don't know their tree that well, especially not
the third-party bits, since I don't usually have occasion to look
at them.  I apologize for leading you all over the place with this.)

>Thanks though for all your help; trying to figure out these sort of things
>really helps me learn about the system.

I would recommend you PR this so that the NetBSD developers know
there's a problem here.  (At a minimum, their security advisory appears
incomplete for the 3.0 branch.)  If my latest suggestion above doesn't
work, you'll probably be able to find someone more helpful than me
through that process.  ;)

Regards,

Dave