summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorFernando J V da Silva <fernandojvsilva@yahoo.com.br>2010-04-15 18:54:13 -0300
committerAndrew Tridgell <tridge@samba.org>2010-04-22 19:36:15 +1000
commit73513fb7e7145e9abe1a155acd47c27bc09c5092 (patch)
tree1ad5b14dce08c723fd0708c3be8cea3e8ce6a78f /source4/rpc_server
parentd940a44496f184073fe036fc1977796c901ec96d (diff)
downloadsamba-73513fb7e7145e9abe1a155acd47c27bc09c5092.tar.gz
samba-73513fb7e7145e9abe1a155acd47c27bc09c5092.tar.bz2
samba-73513fb7e7145e9abe1a155acd47c27bc09c5092.zip
s4-drs: Use new samdb_rodc() function in s4 code
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>
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/lsa/dcesrv_lsa.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c
index e683348140..aaa0f7baa2 100644
--- a/source4/rpc_server/lsa/dcesrv_lsa.c
+++ b/source4/rpc_server/lsa/dcesrv_lsa.c
@@ -4258,6 +4258,7 @@ static NTSTATUS dcesrv_lsa_lsaRSetForestTrustInformation(struct dcesrv_call_stat
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);
@@ -4273,7 +4274,8 @@ static NTSTATUS dcesrv_lsa_lsaRSetForestTrustInformation(struct dcesrv_call_stat
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;
}