diff options
author | Michael Adam <obnox@samba.org> | 2008-04-07 22:33:01 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-04-10 01:28:56 +0200 |
commit | 3d38f143df70d9e55d7112bf3b70b6c029d9397d (patch) | |
tree | 978f7e0d57e688b9be0950708e94187775c49c42 /source3/lib/smbconf | |
parent | 0acf338503eb22640be3e02f66ce9543b775fe15 (diff) | |
download | samba-3d38f143df70d9e55d7112bf3b70b6c029d9397d.tar.gz samba-3d38f143df70d9e55d7112bf3b70b6c029d9397d.tar.bz2 samba-3d38f143df70d9e55d7112bf3b70b6c029d9397d.zip |
libsmbconf: add a "verbatim" parameter to smbconf_init_txt_simple().
Michael
(This used to be commit b9e72b402de412c23702715ead96c20e9b3248cc)
Diffstat (limited to 'source3/lib/smbconf')
-rw-r--r-- | source3/lib/smbconf/smbconf.h | 3 | ||||
-rw-r--r-- | source3/lib/smbconf/smbconf_txt_simple.c | 14 |
2 files changed, 14 insertions, 3 deletions
diff --git a/source3/lib/smbconf/smbconf.h b/source3/lib/smbconf/smbconf.h index 72729b9df8..15c2a3b7c9 100644 --- a/source3/lib/smbconf/smbconf.h +++ b/source3/lib/smbconf/smbconf.h @@ -40,7 +40,8 @@ WERROR smbconf_init_reg(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, WERROR smbconf_init_txt_simple(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, - const char *path); + const char *path + bool verbatim); /* * the smbconf API functions diff --git a/source3/lib/smbconf/smbconf_txt_simple.c b/source3/lib/smbconf/smbconf_txt_simple.c index 8c831f9f81..9a3bc784eb 100644 --- a/source3/lib/smbconf/smbconf_txt_simple.c +++ b/source3/lib/smbconf/smbconf_txt_simple.c @@ -40,6 +40,7 @@ struct txt_cache { struct txt_private_data { struct txt_cache *cache; uint64_t csn; + bool verbatim; }; /********************************************************************** @@ -514,7 +515,16 @@ static struct smbconf_ops smbconf_ops_txt = { */ WERROR smbconf_init_txt_simple(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, - const char *path) + const char *path, + bool verbatim) { - return smbconf_init(mem_ctx, conf_ctx, path, &smbconf_ops_txt); + WERROR werr; + + werr = smbconf_init(mem_ctx, conf_ctx, path, &smbconf_ops_txt); + if (!W_ERROR_IS_OK(werr)) { + return werr; + } + + pd(*conf_ctx)->verbatim = verbatim; + return WERR_OK; } |