svn commit: samba r5532 - in branches/SAMBA_3_0/source/tdb: .
jra at samba.org
jra at samba.org
Thu Feb 24 01:07:10 GMT 2005
Author: jra
Date: 2005-02-24 01:07:09 +0000 (Thu, 24 Feb 2005)
New Revision: 5532
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5532
Log:
Patch to detect infinite loops when traversing a tdb from "Shlomi Yaakobovich" <Shlomi at exanet.com>
Jeremy.
Modified:
branches/SAMBA_3_0/source/tdb/tdb.c
Changeset:
Modified: branches/SAMBA_3_0/source/tdb/tdb.c
===================================================================
--- branches/SAMBA_3_0/source/tdb/tdb.c 2005-02-24 01:06:57 UTC (rev 5531)
+++ branches/SAMBA_3_0/source/tdb/tdb.c 2005-02-24 01:07:09 UTC (rev 5532)
@@ -1272,6 +1272,13 @@
goto fail;
return tlock->off;
}
+
+ /* Detect infinite loops. From "Shlomi Yaakobovich" <Shlomi at exanet.com>. */
+ if (tlock->off == rec->next) {
+ TDB_LOG((tdb, 0, "tdb_next_lock: loop detected.\n"));
+ goto fail;
+ }
+
/* Try to clean dead ones from old traverses */
current = tlock->off;
tlock->off = rec->next;
More information about the samba-cvs
mailing list