From 6e15a20228c78e0f7b74da2fc4bc7edd78b6507f Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Fri, 10 Nov 2023 16:13:40 +1300 Subject: [PATCH] libcli/security: CA: tokens_are_comparable() considers the obvious Existing callers already make this check, but we are soon going to use it in contexts that don't. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- libcli/security/conditional_ace.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libcli/security/conditional_ace.c b/libcli/security/conditional_ace.c index 5d945c0b0bb..9f2899eaef5 100644 --- a/libcli/security/conditional_ace.c +++ b/libcli/security/conditional_ace.c @@ -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 */ -- 2.47.3