]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli/security: CA: tokens_are_comparable() considers the obvious
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 10 Nov 2023 03:13:40 +0000 (16:13 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 27 Nov 2023 22:37:32 +0000 (22:37 +0000)
Existing callers already make this check, but we are soon going to use
it in contexts that don't.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/security/conditional_ace.c

index 5d945c0b0bba6dca43b42a87fa4449ad0081e7aa..9f2899eaef58f42a0b99f3c660cc534141276219 100644 (file)
@@ -1276,6 +1276,9 @@ static bool tokens_are_comparable(const struct ace_condition_token *op,
         * 1, and the operator is == or !=.
         */
        //XXX actually it says "literal integers", do we need to check flags?
+       if (lhs->type == rhs->type) {
+               return true;
+       }
 
        if (IS_INT_TOKEN(lhs) && IS_INT_TOKEN(rhs)) {
                /* don't block e.g. comparing an int32 to an int64 */