summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-12-25 02:21:30 +0100
committerMichael Adam <obnox@samba.org>2007-12-25 02:21:30 +0100
commitc9f65929b733353baec531c4735749a754f051c5 (patch)
treeae229a184caf271df35e5ce5218b2af5718c2c99 /source3
parent54861606f91d387b03f579a4c968f0c7cf66e0bd (diff)
downloadsamba-c9f65929b733353baec531c4735749a754f051c5.tar.gz
samba-c9f65929b733353baec531c4735749a754f051c5.tar.bz2
samba-c9f65929b733353baec531c4735749a754f051c5.zip
Move reg_delkey_internal() to libnet/libnet_conf.c
Michael (This used to be commit c1b863fd0520ce64a1bad5e2fa3f69afcc2c78d5)
Diffstat (limited to 'source3')
-rw-r--r--source3/libnet/libnet_conf.c24
-rw-r--r--source3/utils/net_conf.c24
2 files changed, 24 insertions, 24 deletions
diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c
index a371915a36..30342e1e43 100644
--- a/source3/libnet/libnet_conf.c
+++ b/source3/libnet/libnet_conf.c
@@ -243,6 +243,30 @@ done:
*
**********************************************************************/
+/*
+ * delete a subkey of KEY_SMBCONF
+ */
+WERROR reg_delkey_internal(TALLOC_CTX *ctx, const char *keyname)
+{
+ WERROR werr = WERR_OK;
+ struct registry_key *key = NULL;
+
+ werr = libnet_smbconf_open_basepath(ctx, REG_KEY_WRITE, &key);
+ if (!W_ERROR_IS_OK(werr)) {
+ goto done;
+ }
+
+ werr = reg_deletekey_recursive(key, key, keyname);
+ if (!W_ERROR_IS_OK(werr)) {
+ d_fprintf(stderr, "Error deleting registry key %s\\%s: %s\n",
+ KEY_SMBCONF, keyname, dos_errstr(werr));
+ }
+
+done:
+ TALLOC_FREE(key);
+ return werr;
+}
+
WERROR libnet_smbconf_setparm(TALLOC_CTX *mem_ctx,
const char *service,
const char *param,
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c
index d09079c6f2..f45042b2f8 100644
--- a/source3/utils/net_conf.c
+++ b/source3/utils/net_conf.c
@@ -143,30 +143,6 @@ static char *format_value(TALLOC_CTX *mem_ctx, struct registry_value *value)
return result;
}
-/*
- * delete a subkey of KEY_SMBCONF
- */
-static WERROR reg_delkey_internal(TALLOC_CTX *ctx, const char *keyname)
-{
- WERROR werr = WERR_OK;
- struct registry_key *key = NULL;
-
- werr = libnet_smbconf_open_basepath(ctx, REG_KEY_WRITE, &key);
- if (!W_ERROR_IS_OK(werr)) {
- goto done;
- }
-
- werr = reg_deletekey_recursive(key, key, keyname);
- if (!W_ERROR_IS_OK(werr)) {
- d_fprintf(stderr, "Error deleting registry key %s\\%s: %s\n",
- KEY_SMBCONF, keyname, dos_errstr(werr));
- }
-
-done:
- TALLOC_FREE(key);
- return werr;
-}
-
static WERROR list_values(TALLOC_CTX *ctx, struct registry_key *key)
{
WERROR werr = WERR_OK;