summaryrefslogtreecommitdiff
path: root/source3/lib/smbconf
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-03-21 02:20:16 +0100
committerMichael Adam <obnox@samba.org>2008-03-21 02:25:56 +0100
commitfececde1815bf0469bb56e07cf23f54011c9b4ae (patch)
treee8ef7c441bf3b8f9268876b33a791e9c87e9012d /source3/lib/smbconf
parent6c20e83294f1b288142a2621a393d7c501532d69 (diff)
downloadsamba-fececde1815bf0469bb56e07cf23f54011c9b4ae.tar.gz
samba-fececde1815bf0469bb56e07cf23f54011c9b4ae.tar.bz2
samba-fececde1815bf0469bb56e07cf23f54011c9b4ae.zip
libsmbconf: add backend specific init function.
Hide generic init function taking smbconf_ops argument from public api. Michael (This used to be commit b3f6920ccb9a27fde26e889a7f1f3afaf56b784f)
Diffstat (limited to 'source3/lib/smbconf')
-rw-r--r--source3/lib/smbconf/smbconf.c10
-rw-r--r--source3/lib/smbconf/smbconf.h2
-rw-r--r--source3/lib/smbconf/smbconf_private.h3
3 files changed, 12 insertions, 3 deletions
diff --git a/source3/lib/smbconf/smbconf.c b/source3/lib/smbconf/smbconf.c
index 82683caa69..ceed349a09 100644
--- a/source3/lib/smbconf/smbconf.c
+++ b/source3/lib/smbconf/smbconf.c
@@ -781,6 +781,11 @@ struct smbconf_ops smbconf_ops_reg = {
.delete_parameter = smbconf_reg_delete_parameter
};
+WERROR smbconf_init_reg(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx)
+{
+ return smbconf_init(mem_ctx, conf_ctx, &smbconf_ops_reg);
+}
+
/**********************************************************************
*
@@ -801,7 +806,8 @@ struct smbconf_ops smbconf_ops_reg = {
* After the work with the configuration is completed, smbconf_shutdown()
* should be called.
*/
-WERROR smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx)
+WERROR smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx,
+ struct smbconf_ops *ops)
{
WERROR werr = WERR_OK;
struct smbconf_ctx *ctx;
@@ -815,7 +821,7 @@ WERROR smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx)
return WERR_NOMEM;
}
- ctx->ops = &smbconf_ops_reg;
+ ctx->ops = ops;
werr = ctx->ops->init(ctx);
if (!W_ERROR_IS_OK(werr)) {
diff --git a/source3/lib/smbconf/smbconf.h b/source3/lib/smbconf/smbconf.h
index 33fa82e898..207d5797bd 100644
--- a/source3/lib/smbconf/smbconf.h
+++ b/source3/lib/smbconf/smbconf.h
@@ -33,7 +33,7 @@ struct smbconf_csn {
* (Backends and possibly remote support being added ...)
*/
-WERROR smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx);
+WERROR smbconf_init_reg(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx);
void smbconf_shutdown(struct smbconf_ctx *ctx);
bool smbconf_changed(struct smbconf_ctx *ctx, struct smbconf_csn *csn,
const char *service, const char *param);
diff --git a/source3/lib/smbconf/smbconf_private.h b/source3/lib/smbconf/smbconf_private.h
index b64da6ca73..72f13c7402 100644
--- a/source3/lib/smbconf/smbconf_private.h
+++ b/source3/lib/smbconf/smbconf_private.h
@@ -58,4 +58,7 @@ struct smbconf_ctx {
struct smbconf_ops *ops;
};
+WERROR smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx,
+ struct smbconf_ops *ops);
+
#endif