summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/smbconf/smbconf_private.h3
-rw-r--r--source3/lib/smbconf/smbconf_txt_simple.c21
-rw-r--r--source3/lib/smbconf/smbconf_util.c21
3 files changed, 24 insertions, 21 deletions
diff --git a/source3/lib/smbconf/smbconf_private.h b/source3/lib/smbconf/smbconf_private.h
index 85b529ac85..cba9148c7c 100644
--- a/source3/lib/smbconf/smbconf_private.h
+++ b/source3/lib/smbconf/smbconf_private.h
@@ -67,4 +67,7 @@ WERROR smbconf_add_string_to_array(TALLOC_CTX *mem_ctx,
uint32_t count,
const char *string);
+bool smbconf_find_in_array(const char *string, char **list,
+ uint32_t num_entries, uint32_t *entry);
+
#endif
diff --git a/source3/lib/smbconf/smbconf_txt_simple.c b/source3/lib/smbconf/smbconf_txt_simple.c
index 3972b319a7..53768dec88 100644
--- a/source3/lib/smbconf/smbconf_txt_simple.c
+++ b/source3/lib/smbconf/smbconf_txt_simple.c
@@ -56,27 +56,6 @@ static struct txt_private_data *pd(struct smbconf_ctx *ctx)
return (struct txt_private_data *)(ctx->data);
}
-static bool smbconf_find_in_array(const char *string, char **list,
- uint32_t num_entries, uint32_t *entry)
-{
- uint32_t i;
-
- if ((string == NULL) || (list == NULL)) {
- return false;
- }
-
- for (i = 0; i < num_entries; i++) {
- if (strequal(string, list[i])) {
- if (entry != NULL) {
- *entry = i;
- }
- return true;
- }
- }
-
- return false;
-}
-
static bool smbconf_txt_do_section(const char *section, void *private_data)
{
WERROR werr;
diff --git a/source3/lib/smbconf/smbconf_util.c b/source3/lib/smbconf/smbconf_util.c
index 137e3a825c..99b08cdd70 100644
--- a/source3/lib/smbconf/smbconf_util.c
+++ b/source3/lib/smbconf/smbconf_util.c
@@ -101,3 +101,24 @@ WERROR smbconf_add_string_to_array(TALLOC_CTX *mem_ctx,
return WERR_OK;
}
+
+bool smbconf_find_in_array(const char *string, char **list,
+ uint32_t num_entries, uint32_t *entry)
+{
+ uint32_t i;
+
+ if ((string == NULL) || (list == NULL)) {
+ return false;
+ }
+
+ for (i = 0; i < num_entries; i++) {
+ if (strequal(string, list[i])) {
+ if (entry != NULL) {
+ *entry = i;
+ }
+ return true;
+ }
+ }
+
+ return false;
+}