]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli/security: create_descriptor handles unknown ACE types
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 21 Jul 2023 02:36:20 +0000 (14:36 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 7 Sep 2023 04:53:41 +0000 (04:53 +0000)
Because we're going to add more ACE types.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/security/create_descriptor.c

index aeb3ea3d3bb518ae383dd8bfa0a91c2dd26678c9..ab304a59a1cce2777533f182ee8a900aa97f4a84 100644 (file)
@@ -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;
                                }
                        }