summaryrefslogtreecommitdiff
path: root/source3/lib/ctdbd_conn.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-08-28 11:34:08 +0000
committerJeremy Allison <jra@samba.org>2013-08-28 23:37:08 +0200
commit1cae59ce112ccb51b45357a52b902f80fce1eef1 (patch)
tree20882876c64ce88488da401a059ed2bb600b8a94 /source3/lib/ctdbd_conn.c
parent91186fcf9da6fa1180d9d773882a388e78c4c3b9 (diff)
downloadsamba-1cae59ce112ccb51b45357a52b902f80fce1eef1.tar.gz
samba-1cae59ce112ccb51b45357a52b902f80fce1eef1.tar.bz2
samba-1cae59ce112ccb51b45357a52b902f80fce1eef1.zip
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 <vl@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
Diffstat (limited to 'source3/lib/ctdbd_conn.c')
-rw-r--r--source3/lib/ctdbd_conn.c8
1 files changed, 8 insertions, 0 deletions
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);