diff options
author | Erick Nascimento <erick.nogueira.nascimento@gmail.com> | 2009-11-11 18:25:13 -0200 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-11-14 12:11:02 +1100 |
commit | a3632f22ec228f4e74e819305bb4c1c5aeca293c (patch) | |
tree | 4966485d6843e3207af91f2403004dc48a3bf883 /source4/dsdb | |
parent | 5377d5f8946cd7fe3aa17f827eb46a9efa413ade (diff) | |
download | samba-a3632f22ec228f4e74e819305bb4c1c5aeca293c.tar.gz samba-a3632f22ec228f4e74e819305bb4c1c5aeca293c.tar.bz2 samba-a3632f22ec228f4e74e819305bb4c1c5aeca293c.zip |
s4-drs: DsExecuteKCC() implementation
I implemented the DsExecuteKCC() handling code on kccsrv_execute_kcc().
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/kcc/kcc_periodic.c | 2 | ||||
-rw-r--r-- | source4/dsdb/kcc/kcc_service.c | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/source4/dsdb/kcc/kcc_periodic.c b/source4/dsdb/kcc/kcc_periodic.c index 30d43033cb..097fff41ec 100644 --- a/source4/dsdb/kcc/kcc_periodic.c +++ b/source4/dsdb/kcc/kcc_periodic.c @@ -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; diff --git a/source4/dsdb/kcc/kcc_service.c b/source4/dsdb/kcc/kcc_service.c index b088d2ed89..4196eb840c 100644 --- a/source4/dsdb/kcc/kcc_service.c +++ b/source4/dsdb/kcc/kcc_service.c @@ -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); } /* |