git.samba.org
/
ambi
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c3fa00
)
s3:dbwrap_ctdb fix record parsing of empty records
author
Christian Ambach
<ambi@samba.org>
Mon, 22 Apr 2013 20:55:54 +0000
(22:55 +0200)
committer
Christian Ambach
<ambi@samba.org>
Wed, 15 May 2013 08:05:04 +0000
(10:05 +0200)
If the record has the exact size of ctdb_ltdb_header, it is deleted.
Handle it as such, otherwise calls like dbwrap_exists will
report it as still being around
Signed-off-by: Christian Ambach <ambi@samba.org>
source3/lib/dbwrap/dbwrap_ctdb.c
patch
|
blob
|
history
diff --git
a/source3/lib/dbwrap/dbwrap_ctdb.c
b/source3/lib/dbwrap/dbwrap_ctdb.c
index e55689cad56c26120e389aea6f340a3552850f2b..fea4a29b98e01cf853d5d0034c783d720275a1d4 100644
(file)
--- a/
source3/lib/dbwrap/dbwrap_ctdb.c
+++ b/
source3/lib/dbwrap/dbwrap_ctdb.c
@@
-100,7
+100,8
@@
static int db_ctdb_ltdb_parser(TDB_DATA key, TDB_DATA data,
struct db_ctdb_ltdb_parse_state *state =
(struct db_ctdb_ltdb_parse_state *)private_data;
- if (data.dsize < sizeof(struct ctdb_ltdb_header)) {
+ if (data.dsize <= sizeof(struct ctdb_ltdb_header)) {
+ /* a deleted record */
return -1;
}
state->parser(