[PATCH] Samba 4 fix for bugzilla #4958

Andrew Bartlett abartlet at samba.org
Tue Sep 18 06:37:52 GMT 2007


On Mon, 2007-09-17 at 19:49 -0500, Andrew Kroeger wrote:
> 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?

Applied, thanks!

(I've adjusted the comment to clarify that transactions make this safe).

Andrew Bartlett

-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Red Hat Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20070918/0584b7db/attachment.bin


More information about the samba-technical mailing list