mirror of
https://github.com/samba-team/samba.git
synced 2025-10-25 19:33:18 +03:00
r17824: add a wrapper for the common partitions_basedn calculation
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
a5ea749f0a
commit
09007b0907
@@ -62,7 +62,7 @@ static NTSTATUS cldapd_netlogon_fill(struct cldapd_server *cldapd,
|
||||
const char *site_name;
|
||||
const char *site_name2;
|
||||
const char *pdc_ip;
|
||||
const struct ldb_dn *partitions_basedn = ldb_dn_string_compose(mem_ctx, samdb_base_dn(mem_ctx), "CN=Partitions,CN=Configuration");
|
||||
const struct ldb_dn *partitions_basedn;
|
||||
|
||||
if (cldapd->samctx == NULL) {
|
||||
cldapd->samctx = samdb_connect(cldapd, anonymous_session(cldapd));
|
||||
@@ -72,6 +72,8 @@ static NTSTATUS cldapd_netlogon_fill(struct cldapd_server *cldapd,
|
||||
}
|
||||
}
|
||||
|
||||
partitions_basedn = samdb_partitions_dn(cldapd->samctx, mem_ctx);
|
||||
|
||||
/* the domain has an optional trailing . */
|
||||
if (domain && domain[strlen(domain)-1] == '.') {
|
||||
domain = talloc_strndup(mem_ctx, domain, strlen(domain)-1);
|
||||
|
||||
Reference in New Issue
Block a user