[Samba] _msdcs names

Andrew Bartlett abartlet at samba.org
Thu Jun 6 21:51:33 MDT 2013


On Wed, 2013-06-05 at 11:51 +0100, Paul Littlefield wrote:
> On 04/06/13 23:47, Andrew Bartlett wrote:
> > We really don't want that in the wiki, because you should not be putting
> > fixed things in /etc/hosts, we have to fix it another way.  What we do
> > want is to know:
> 
> 
> Hi Andrew
> 
> Thanks for picking this up!
> 
> 
> >   - is this still an issue in GIT master?
> 
> 
> Not sure. When setting up our DC #1 I did originally git from samba-master, but that was a month ago. I decided to match the git revision for DC #2, and all seemed fine apart from this last little hiccup.
> 
> So, it may well have been fixed in the latest git samba-master.
> 
> I DO intend to keep these DCs up-to-date regularly, either from samba-master or stable whichever you think is best :-)
> 
> 
> >   - can we detect the difference between this error and a real
> > non-existent name by looking at return codes (we had a similar issue on
> > FreeBSD, and caught it this way).  I'm hoping we might just be missing
> > that fix, or there was a regression in that.
> 
> 
> OK.
> 
> 
> > We have (multiple) alternative DNS resolvers internally, and we do use
> > them.  We try to use nss when we can, but fall back for the cases that
> > don't work.  If we can't rely on the error code, we may have to use a
> > pre-check of the name instead.
> >
> > Any assistance tracking this down most valued, as it seems to be biting
> > folks.
> 
> 
> I would LOVE to help you folks out.
> 
> Words cannot describe how impressed I am with Samba (through the many years I have been using it) and indeed more so now with Samba4.
> 
> What would you like me to do?

Work out why this lump of code doesn't work:

source4/libcli/resolve/dns_ex.c:run_child_getaddrinfo()

	ret = getaddrinfo(state->name.name, "0", &hints, &res_list);
	/* try to fallback in case of error */
	if (state->do_fallback) {
		switch (ret) {
#ifdef EAI_NODATA
		case EAI_NODATA:
#endif
		case EAI_FAIL:
			/* Linux returns EAI_NODATA on non-RFC1034-compliant names. FreeBSD
returns EAI_FAIL */
		case EAI_NONAME:
			/* getaddrinfo() doesn't handle CNAME or non-RFC1034 compatible
records */
			run_child_dns_lookup(state, fd);
			return;
		default:
			break;
		}
	}
	if (ret != 0) {
		goto done;
	}

For example, work out what ret is in your case, and if it is any
different to a truly missing name.

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba mailing list