]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:dbwrap_watch: filter out records with empty payload during traverse
authorStefan Metzmacher <metze@samba.org>
Mon, 25 Jul 2022 20:19:13 +0000 (22:19 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 26 Jul 2022 13:40:34 +0000 (13:40 +0000)
We will soon have records with just a number of watchers, but without
payload. These records should not be visible during traverse.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15125

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

index d4497355b9a7b3839e995ddd1ca28aa780fa1418..20d08b55fc8c9f2a100794e9054d82c3265a136d 100644 (file)
@@ -584,6 +584,9 @@ static int dbwrap_watched_traverse_fn(struct db_record *rec,
        if (!ok) {
                return 0;
        }
+       if (prec.value.dsize == 0) {
+               return 0;
+       }
        prec.value_valid = true;
 
        return state->fn(&prec, state->private_data);