]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
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)
committerKarolin Seeger <kseeger@samba.org>
Wed, 10 Aug 2016 09:37:23 +0000 (11:37 +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>
(cherry picked from commit 7147859c7afc1344e76485e2cbc286679110d96e)

source3/locking/share_mode_lock.c

index 4e9de036c715e61e18e738f95118196866564c04..4503d5dcf19ceba400576ac44c6e75ed2610be3a 100644 (file)
@@ -620,6 +620,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);
 }