From 1cae59ce112ccb51b45357a52b902f80fce1eef1 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 28 Aug 2013 11:34:08 +0000 Subject: dbwrap_ctdb: Treat empty records as non-existing This is a patch implementing the workaround Christian mentioned in https://bugzilla.samba.org/show_bug.cgi?id=10008#c5 Bug: https://bugzilla.samba.org/show_bug.cgi?id=10008 Signed-off-by: Volker Lendecke Reviewed-by: Christian Ambach --- source3/lib/ctdbd_conn.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3/lib/ctdbd_conn.c') diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index 4f5dce05dd..f960541c3a 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -1474,6 +1474,14 @@ NTSTATUS ctdbd_parse(struct ctdbd_connection *conn, uint32_t db_id, goto fail; } + if (reply->datalen == 0) { + /* + * Treat an empty record as non-existing + */ + status = NT_STATUS_NOT_FOUND; + goto fail; + } + parser(key, make_tdb_data(&reply->data[0], reply->datalen), private_data); -- cgit