diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-09-15 20:51:10 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-09-15 20:51:10 -0700 |
commit | 30d13288e5bb506584a0bf012d7b2e579a6a2074 (patch) | |
tree | 8216e60486afe8d783712093546955bb8fa88afa /source4/rpc_server | |
parent | f80363c90a60a4496309a50d760ca05ac4b59e4f (diff) | |
download | samba-30d13288e5bb506584a0bf012d7b2e579a6a2074.tar.gz samba-30d13288e5bb506584a0bf012d7b2e579a6a2074.tar.bz2 samba-30d13288e5bb506584a0bf012d7b2e579a6a2074.zip |
s4-repl: take advantage of async RPC forwarding
This uses async RPC forwarding for the DsReplicaSync call
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/drsuapi/dcesrv_drsuapi.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c index c01711d2d9..491b962a85 100644 --- a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c +++ b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c @@ -28,7 +28,6 @@ #include "lib/ldb/include/ldb_errors.h" #include "param/param.h" #include "librpc/gen_ndr/ndr_drsblobs.h" -#include "messaging/irpc.h" #include "rpc_server/drsuapi/dcesrv_drsuapi.h" #include "libcli/security/security.h" @@ -232,35 +231,19 @@ static WERROR dcesrv_drsuapi_DsUnbind(struct dcesrv_call_state *dce_call, TALLOC static WERROR dcesrv_drsuapi_DsReplicaSync(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct drsuapi_DsReplicaSync *r) { - struct server_id *repld; - struct irpc_request *ireq; - if (security_session_user_level(dce_call->conn->auth_state.session_info) < SECURITY_DOMAIN_CONTROLLER) { DEBUG(0,("DsReplicaSync refused for security token\n")); return WERR_DS_DRA_ACCESS_DENIED; } - repld = irpc_servers_byname(dce_call->msg_ctx, mem_ctx, "dreplsrv"); - if (repld == NULL || repld[0].id == 0) { - DEBUG(0,("DsReplicaSync: Unable to find dreplsrv task\n")); - return WERR_DS_DRA_INTERNAL_ERROR; - } - - ireq = IRPC_CALL_SEND(dce_call->msg_ctx, repld[0], - drsuapi, DRSUAPI_DSREPLICASYNC, - r, mem_ctx); - if (ireq == NULL) { - DEBUG(0,("DsReplicaSync: Failed to forward request to dreplsrv task\n")); - return WERR_DS_DRA_INTERNAL_ERROR; - } - - /* we are not interested in a reply */ - talloc_free(ireq); - + dcesrv_irpc_forward_rpc_call(dce_call, mem_ctx, r, NDR_DRSUAPI_DSREPLICASYNC, + &ndr_table_drsuapi, + "dreplsrv", "DsReplicaSync"); return WERR_OK; } + /* drsuapi_DsReplicaAdd */ |