summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2016-04-20 13:27:07 +0200
committerVolker Lendecke <vl@samba.org>2016-04-26 14:34:14 +0200
commitcce6b677ff90ef361c45a7b8ad3d482908c3c4a7 (patch)
tree8f45ec6a992c3db9f0450d63fac7b11fff03a527 /source3
parent32b1f78b23b0f47d38417f75af1341a0662184f1 (diff)
downloadsamba-cce6b677ff90ef361c45a7b8ad3d482908c3c4a7.tar.gz
dbwrap_ctdb: Fix ENOENT->NT_STATUS_NOT_FOUND
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11844 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Apr 26 14:34:14 CEST 2016 on sn-devel-144
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/dbwrap/dbwrap_ctdb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c
index 1e4df09a219..532240d1565 100644
--- a/source3/lib/dbwrap/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap/dbwrap_ctdb.c
@@ -1298,6 +1298,16 @@ static NTSTATUS db_ctdb_parse_record(struct db_context *db, TDB_DATA key,
ret = ctdbd_parse(messaging_ctdbd_connection(), ctx->db_id, key,
state.ask_for_readonly_copy, parser, private_data);
if (ret != 0) {
+ if (ret == ENOENT) {
+ /*
+ * This maps to
+ * NT_STATUS_OBJECT_NAME_NOT_FOUND. Our upper
+ * layers expect NT_STATUS_NOT_FOUND for "no
+ * record around". We need to convert dbwrap
+ * to 0/errno away from NTSTATUS ... :-)
+ */
+ return NT_STATUS_NOT_FOUND;
+ }
return map_nt_error_from_unix(ret);
}
return NT_STATUS_OK;