The branch, master has been updated
via 821cf798d87 Fix crash in DLZ plugin for incorrect setup
from 9dc89798ebf s4:kdc/db-glue: Use realloc_p macro
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 821cf798d87162b1f3b5d7388891d15fea0a969a
Author: Alexander Bokovoy <[email protected]>
Date: Fri Sep 19 16:23:41 2025 +0300
Fix crash in DLZ plugin for incorrect setup
When bind is not yet setup properly, logging errors should be done
through the temporary handle.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15920
Signed-off-by: Alexander Bokovoy <[email protected]>
Reviewed-by: Douglas Bagnall <[email protected]>
Autobuild-User(master): Douglas Bagnall <[email protected]>
Autobuild-Date(master): Sat Sep 20 06:49:37 UTC 2025 on atb-devel-224
-----------------------------------------------------------------------
Summary of changes:
source4/dns_server/dlz_bind9.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/dns_server/dlz_bind9.c b/source4/dns_server/dlz_bind9.c
index e5c9679835e..2a2430caba2 100644
--- a/source4/dns_server/dlz_bind9.c
+++ b/source4/dns_server/dlz_bind9.c
@@ -671,6 +671,9 @@ _PUBLIC_ isc_result_t dlz_create(const char *dlzname,
}
va_end(ap);
+ /* starting from here, we can only use state->log() until
+ * dlz_bind9_state is assigned */
+
/* Do not install samba signal handlers */
fault_setup_disable();
@@ -727,11 +730,11 @@ _PUBLIC_ isc_result_t dlz_create(const char *dlzname,
}
if (!file_exist(state->options.url)) {
- dlz_bind9_state->log(ISC_LOG_ERROR,
- "samba_dlz: dlz_create could not
find '%s'; "
- "trying old location
'%s/dns/sam.ldb' instead",
- state->options.url,
- lpcfg_private_dir(state->lp));
+ state->log(ISC_LOG_ERROR,
+ "samba_dlz: dlz_create could not find '%s'; "
+ "trying old location '%s/dns/sam.ldb'
instead",
+ state->options.url,
+ lpcfg_private_dir(state->lp));
state->options.url = talloc_asprintf(state,
"%s/dns/sam.ldb",
lpcfg_private_dir(state->lp));
--
Samba Shared Repository