[PATCH] DNS patches for review

Andrew Bartlett abartlet at samba.org
Fri Dec 28 00:31:20 MST 2012


On Fri, 2012-12-28 at 07:02 +0100, Kai Blin wrote:
> On 2012-12-28 05:09, Andrew Bartlett wrote:
> > index ba597cf..d2cf42f 100755
> > --- a/source4/scripting/bin/samba_upgradedns
> > +++ b/source4/scripting/bin/samba_upgradedns
> > @@ -449,10 +449,17 @@ if __name__ == '__main__':
> >                      "DNSNAME" : dnsname }
> >                             )
> >  
> > +            res = ldbs.sam.search(base=domaindn, scope=ldb.SCOPE_DEFAULT,
> > +                                  expression='(sAMAccountName=dns-%s)' % (hostname),
> > +                                  attrs=["msDS-KeyVersionNumber"])
> > +            if "msDS-KeyVersionNumber" in res[0]:
> > +                dns_key_version_number = int(res[0]["msDS-KeyVersionNumber"][0])
> > +
> >              secretsdb_setup_dns(ldbs.secrets, names,
> >                                  paths.private_dir, realm=names.realm,
> >                                  dnsdomain=names.dnsdomain,
> > -                                dns_keytab_path=paths.dns_keytab, dnspass=dnspass)
> > +                                dns_keytab_path=paths.dns_keytab, dnspass=dnspass,
> > +                                key_version_number=dns_key_version_number)
> 
> How do you get a dns_key_version_number if the above if statement fails?
> Either we're sure the if statement never fails, and then it's pointless,
> or we need to come up with a fake number ourselves, or raise an exception.
> 
> Same logic in the join.py code.

Thanks, I'll fix that up.  The default value needs to be 1 (really only
applies to windows 2000 mode, but worth doing right). 

Andrew Bartlett

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




More information about the samba-technical mailing list