summaryrefslogtreecommitdiff
path: root/source3/libnet
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-12-23 03:41:55 +0100
committerMichael Adam <obnox@samba.org>2007-12-23 04:10:32 +0100
commit62f08d3dd9b1f1d53a8e9ecf352fbbfb4c12c484 (patch)
tree4f16e6c7eef27ddb2746ad49308d19a4d0fa32c2 /source3/libnet
parent31d436e54c2ec56ae59527feb9a31d13eca44f6d (diff)
downloadsamba-62f08d3dd9b1f1d53a8e9ecf352fbbfb4c12c484.tar.gz
samba-62f08d3dd9b1f1d53a8e9ecf352fbbfb4c12c484.tar.bz2
samba-62f08d3dd9b1f1d53a8e9ecf352fbbfb4c12c484.zip
Move net_conf_setparm() to libnet_conf.c
renaming it to libnet_smbconf_setparm() Michael (This used to be commit 60f49b22b5aa125ff6cb358a258a1be99c378d7a)
Diffstat (limited to 'source3/libnet')
-rw-r--r--source3/libnet/libnet_conf.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c
index d42e5ad227..00dc1d473d 100644
--- a/source3/libnet/libnet_conf.c
+++ b/source3/libnet/libnet_conf.c
@@ -235,6 +235,27 @@ static WERROR do_modify_val_config(struct registry_key *key,
return reg_setvalue(key, val_name, &val);
}
+WERROR libnet_smbconf_setparm(TALLOC_CTX *mem_ctx,
+ const char *service,
+ const char *param,
+ const char *valstr)
+{
+ WERROR werr;
+ struct registry_key *key = NULL;
+
+ if (!libnet_smbconf_key_exists(mem_ctx, service)) {
+ werr = libnet_reg_createkey_internal(mem_ctx, service, &key);
+ } else {
+ werr = libnet_smbconf_open_path(mem_ctx, service, REG_KEY_WRITE,
+ &key);
+ }
+ W_ERROR_NOT_OK_RETURN(werr);
+
+ werr = libnet_smbconf_reg_setvalue_internal(key, param, valstr);
+
+ return werr;
+}
+
WERROR libnet_smbconf_set_global_param(TALLOC_CTX *mem_ctx,
const char *param,
const char *val)