This patch fits the calling to the new samdb_rodc() function and
fix a little bug in this function.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
struct ldb_result *res;
TALLOC_CTX *tmp_ctx = talloc_new(sam_ctx);
- config_dn = samdb_config_dn(sam_ctx);
+ config_dn = ldb_get_config_basedn(sam_ctx);
if (!config_dn) {
talloc_free(tmp_ctx);
return LDB_ERR_OPERATIONS_ERROR;
DATA_BLOB ft_blob;
enum ndr_err_code ndr_err;
NTSTATUS nt_status;
+ bool am_rodc;
int ret;
DCESRV_PULL_HANDLE(h, r->in.handle, LSA_HANDLE_POLICY);
return NT_STATUS_INVALID_DOMAIN_ROLE;
}
- if (samdb_rodc(p_state->sam_ldb)) {
+ ret = samdb_rodc(p_state->sam_ldb, &am_rodc);
+ if (ret == LDB_SUCCESS && am_rodc) {
return NT_STATUS_NO_SUCH_DOMAIN;
}