[PATCH] Samba 4 fix for bugzilla #4958
Andrew Kroeger
andrew at sprocks.gotdns.com
Tue Sep 18 00:49:03 GMT 2007
Andrew Bartlett wrote:
> On Mon, 2007-09-17 at 18:53 -0500, Andrew Kroeger wrote:
>> Andrew Bartlett wrote:
>>> I really don't like the idea that the DN and attribute being different.
>>> Otherwise, I fully agree with you here, and once simo is happy, I think
>>> we can apply a patch.
>>>
>>> Perhaps handle this as delete/add (rather than the other order), or pass
>>> in a flag to skip the check?
>> Please find attached an updated patch that addresses the
>> case-change-only rename using delete/add. I have added comments in the
>> patch to describe why we do add/delete in some cases and delete/add in
>> another, as well as how we could lose data in the delete/add case if the
>> delete succeeds and the add fails. Given what we are trying to
>> accomplish, I can't think of any other way to handle this because we
>> don't have any transaction semantics available.
>
> We have (and use) tdb transactions in ldb_tdb, so this should not be a
> concern.
Thanks for the clarification. I hadn't ever seen the transaction code
before, and when I was tracking down this error I set my initial
breakpoint after where the transaction had been started.
Now that I see what's happening with the transactions, I've confirmed
with a backtrace that a transaction has already been started by the time
ltdb_rename() is called, so everything should be fine, correct?
Thanks,
Andrew Kroeger
More information about the samba-technical
mailing list