]> git.ipfire.org Git - thirdparty/samba.git/commit
ndr: short-circuit ace coda if no bytes left
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Sun, 31 Dec 2023 00:06:40 +0000 (13:06 +1300)
committerJule Anger <janger@samba.org>
Mon, 12 Feb 2024 10:53:13 +0000 (10:53 +0000)
commitc9974e622bf0a62d65376d4bae417924f7ec8e03
tree4811a774b726888fce94b669ca16493af9f24958
parent8787185a6caef33f3053ae29587ea88d06d30be1
ndr: short-circuit ace coda if no bytes left

The overwhelmingly common case is that there are no bytes left, and
regardless of the ACE type we want to store an empty blob.

We know the blob will be empty if there are no bytes, so we don't need
to allocate a sub-ndr and tokens list and so forth.

This can save almost half the time of a security descriptor pull.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15574
(cherry picked from commit ac0c8ee01ea624e9c486251da2132710c2a43ddc)
librpc/ndr/ndr_sec_helper.c