[Samba] Re: samba server crash and locking.tdb

Jeremy Allison jra at samba.org
Tue Dec 9 17:55:12 GMT 2003


On Tue, Dec 09, 2003 at 01:22:38PM +0200, Nir Livni wrote:
> Hi all,
> 
> Please excuse me if this question is not appropriate for this forum:
> 
> Lets assume that samba server crashed or was shut down abnormally, while
> users where holding open files in the server.
> 
> In this case, I've noticed that locking.tdb is not being cleaned when
> samba is restarting.
> 
> I was wondering why shouldn't it be cleaned.

It should be. It is opened with :

        tdb = tdb_open_log(lock_path("locking.tdb"),
                       0, TDB_DEFAULT|(read_only?0x0:TDB_CLEAR_IF_FIRST),
                       read_only?O_RDONLY:O_RDWR|O_CREAT,
                       0644);

Note the "TDB_CLEAR_IF_FIRST" which should cause it to be re-initialised
if no other process holds locks on open.

Jeremy.


More information about the samba mailing list