1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
samba-mirror/source4/rpc_server/dnsserver
Douglas Bagnall 8f0490150b s4:rpcsrv:dnsserver: make dns_name_compare transitive with NULLs
Returning 0 on `(name1 == NULL || name2 == NULL)` made NULL equal to
everything, which confuses a sort (consider {A, B, NULL} where A > B,
but A == NULL == B).

The only caller is dnsserver_enumerate_records() which fails if it
finds a NULL in the sorted list. We make the happen more quickly by
sorting NULLs to the front.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15625

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 7be535315a)
2024-06-10 13:24:16 +00:00
..
dcerpc_dnsserver.c s4:rpc_server: Add missing newlines to debugging messages 2023-08-08 04:39:37 +00:00
dnsdata.c s4:rpcsrv:dnsserver: make dns_name_compare transitive with NULLs 2024-06-10 13:24:16 +00:00
dnsdb.c rpc dnsserver: improve handling of serial numbers 2021-06-29 02:19:35 +00:00
dnsserver.h CVE-2019-14861: s4-rpc/dnsserver: Avoid crash in ldb_qsort() via dcesrv_DnssrvEnumRecords) 2019-12-10 09:18:46 +00:00
dnsutils.c s4:dnsserver: Rename dns_name_equal() to samba_dns_name_equal() 2023-01-19 10:20:27 +00:00