s3-passdb: Fix typo in comment.
[Samba.git] / source3 / registry / reg_init_basic.c
blob097be39b33e9aa9fe95a811f93f62dc984cfb69a
1 /*
2 * Unix SMB/CIFS implementation.
3 * Registry helper routines
4 * Copyright (C) Michael Adam 2008
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 3 of the License, or (at your option)
9 * any later version.
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
16 * You should have received a copy of the GNU General Public License along with
17 * this program; if not, see <http://www.gnu.org/licenses/>.
20 #include "includes.h"
21 #include "registry.h"
22 #include "reg_cachehook.h"
23 #include "reg_backend_db.h"
25 #undef DBGC_CLASS
26 #define DBGC_CLASS DBGC_REGISTRY
28 WERROR registry_init_common(void)
30 WERROR werr;
32 werr = regdb_init();
33 if (!W_ERROR_IS_OK(werr)) {
34 DEBUG(0, ("Failed to initialize the registry: %s\n",
35 win_errstr(werr)));
36 goto done;
39 werr = reghook_cache_init();
40 if (!W_ERROR_IS_OK(werr)) {
41 DEBUG(0, ("Failed to initialize the reghook cache: %s\n",
42 win_errstr(werr)));
43 goto done;
46 /* setup the necessary keys and values */
48 werr = init_registry_data();
49 if (!W_ERROR_IS_OK(werr)) {
50 DEBUG(0, ("Failed to initialize data in registry!\n"));
53 done:
54 return werr;
57 WERROR registry_init_basic(void)
59 WERROR werr;
61 DEBUG(10, ("registry_init_basic called\n"));
63 werr = registry_init_common();
64 regdb_close();
65 return werr;