dead records in locking.tdb (was: Locking database cleanup?)

Daniel Coletti dcoletti at xtech.com.ar
Wed May 31 14:20:25 GMT 2006


Daniel Coletti wrote:
> Hi,
[..]
> Now, I'm running samba 3.0.14a-3sarge, and using samba as a file server
> for different version of Ms Windows executing a FOXPRO legacy
> application (the smb.conf is down below).
> If I execute a FOX rlock() to get a lock of a specific record in a DBF
> file, I can see that the locking record gets added correctly in the
> locking.tdb file. While having this record locked I hard reseted the
> Windows PC.
> What I see next is that the smbd instance lives for a few seconds and as
> the Windows PC comes back on, this particular smbd instance dies but the
> record in the locking.tdb file still exists ... avoiding the same or any
> new Windows PC to get a lock of this DBF.

Hi, I developed a small perl script using Angus Lees' TDB_File CPAN
which goes throught the locking.tdb file and searches for a string in
the 'data' part of the records. (I couldn't remove the records using
tdbtool)
I know its ugly and has a lot for potential problems, but it works.
Is anybody interested in this script? Should I send it to this list just
in case somebody needs it in the future?

thanks,

daniel//

> My questions are:
> 	1- Is this validation process that Jeremy mentioned has been added (or
> fixed) in a later samba release from 3.0.14a-3?
> 	2- Is there any way to delete the locking.tdb record from file using
> tdbtool? Would release the non-existing lock? (eventhough I see a
> "delete" action in the tdbtool help I can't establish the correct key of
> this record using tdbdump)
> 
> My problem is that I can't afford restarting samba, which cleans the
> locking.tdb dead record.
[..]

-- 
Daniel Coletti
XTech (Soluciones Linux para Empresas) - http://www.xtech.com.ar
25 de Mayo 293 - 5to. 'B'
Buenos Aires, Argentina


More information about the samba-technical mailing list