[Samba] bug in samba-tool w.r.t. (sub)domains

NOC noc at nieuwland.nl
Tue Jun 4 04:20:44 MDT 2013

Hi all

I'm trying to import our bind dns data for our domain into samba4 using 
sambatool. Unfortunately, our domain has lots of (unnecessary) 
subdomains, but that's hard to revert after a long time. So I will have 
to parse the bind data and do a zonecreate for each subdomain that comes 
out of bind. I can deal with this, but it's cumbersome :-(

The bug I'm talking about is this, when I was trying to add a subdomain, 
I found that samba4 retains a trailing . (dot), the root of the fqdn 
tree, which is usually omitted. To make this even weirder, I can add 
foo.bar.com and foo.bar.com. and both will be listed as pszZoneName when 
asking samba-tool for "dns zonelist localhost".

This is treated by samba as a different subdomain, so when I add 
"x.foo.bar.com" and I later query the address for "x" in subdomain 
"foo.bar.com.", I get an exception. (Which is also ugly, I'd rather get 
a nice error message and proper exit code).

In bind's zone files, these entries look like:

$ORIGIN bar.com.
x.foo IN A


$ORIGIN foo.bar.com.
x IN A

regardless of whether I query for x.foo.bar.com or x.foo.bar.com. I 
expect the same answer. But in the zone files, the trailing dot is 
mandatory to indicate where the root of the tree starts (without the 
dot, the $ORIGIN is appended for the full name)

my samba-tool version is: 4.0.5-4.el6.1



More information about the samba mailing list