From a84e89aa712bfb0ed2b0ba64d98dc919193d8055 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Fri, 21 Jul 2023 14:36:20 +1200 Subject: [PATCH] libcli/security: create_descriptor handles unknown ACE types Because we're going to add more ACE types. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- libcli/security/create_descriptor.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libcli/security/create_descriptor.c b/libcli/security/create_descriptor.c index aeb3ea3d3bb..ab304a59a1c 100644 --- a/libcli/security/create_descriptor.c +++ b/libcli/security/create_descriptor.c @@ -215,6 +215,11 @@ static struct security_acl *calculate_inherited_from_parent(TALLOC_CTX *mem_ctx, } break; + + default: + DBG_WARNING("ACE type %d is not handled\n", ace->type); + TALLOC_FREE(tmp_acl); + return NULL; } if (ace->flags & SEC_ACE_FLAG_NO_PROPAGATE_INHERIT) { @@ -327,6 +332,9 @@ static struct security_acl *calculate_inherited_from_parent(TALLOC_CTX *mem_ctx, case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT: tmp_ace->type = SEC_ACE_TYPE_SYSTEM_AUDIT; break; + default: + /* all the _CALLBACK types */ + break; } }