mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
s4-drs: DsExecuteKCC() implementation
I implemented the DsExecuteKCC() handling code on kccsrv_execute_kcc(). Signed-off-by: Andrew Tridgell <tridge@samba.org>
This commit is contained in:
parent
5377d5f894
commit
a3632f22ec
@ -115,7 +115,7 @@ static NTSTATUS kccsrv_add_repsFrom(struct kccsrv_service *s, TALLOC_CTX *mem_ct
|
||||
We just add a repsFrom entry for all DCs we find that have nTDSDSA
|
||||
objects, except for ourselves
|
||||
*/
|
||||
static NTSTATUS kccsrv_simple_update(struct kccsrv_service *s, TALLOC_CTX *mem_ctx)
|
||||
NTSTATUS kccsrv_simple_update(struct kccsrv_service *s, TALLOC_CTX *mem_ctx)
|
||||
{
|
||||
struct ldb_result *res;
|
||||
int ret, i;
|
||||
|
@ -136,6 +136,25 @@ static WERROR kccsrv_load_partitions(struct kccsrv_service *s)
|
||||
return WERR_OK;
|
||||
}
|
||||
|
||||
static NTSTATUS kccsrv_execute_kcc(struct irpc_message *msg,
|
||||
struct drsuapi_DsExecuteKCC *r)
|
||||
{
|
||||
TALLOC_CTX *mem_ctx;
|
||||
NTSTATUS status;
|
||||
struct kccsrv_service *service = talloc_get_type(msg->private_data, struct kccsrv_service);
|
||||
|
||||
mem_ctx = talloc_new(service);
|
||||
status = kccsrv_simple_update(service, mem_ctx);
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(0,("kccsrv_simple_update failed - %s\n", nt_errstr(status)));
|
||||
talloc_free(mem_ctx);
|
||||
return status;
|
||||
}
|
||||
|
||||
talloc_free(mem_ctx);
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
startup the kcc service task
|
||||
@ -208,6 +227,7 @@ static void kccsrv_task_init(struct task_server *task)
|
||||
}
|
||||
|
||||
irpc_add_name(task->msg_ctx, "kccsrv");
|
||||
IRPC_REGISTER(task->msg_ctx, drsuapi, DRSUAPI_DSEXECUTEKCC, kccsrv_execute_kcc, service);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -796,7 +796,16 @@ static WERROR dcesrv_drsuapi_DsGetDomainControllerInfo(struct dcesrv_call_state
|
||||
static WERROR dcesrv_drsuapi_DsExecuteKCC(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
|
||||
struct drsuapi_DsExecuteKCC *r)
|
||||
{
|
||||
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
|
||||
WERROR status;
|
||||
status = drs_security_level_check(dce_call, "DsExecuteKCC");
|
||||
|
||||
if (!W_ERROR_IS_OK(status)) {
|
||||
return status;
|
||||
}
|
||||
|
||||
dcesrv_irpc_forward_rpc_call(dce_call, mem_ctx, r, NDR_DRSUAPI_DSEXECUTEKCC,
|
||||
&ndr_table_drsuapi, "kccsrv", "DsExecuteKCC");
|
||||
return WERR_OK;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user