From: Stefan Metzmacher Date: Thu, 1 Feb 2018 22:08:08 +0000 (+0100) Subject: dsdb/util_trusts: domain_dn is an input parameter of dsdb_trust_crossref_tdo_info() X-Git-Tag: samba-4.8.6~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96ae85bcc1ec0e8523f475a8060522ff120bad37;p=thirdparty%2Fsamba.git dsdb/util_trusts: domain_dn is an input parameter of dsdb_trust_crossref_tdo_info() We should not overwrite it within the function. Currently it doesn't matter as we don't have multiple domains within our forest, but that will change in future. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11517 Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett (cherry picked from commit f5f96f558b499770cdeb3d38998167a387e058b9) --- diff --git a/source4/dsdb/common/util_trusts.c b/source4/dsdb/common/util_trusts.c index 7dcbea2ce6d..154dd947212 100644 --- a/source4/dsdb/common/util_trusts.c +++ b/source4/dsdb/common/util_trusts.c @@ -482,12 +482,6 @@ static NTSTATUS dsdb_trust_crossref_tdo_info(TALLOC_CTX *mem_ctx, *_trust_parent_tdo = NULL; } - domain_dn = ldb_get_default_basedn(sam_ctx); - if (domain_dn == NULL) { - TALLOC_FREE(frame); - return NT_STATUS_INTERNAL_ERROR; - } - partitions_dn = samdb_partitions_dn(sam_ctx, frame); if (partitions_dn == NULL) { TALLOC_FREE(frame);