diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-09-16 13:02:23 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-09-16 16:08:46 +1000 |
commit | e5cd023a41ce4b8a51bbace4da395a7f0843d212 (patch) | |
tree | 6089c2c548f2197317b1d56ff02adf220425e317 /source4/rpc_server/drsuapi | |
parent | 4cf53c6d0b8b418adf39b6dd81d44c7b6d587e0c (diff) | |
download | samba-e5cd023a41ce4b8a51bbace4da395a7f0843d212.tar.gz samba-e5cd023a41ce4b8a51bbace4da395a7f0843d212.tar.bz2 samba-e5cd023a41ce4b8a51bbace4da395a7f0843d212.zip |
s4-drs: initial skeleton for DrsReplica{Add,Del,Mod} calls
Diffstat (limited to 'source4/rpc_server/drsuapi')
-rw-r--r-- | source4/rpc_server/drsuapi/dcesrv_drsuapi.c | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c index 9d388b2fbb..16c19cdd3e 100644 --- a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c +++ b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c @@ -304,7 +304,20 @@ static WERROR dcesrv_drsuapi_DsReplicaSync(struct dcesrv_call_state *dce_call, T static WERROR dcesrv_drsuapi_DsReplicaAdd(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct drsuapi_DsReplicaAdd *r) { - DRSUAPI_UNSUPPORTED(drsuapi_DsReplicaAdd); + WERROR status; + + status = drs_security_level_check(dce_call, "DsReplicaAdd", SECURITY_DOMAIN_CONTROLLER, NULL); + if (!W_ERROR_IS_OK(status)) { + return status; + } + + dcesrv_irpc_forward_rpc_call(dce_call, mem_ctx, + r, NDR_DRSUAPI_DSREPLICAADD, + &ndr_table_drsuapi, + "dreplsrv", "DsReplicaAdd", + IRPC_CALL_TIMEOUT); + + return WERR_OK; } @@ -314,7 +327,20 @@ static WERROR dcesrv_drsuapi_DsReplicaAdd(struct dcesrv_call_state *dce_call, TA static WERROR dcesrv_drsuapi_DsReplicaDel(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct drsuapi_DsReplicaDel *r) { - DRSUAPI_UNSUPPORTED(drsuapi_DsReplicaDel); + WERROR status; + + status = drs_security_level_check(dce_call, "DsReplicaDel", SECURITY_DOMAIN_CONTROLLER, NULL); + if (!W_ERROR_IS_OK(status)) { + return status; + } + + dcesrv_irpc_forward_rpc_call(dce_call, mem_ctx, + r, NDR_DRSUAPI_DSREPLICADEL, + &ndr_table_drsuapi, + "dreplsrv", "DsReplicaDel", + IRPC_CALL_TIMEOUT); + + return WERR_OK; } @@ -324,7 +350,20 @@ static WERROR dcesrv_drsuapi_DsReplicaDel(struct dcesrv_call_state *dce_call, TA static WERROR dcesrv_drsuapi_DsReplicaMod(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct drsuapi_DsReplicaMod *r) { - DRSUAPI_UNSUPPORTED(drsuapi_DsReplicaMod); + WERROR status; + + status = drs_security_level_check(dce_call, "DsReplicaMod", SECURITY_DOMAIN_CONTROLLER, NULL); + if (!W_ERROR_IS_OK(status)) { + return status; + } + + dcesrv_irpc_forward_rpc_call(dce_call, mem_ctx, + r, NDR_DRSUAPI_DSREPLICAMOD, + &ndr_table_drsuapi, + "dreplsrv", "DsReplicaMod", + IRPC_CALL_TIMEOUT); + + return WERR_OK; } |