diff options
author | Michael Adam <obnox@samba.org> | 2008-04-09 00:47:27 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-04-10 01:29:00 +0200 |
commit | 7bf407c7116ee0e6d61c0dbc38f48ccf5da850c2 (patch) | |
tree | ccb9287cb9a05ff1268d0a9fbdd0e525a0ea167e /source3/lib/smbconf | |
parent | bb39d5c14b86dc704c1d2845a3a22580a3915dbd (diff) | |
download | samba-7bf407c7116ee0e6d61c0dbc38f48ccf5da850c2.tar.gz samba-7bf407c7116ee0e6d61c0dbc38f48ccf5da850c2.tar.bz2 samba-7bf407c7116ee0e6d61c0dbc38f48ccf5da850c2.zip |
libsmbconf: add includes at the end of parameter list in reg_get_share().
Michael
(This used to be commit 9bd06d5737aff2bb27c07575285e079fd561a566)
Diffstat (limited to 'source3/lib/smbconf')
-rw-r--r-- | source3/lib/smbconf/smbconf_reg.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/source3/lib/smbconf/smbconf_reg.c b/source3/lib/smbconf/smbconf_reg.c index 65f07a0893..72f901d54d 100644 --- a/source3/lib/smbconf/smbconf_reg.c +++ b/source3/lib/smbconf/smbconf_reg.c @@ -457,6 +457,8 @@ static WERROR smbconf_reg_get_values(TALLOC_CTX *mem_ctx, uint32_t tmp_num_values = 0; char **tmp_valnames = NULL; char **tmp_valstrings = NULL; + uint32_t num_includes = 0; + char **includes = NULL; if ((num_values == NULL) || (value_names == NULL) || (value_strings == NULL)) @@ -501,7 +503,28 @@ static WERROR smbconf_reg_get_values(TALLOC_CTX *mem_ctx, goto done; } - werr = WERR_OK; + /* now add the includes at the end */ + werr = smbconf_reg_get_includes_internal(tmp_ctx, key, &num_includes, + &includes); + if (!W_ERROR_IS_OK(werr)) { + goto done; + } + for (count = 0; count < num_includes; count++) { + werr = smbconf_add_string_to_array(tmp_ctx, &tmp_valnames, + tmp_num_values, "include"); + if (!W_ERROR_IS_OK(werr)) { + goto done; + } + + werr = smbconf_add_string_to_array(tmp_ctx, &tmp_valstrings, + tmp_num_values, + includes[count]); + if (!W_ERROR_IS_OK(werr)) { + goto done; + } + + tmp_num_values++; + } *num_values = tmp_num_values; if (tmp_num_values > 0) { |