ldb_match: remove redundant check
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 3 Mar 2021 06:54:37 +0000 (19:54 +1300)
committerStefan Metzmacher <metze@samba.org>
Tue, 2 Nov 2021 20:36:16 +0000 (20:36 +0000)
We already ensure the no-trailing-asterisk case ends at the end of the
string.

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit fa93339978040eab52b2722c1716028b48d8d084)

lib/ldb/common/ldb_match.c

index da595615bd9485903c8697a8839b16b44e8396ca..2f4d41f34416f293a76162af6c627a3f1e376070 100644 (file)
@@ -342,8 +342,6 @@ static int ldb_wildcard_compare(struct ldb_context *ldb,
                TALLOC_FREE(cnk.data);
        }
 
-       /* last chunk may not have reached end of string */
-       if ( (! tree->u.substring.end_with_wildcard) && (val.length != 0) ) goto mismatch;
        talloc_free(save_p);
        *matched = true;
        return LDB_SUCCESS;