[PATCH] make schannel.tdb TDB_CLEAR_IF_FIRST

Andrew Bartlett abartlet at samba.org
Thu Jun 24 17:08:10 MDT 2010


On Thu, 2010-06-24 at 16:43 +0200, Volker Lendecke wrote:
> On Thu, Jun 24, 2010 at 09:22:53AM +1000, Andrew Bartlett wrote:
> > Attached again is my proposed set of changes.  They pass 'make test' in
> > Samba3 and Samba4, and I've manually verified that the
> > TDB_CLEAR_IF_FIRST behaviour is applied correctly (by inspection with
> > tdbdump while conduction schannel operations against Samba3)
> > 
> > I think I've followed the pattern given above correctly.  If someone
> > could please push/review/comment I would very much appreciate it. 
> 
> The changes technically look ok. In particular, as we should
> remove all non CLEAR_IF_FIRST uses of tdb without
> transactions. I just wonder where the fsyncs in your tests
> come from. I have always thought that tdb does not do fsyncs
> when no transactions are used, but I might be wrong.
> 
> Can you explain where the fsync calls in your test come
> from?

Yes, this TDB uses transactions to ensure the updates are safe
(inherited from gd's conversion of this functionality from ldb, which
used transactions).  I guess that now that it is CLEAR_IF_FIRST then we
could use normal tdb locking rather than needing the lock out the whole
DB for exclusive access. 

I would however like to leave that for a subsequent patch, if that's OK.
(We would need all of this change anyway, and I need to carefully
consider the required semantics). 

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20100625/b47a19ee/attachment.pgp>


More information about the samba-technical mailing list