summaryrefslogtreecommitdiff
path: root/source3/libnet
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libnet')
-rw-r--r--source3/libnet/libnet_conf.c48
1 files changed, 30 insertions, 18 deletions
diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c
index 00dc1d473d..f364e4fb64 100644
--- a/source3/libnet/libnet_conf.c
+++ b/source3/libnet/libnet_conf.c
@@ -20,6 +20,13 @@
#include "includes.h"
+/**********************************************************************
+ *
+ * Helper functions (mostly registry related)
+ * TODO: These should be eventually static.
+
+ **********************************************************************/
+
/*
* Open a subkey of KEY_SMBCONF (i.e a service)
* - variant without error output (q = quiet)-
@@ -77,6 +84,23 @@ done:
return ret;
}
+static bool libnet_smbconf_value_exists(TALLOC_CTX *ctx,
+ struct registry_key *key,
+ const char *param)
+{
+ bool ret = False;
+ WERROR werr = WERR_OK;
+ struct registry_value *value = NULL;
+
+ werr = reg_queryvalue(ctx, key, param, &value);
+ if (W_ERROR_IS_OK(werr)) {
+ ret = True;
+ }
+
+ TALLOC_FREE(value);
+ return ret;
+}
+
/*
* Open a subkey of KEY_SMBCONF (i.e a service)
* - variant with error output -
@@ -148,7 +172,6 @@ done:
return werr;
}
-
/*
* add a value to a key.
*/
@@ -235,6 +258,12 @@ static WERROR do_modify_val_config(struct registry_key *key,
return reg_setvalue(key, val_name, &val);
}
+/**********************************************************************
+ *
+ * The actual net conf api functions, that are exported.
+ *
+ **********************************************************************/
+
WERROR libnet_smbconf_setparm(TALLOC_CTX *mem_ctx,
const char *service,
const char *param,
@@ -287,23 +316,6 @@ WERROR libnet_smbconf_set_global_param(TALLOC_CTX *mem_ctx,
return do_modify_val_config(key, param, val);
}
-static bool libnet_smbconf_value_exists(TALLOC_CTX *ctx,
- struct registry_key *key,
- const char *param)
-{
- bool ret = False;
- WERROR werr = WERR_OK;
- struct registry_value *value = NULL;
-
- werr = reg_queryvalue(ctx, key, param, &value);
- if (W_ERROR_IS_OK(werr)) {
- ret = True;
- }
-
- TALLOC_FREE(value);
- return ret;
-}
-
WERROR libnet_smbconf_delparm(TALLOC_CTX *mem_ctx,
const char *service,
const char *param)