libsmb/namequery.c problems ...

Nathan Lutchansky lutchann at litech.org
Sun May 5 07:26:01 GMT 2002


On Sun, May 05, 2002 at 04:16:10PM +0930, Richard Sharpe wrote:
> On Sat, 4 May 2002, Nathan Lutchansky wrote:
> 
> > On Sat, May 04, 2002 at 05:09:12PM +0930, Richard Sharpe wrote:
> > > In tracking down some problems with winbindd I have noticed that 
> > > namequery.c does not handle multiple IP addresses at all if a DC has 
> > > multiple IP addresses (in DNS, and the DNS name is given in passwd server 
> > > in the smb.conf).
> > 
> > > I suspect that this will not cause a problem if the DC has multiple 
> > > adapters that are all configured and working, but if the DC has aliases, 
> > > this will cause a problem because cm_get_dc_name in winbindd_cm.c calls 
> > > get_dc_ip, which only returns one IP, which might be the IP of the alias. 
> > 
> > Why are you putting multiple IP addresses for the same DC in DNS?
> 
> Ummm, I didn't. Win2K with its dynamic DNS updating did.

Oh.  I see.  I should have read your other thread.

> >   It 
> > sounds like the Windows server doesn't expect you to do this.  Samba 
> > expects that each of the IP addresses it receives from get_dc_list will be 
> > independent DCs.
> 
> Well, perhaps not. I think that the code was also designed to handle a 
> multi-homed DC.

Well, OK.  The winbind code may have been written with a multi-homed DC in
mind, but it is fairly clear that the namequery code wasn't.

> > > cm_get_dc_name then goes on to do a WINS request against the returned IP, 
> > > but Windows seems not to listen for WINS requests against anything other 
> > > than the primary IP address of the adapter.
> > 
> > How do Windows clients behave?  Do they somehow "know" the correct address 
> > of the DC?
> 
> Windows clients send out a GetDC request to the NetLogon named pipe. We 
> don't, at present.

I see.

> > > This will cause painfully inexplicable results for some DCs and not 
> > > others, however, it is going to require some work in namequery.c to fix.
> > 
> > I'm working in putting IPv6 support in Samba, which in part requires 
> > changing much of the networking code to operate on address lists rather 
> > than assuming that each host is identified by a single address.  This 
> > should fix the multiple-IPs-per-server problem, but for this case I'm not 
> > sure it will help you since the Windows server behaves differently 
> > depending on which address you talk to.
> 
> OK. Sounds good. However, I need a solution now.

So you need a code patch now, or a workaround for the existing code now?  
-Nathan

-- 
+-------------------+---------------------+------------------------+
| Nathan Lutchansky | lutchann at litech.org |  Lithium Technologies  |
+------------------------------------------------------------------+
|  I dread success.  To have succeeded is to have finished one's   |
|  business on earth...  I like a state of continual becoming,     |
|  with a goal in front and not behind. - George Bernard Shaw      |
+------------------------------------------------------------------+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20020505/8f1cf338/attachment.bin


More information about the samba-technical mailing list