diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-08-24 15:40:42 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-08-25 08:40:04 +1000 |
commit | 631c5f1fd5e77a6d380df3bc83dc166d902315af (patch) | |
tree | 38793a716bdd94c47eb62905e581dbd7a9532473 /source4 | |
parent | e5a5ca028e645d2852a2a063730d4f51a3ee84b1 (diff) | |
download | samba-631c5f1fd5e77a6d380df3bc83dc166d902315af.tar.gz |
s4-libnet: added libnet_vampire_replicate_init()
this is used to setup for later calls to the replicate chunk functions
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libnet/libnet_vampire.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c index 1847890f2f3..955aa32318a 100644 --- a/source4/libnet/libnet_vampire.c +++ b/source4/libnet/libnet_vampire.c @@ -92,6 +92,23 @@ struct libnet_vampire_cb_state { const char *server_dn_str; }; +/* initialise a state structure ready for replication of chunks */ +void *libnet_vampire_replicate_init(TALLOC_CTX *mem_ctx, + struct ldb_context *samdb, + struct loadparm_context *lp_ctx) +{ + struct libnet_vampire_cb_state *s = talloc_zero(mem_ctx, struct libnet_vampire_cb_state); + if (!s) { + return NULL; + } + + s->ldb = samdb; + s->lp_ctx = lp_ctx; + s->provision_schema = dsdb_get_schema(s->ldb, s); + + return s; +} + /* Caller is expected to keep supplied pointers around for the lifetime of the structure */ void *libnet_vampire_cb_state_init(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, struct tevent_context *event_ctx, |