dsdb/util_trusts: domain_dn is an input parameter of dsdb_trust_crossref_tdo_info()
authorStefan Metzmacher <metze@samba.org>
Thu, 1 Feb 2018 22:08:08 +0000 (23:08 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 4 Sep 2018 00:31:26 +0000 (02:31 +0200)
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 <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/common/util_trusts.c

index 7dcbea2ce6d65e9848924e7c22f9a0d74a72533a..154dd947212a959687d425f36e1f6bd278754e47 100644 (file)
@@ -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);