smbd: ignore ctdb tombstone records in fetch_share_mode_unlocked_parser()
authorRalph Boehme <slow@samba.org>
Wed, 20 Jul 2016 10:36:24 +0000 (12:36 +0200)
committerRalph Boehme <slow@samba.org>
Mon, 8 Aug 2016 12:26:24 +0000 (14:26 +0200)
dbwrap_parse_record() can return ctdb tombstone records from the lctdb,
ignore them.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12005

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/locking/share_mode_lock.c

index b5a63f8bf2e6aa32b3da995600add578d9c2e20d..f738323ef7c9c42f886ede1af24f228f9266d7d0 100644 (file)
@@ -628,6 +628,12 @@ static void fetch_share_mode_unlocked_parser(
        struct share_mode_lock *lck = talloc_get_type_abort(
                private_data, struct share_mode_lock);
 
+       if (data.dsize == 0) {
+               /* Likely a ctdb tombstone record, ignore it */
+               lck->data = NULL;
+               return;
+       }
+
        lck->data = parse_share_modes(lck, key, data);
 }