mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
libsmbconf: add a "verbatim" parameter to smbconf_init_txt_simple().
Michael
(This used to be commit b9e72b402d
)
This commit is contained in:
parent
0acf338503
commit
3d38f143df
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ static int net_conf_import(struct smbconf_ctx *conf_ctx,
|
||||
DEBUG(3,("net_conf_import: reading configuration from file %s.\n",
|
||||
filename));
|
||||
|
||||
werr = smbconf_init_txt_simple(mem_ctx, &txt_ctx, filename);
|
||||
werr = smbconf_init_txt_simple(mem_ctx, &txt_ctx, filename, true);
|
||||
if (!W_ERROR_IS_OK(werr)) {
|
||||
goto done;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user