92de96915d309ad064bb0d79aa27adeb38ac92cd
[ira/wip.git] / source / dsdb / samdb / ldb_modules / dsdb_cache.c
1 /* 
2    Unix SMB/CIFS mplementation.
3
4    The Module that loads some DSDB related things
5    into memory. E.g. it loads the dsdb_schema struture
6    
7    Copyright (C) Stefan Metzmacher 2007
8     
9    This program is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 2 of the License, or
12    (at your option) any later version.
13    
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18    
19    You should have received a copy of the GNU General Public License
20    along with this program; if not, write to the Free Software
21    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22    
23 */
24
25 #include "includes.h"
26 #include "lib/ldb/include/ldb.h"
27 #include "lib/ldb/include/ldb_errors.h"
28 #include "lib/ldb/include/ldb_private.h"
29 #include "dsdb/samdb/samdb.h"
30 #include "librpc/gen_ndr/ndr_misc.h"
31 #include "librpc/gen_ndr/ndr_drsuapi.h"
32 #include "librpc/gen_ndr/ndr_drsblobs.h"
33
34 static int dsdb_cache_init(struct ldb_module *module)
35 {
36         /* TODO: load the schema */
37         return ldb_next_init(module);
38 }
39
40 static const struct ldb_module_ops dsdb_cache_ops = {
41         .name           = "dsdb_cache",
42         .init_context   = dsdb_cache_init
43 };
44
45 int dsdb_cache_module_init(void)
46 {
47         return ldb_register_module(&dsdb_cache_ops);
48 }