replication rename fixes in 4.1

Andrew Bartlett abartlet at samba.org
Thu Apr 17 14:06:18 MDT 2014


On Thu, 2014-04-17 at 16:12 +0200, Stefan (metze) Metzmacher wrote:
> Am 17.04.2014 00:59, schrieb Andrew Bartlett:
> > On Thu, 2014-04-17 at 00:13 +0200, Stefan (metze) Metzmacher wrote:
> >> Hi Andrew,
> >>
> >>>>> In the meantime, I see no good reason to loose track of your patches, so
> >>>>> they are in autobuild for master.  Can you please review these two:
> >>>>>
> >>>>> https://git.samba.org/abartlet/samba.git/?p=abartlet/samba.git/.git;a=shortlog;h=refs/heads/drs-object-corruption
> >>>>
> >>>> It fails because of an error in my first patch,
> >>>> I've fixed it in
> >>>> https://git.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/heads/master4-abartlet2
> >>>>
> >>>> https://git.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=033ccc0b100e1bd1631aeccd6f7cb58b2e9f9e4a
> >>>> needs your review again.
> >>>>
> >>>> And I have some minor comments on
> >>>> https://git.samba.org/?p=metze/samba/wip.git;a=commit;h=7170028a28ba530c0b59af680f41092d5f5e2f64
> >>>
> >>> I've added my review, and fixed the blacklist to be more general,
> >>
> >> I don't see any change for this in
> >> https://git.samba.org/abartlet/samba.git/?p=abartlet/samba.git/.git;a=shortlog;h=refs/heads/metze-master4-abartlet2
> >> https://git.samba.org/abartlet/samba.git/?p=abartlet/samba.git/.git;a=commit;h=c388addb40884ab4fc30bda18ad74d5f170fb19a
> >> seems to be identical to the one in my branch.
> > 
> > Yeah, I have no idea what happened, probably got lost when undoing the
> > second hunk.  Sorry.
> > 
> >>> but I
> >>> can't find the right shell script magic to make the
> >>
> >> if [ x$RELEASE = x"somerelease" -o x$RELEASE = x"otherrelease" ]; then
> >>
> >> should do it.
> > 
> > I'll try that.  I was using == and that wasn't working.
> > 
> >>> dbcheck-oldrelease.sh code use a whitelist.  I've pushed it back to my
> >>> branch there.
> >>
> >> If you remove the trailing whitespaces in
> >> https://git.samba.org/abartlet/samba.git/?p=abartlet/samba.git/.git;a=commitdiff;h=15032ef138db5e4a779f7bba663e55227be11d30
> >> that's fine too.
> > 
> > Updated patches have been pushed.
> 
> It fails like this in autobuild:
> 
> [1589/1594 in 2h9m21s] samba4.blackbox.dbcheck(dc)
> UNEXPECTED(failure): samba4.blackbox.dbcheck(dc).dbcheck(dc:local)
> REASON: _StringException: _StringException: Checking 6494 objects
> ERROR(<type 'exceptions.TypeError'>): uncaught exception - unable to
> decode binary string
>   File "bin/python/samba/netcmd/__init__.py", line 175, in _run
>     return self.run(*args, **kwargs)
>   File "bin/python/samba/netcmd/dbcheck.py", line 136, in run
>     controls=controls, attrs=attrs)
>   File "bin/python/samba/dbchecker.py", line 130, in check_database
>     error_count += self.check_object(object.dn, attrs=attrs)
>   File "bin/python/samba/dbchecker.py", line 1089, in check_object
>     rdn1_val = ldb.binary_decode(rdn1_vale)
> 
> FAILED (1 failures, 0 errors and 0 unexpected successes in 0 testsuites)
> 
> But I can't reproduce it on my ubuntu 12.04 system with
> TDB_NO_FSYNC=1 make -j test TESTS=samba4.blackbox.dbcheck

The problem is, the patch uses the wrong encoding, when trying to escape
values in the DN.

See the difference between 

char *ldb_binary_encode_string(TALLOC_CTX *mem_ctx, const char *string)
and
static int ldb_dn_escape_internal(char *dst, const char *src, int len)

I think we should put this part of the patch on ice until we get that
database to validate it on, presumably by running our modern drs tests
against Samba 4.0.0.  (And if you used it at a production site, take a
careful look at the resulting database).

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba




More information about the samba-technical mailing list