Bug: tdb read-only open and truncate
Elrond
elrond at samba-tng.org
Wed Oct 3 11:15:06 GMT 2001
Hi,
We got this report on tng-users and I'm forwarding it here
with the author's permission.
It clearly describes a bug in tdb.
I suppose, you're also interested in fixing this.
Elrond
p.s.: Our tdb is in sync with tdb in head, so anything said
here applies to your tdb (including line numbers).
----- Forwarded message from Phoenix <phoenix at comms.engg.susx.ac.uk> -----
From: Phoenix <phoenix at comms.engg.susx.ac.uk>
To: <tng-users at samba-tng.org>
Subject: tdb read-only open and truncate
there is an error in tdb.c line ~1400 where you try to truncate the tdb
file while it is opened read-only. this is on current cvs source.
because the truncate fails and the tdb open calls fails along with it, I
suppose it blocks access to the dbs (I'm not aware about the structure of
the code, thus I might me mistaken. for sure "smbstatus" does not like
it).
I changed the code to ignore the "goto fail" and log the attempts to
truncate a read-only tdb. with one user in-session and another just loged
in I got around 25 attempts on the log and everything seems to work fine.
smbstatus turned back to normal, giving me a list of the locked files.
not sure if this is an already known bug/error. I can reproduce it with
extensive logs if necessary.
samba-tng serves as pdc for mostly nt4 machines and few w2k and w98.
runs on linux, slack8 libs (glibc 2.2.3), with quotas,ssl,utmp enabled.
keep up the good work
phoenix
--
FA EA F0 FF 00 F0
----- End forwarded message -----
More information about the samba-technical
mailing list