From e8f9b6fd38040c9aebafa2c3f62da10e58cb2b9f Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 27 Sep 2011 16:06:48 +0200 Subject: [PATCH 1/1] s3:dbwrap_ctdb: improve the check for skipping the __db_sequence_number__ record in traverse It did not compare the last charcter (usually '\0') --- source3/lib/dbwrap_ctdb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source3/lib/dbwrap_ctdb.c b/source3/lib/dbwrap_ctdb.c index e7b93551cf..db16b35a30 100644 --- a/source3/lib/dbwrap_ctdb.c +++ b/source3/lib/dbwrap_ctdb.c @@ -1250,8 +1250,7 @@ static int traverse_persistent_callback(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DAT * This is used for persistent transactions internally. */ if (kbuf.dsize == strlen(CTDB_DB_SEQNUM_KEY) + 1 && - strncmp((const char*)kbuf.dptr, CTDB_DB_SEQNUM_KEY, - strlen(CTDB_DB_SEQNUM_KEY)) == 0) + strcmp((const char*)kbuf.dptr, CTDB_DB_SEQNUM_KEY)) { goto done; } -- 2.34.1