mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
libcli/security: comparability check: claim members are of one type
We know from the way claims are defined, and from the code that checks sortedness and sets the flag. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
55999b7b7b
commit
2eb00c0bba
@ -1717,7 +1717,18 @@ static bool composite_is_comparable(const struct ace_condition_token *tok,
|
|||||||
*/
|
*/
|
||||||
size_t i;
|
size_t i;
|
||||||
const struct ace_condition_composite *rc = &comp->data.composite;
|
const struct ace_condition_composite *rc = &comp->data.composite;
|
||||||
for (i = 0; i < rc->n_members; i++) {
|
size_t n = rc->n_members;
|
||||||
|
|
||||||
|
if ((comp->flags & CLAIM_SECURITY_ATTRIBUTE_UNIQUE_AND_SORTED) &&
|
||||||
|
n > 1) {
|
||||||
|
/*
|
||||||
|
* all members are known to be the same type, so we
|
||||||
|
* can just check one.
|
||||||
|
*/
|
||||||
|
n = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < n; i++) {
|
||||||
if (! tokens_are_comparable(NULL,
|
if (! tokens_are_comparable(NULL,
|
||||||
tok,
|
tok,
|
||||||
&rc->tokens[i])) {
|
&rc->tokens[i])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user