return WERR_INVALID_FLAGS;
}
- system_dn = ldb_dn_copy(mem_ctx, ldb_get_default_basedn(sam_ctx));
+ system_dn = samdb_system_container_dn(sam_ctx, mem_ctx);
if (system_dn == NULL) {
return WERR_NOT_ENOUGH_MEMORY;
}
- if (!ldb_dn_add_child_fmt(system_dn, "CN=System")) {
- return WERR_NOT_ENOUGH_MEMORY;
- }
-
ret = gendb_search(sam_ctx, mem_ctx, system_dn,
&dom_res, trust_attrs,
"(objectclass=trustedDomain)");