libcli/security: claim_v1_to_ace_token(): avoid unnecessary re-sort
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 22 Nov 2023 03:40:12 +0000 (16:40 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 27 Nov 2023 22:37:32 +0000 (22:37 +0000)
commit4f56c702834072d0353072b28a317208eeabb886
tree2ddcb59f1179c614bb8135019ca5bb4a2e8c90fc
parente223ce4a930d5c90d9effe37ac324ec159b35c9b
libcli/security: claim_v1_to_ace_token(): avoid unnecessary re-sort

If it is a wire claim (which is probably most common), the checking
and sorting has already happened. We don't need to make a copy to
sort and check.

In either case, there is still a copy step to make the conditional ACE
token.

This shuffles around some knownfails because the claim_v1_copy()
function we were using is checking for duplicates, which we don't
always want. That will be fixed soon.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/security/claims-conversions.c
selftest/knownfail.d/conditional_ace_claims
selftest/knownfail.d/run_conditional_ace [deleted file]