diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/repl/drepl_service.c | 20 | ||||
-rw-r--r-- | source4/librpc/idl/irpc.idl | 11 |
2 files changed, 31 insertions, 0 deletions
diff --git a/source4/dsdb/repl/drepl_service.c b/source4/dsdb/repl/drepl_service.c index 652c16fda4..d118c45b6c 100644 --- a/source4/dsdb/repl/drepl_service.c +++ b/source4/dsdb/repl/drepl_service.c @@ -31,6 +31,7 @@ #include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_drsuapi.h" #include "librpc/gen_ndr/ndr_drsblobs.h" +#include "librpc/gen_ndr/ndr_irpc.h" #include "param/param.h" static WERROR dreplsrv_init_creds(struct dreplsrv_service *service) @@ -127,6 +128,24 @@ static NTSTATUS drepl_replica_sync(struct irpc_message *msg, return NT_STATUS_OK; } +/** + * Called when drplsrv should refresh its state. + * For example, when KCC change topology, dreplsrv + * should update its cache + * + * @param partition_dn If not empty/NULL, partition to update + */ +static NTSTATUS dreplsrv_refresh(struct irpc_message *msg, + struct dreplsrv_refresh *r) +{ + struct dreplsrv_service *s = talloc_get_type(msg->private_data, + struct dreplsrv_service); + + r->out.werr = dreplsrv_refresh_partitions(s); + + return NT_STATUS_OK; +} + /* startup the dsdb replicator service task */ @@ -214,6 +233,7 @@ static void dreplsrv_task_init(struct task_server *task) irpc_add_name(task->msg_ctx, "dreplsrv"); + IRPC_REGISTER(task->msg_ctx, irpc, DREPLSRV_REFRESH, dreplsrv_refresh, service); IRPC_REGISTER(task->msg_ctx, drsuapi, DRSUAPI_DSREPLICASYNC, drepl_replica_sync, service); messaging_register(task->msg_ctx, service, MSG_DREPL_ALLOCATE_RID, dreplsrv_allocate_rid); } diff --git a/source4/librpc/idl/irpc.idl b/source4/librpc/idl/irpc.idl index 03a931661e..220cecfb89 100644 --- a/source4/librpc/idl/irpc.idl +++ b/source4/librpc/idl/irpc.idl @@ -148,4 +148,15 @@ import "misc.idl", "security.idl", "nbt.idl"; [in] astring reason ); + /****************************************************** + management calls for the drepl server + ******************************************************/ + /** + * Force dreplsrv to fefresh internal cache. + * @param partition_dn Partition to refresh cacheh for. + * If empy/NULL, refresh all partitions. + */ + void dreplsrv_refresh( + [out] WERROR werr + ); } |