1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/libcli/security
Douglas Bagnall 117d4c5500 libcli/security: access_check with MAXIMUM_ALLOWED checks callbacks
To help clarify the logic, we make new functions that separate the
deny and allow cases, which helps keep track of what 'yes' and 'no'
mean and which incorporate the logic of token->evaluate_claims
handling, which determines when we want to run a conditional ACE, when
we want to ignore it, and when we want to take offence. In the case
when we decide to run it, we then need to decide whether to apply it
or ignore it based on the result. This last bit differs between allow
and deny aces, hence the two functions.

These functions will replace check_callback_ace_access() over the next
few commits.

In the case where token->evaluate_claims is
CLAIMS_EVALUATION_INVALID_STATE and the DACL contains a conditional
ACE, the maximum allowed is 0, as if it was a "deny everything" ACE.

This is an unexpected case. Most likely the evaluate_claims state
will be NEVER or ALWAYS. In the NEVER case the conditional ACE is
skipped, as would have happened in all cases before 4.20, while in the
ALWAYS case the conditional ACE is run and applied if successful.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-09-26 23:45:36 +00:00
..
tests libcli/security: adjust tests for evaluate_claims flag 2023-09-26 23:45:36 +00:00
access_check.c libcli/security: access_check with MAXIMUM_ALLOWED checks callbacks 2023-09-26 23:45:36 +00:00
access_check.h CVE-2023-0614 libcli/security: Make some parameters const 2023-04-05 02:10:34 +00:00
claims-conversions.c libcli:security: helpers for converting claim types 2023-09-26 23:45:35 +00:00
claims-conversions.h libcli:security: helpers for converting claim types 2023-09-26 23:45:35 +00:00
conditional_ace.c libcli/security/conditional ACEs: compare composites as sets 2023-09-26 23:45:35 +00:00
conditional_ace.h libcli:security: add code to interpret conditional ACES 2023-09-26 23:45:35 +00:00
create_descriptor.c lbcli/security: callback object ACES fall back with no GUID 2023-09-26 23:45:35 +00:00
display_sec.c libcli:sec:display: use macro for more ace types 2023-09-07 04:53:41 +00:00
display_sec.h
dom_sid.c libcli:security: Prefer explicit initialization to ZERO_STRUCTP() 2023-09-14 21:35:29 +00:00
dom_sid.h libcli/security: Remove unused function sid_compare_domain() 2023-08-08 04:39:37 +00:00
object_tree.c libcli:security: Fix code spelling 2023-04-27 14:25:38 +00:00
privileges_private.h
privileges.c libcli:security: Fix code spelling 2023-04-27 14:25:38 +00:00
privileges.h libcli:security: Fix code spelling 2023-04-27 14:25:38 +00:00
pysecurity.c libcli/security/pysecurity: use NULL to mean NULL in C 2023-08-24 02:53:30 +00:00
sddl_conditional_ace.c libcli:security: add functions to decode and decode RA ACEs 2023-09-26 23:45:35 +00:00
sddl.c libcli/security: SDDL: add callback and resource ace type flags 2023-09-26 23:45:35 +00:00
sddl.h libcli/security: make sddl_encode_sid an external function 2023-09-07 04:53:41 +00:00
secace.c libcli/security: callback object aces are object aces 2023-09-26 23:45:35 +00:00
secace.h libcli/security: helper to find ACEs with meaningful codas 2023-09-26 23:45:35 +00:00
secacl.c libcli/security: Avoid includes.h 2023-03-09 18:10:33 +00:00
secacl.h libcli: make_sec_acl() copies the ace_list, make that const 2021-01-22 19:54:38 +00:00
secdesc.c lib: Remove a talloc_stackframe() 2023-03-09 18:10:33 +00:00
secdesc.h libcli/security: Remove unused dup_sec_desc_buf() 2019-05-22 05:59:14 +00:00
security_descriptor.c libcli:security: Fix code spelling 2023-04-27 14:25:38 +00:00
security_descriptor.h libcli/security: add security_descriptor_[s|d]acl_insert() helpers 2023-03-22 15:01:32 +00:00
security_token.c libcli/security: Rename dup_nt_token() -> security_token_duplicate() 2023-09-26 23:45:36 +00:00
security_token.h libcli/security: Rename dup_nt_token() -> security_token_duplicate() 2023-09-26 23:45:36 +00:00
security.h libcli:security: Fix code spelling 2023-04-27 14:25:38 +00:00
session.c libcli/security: Avoid includes.h 2023-03-09 18:10:33 +00:00
session.h libcli/security: implement SECURITY_GUEST 2016-04-28 16:51:17 +02:00
util_sid.c lib: Move few bytes of R/W data to R/O text 2023-08-14 19:53:37 +00:00
wscript_build libcli/security: cmocka test for running conditional ACEs 2023-09-26 23:45:35 +00:00