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.