s3-dssync-passdb: fill in passdb_finish.
[ira/wip.git] / source3 / libnet / libnet_dssync_passdb.c
1 /*
2    Unix SMB/CIFS implementation.
3
4    Copyright (C) Guenther Deschner <gd@samba.org> 2008
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 3 of the License, or
9    (at your option) any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include "includes.h"
21 #include "libnet/libnet_dssync.h"
22
23 /****************************************************************
24 ****************************************************************/
25
26 static NTSTATUS passdb_startup(struct dssync_context *ctx, TALLOC_CTX *mem_ctx,
27                                struct replUpToDateVectorBlob **pold_utdv)
28 {
29         NTSTATUS status;
30         struct pdb_methods *methods = NULL;
31
32         if (ctx->output_filename) {
33                 status = make_pdb_method_name(&methods, ctx->output_filename);
34         } else {
35                 status = make_pdb_method_name(&methods, lp_passdb_backend());
36         }
37
38         if (!NT_STATUS_IS_OK(status)) {
39                 return status;
40         }
41
42         ctx->private_data = methods;
43
44         return status;
45 }
46
47 /****************************************************************
48 ****************************************************************/
49
50 static NTSTATUS passdb_finish(struct dssync_context *ctx, TALLOC_CTX *mem_ctx,
51                               struct replUpToDateVectorBlob *new_utdv)
52 {
53         struct pdb_methods *methods =
54                 (struct pdb_methods *)ctx->private_data;
55
56         TALLOC_FREE(methods);
57
58         return NT_STATUS_OK;
59 }
60
61 /****************************************************************
62 ****************************************************************/
63
64 static NTSTATUS passdb_process_objects(struct dssync_context *ctx,
65                                        TALLOC_CTX *mem_ctx,
66                                        struct drsuapi_DsReplicaObjectListItemEx *cur,
67                                        struct drsuapi_DsReplicaOIDMapping_Ctr *mapping_ctr)
68 {
69         return NT_STATUS_NOT_SUPPORTED;
70 }
71
72 /****************************************************************
73 ****************************************************************/
74
75 const struct dssync_ops libnet_dssync_passdb_ops = {
76         .startup                = passdb_startup,
77         .process_objects        = passdb_process_objects,
78         .finish                 = passdb_finish,
79 };