Move reg_delkey_internal() to libnet/libnet_conf.c
authorMichael Adam <obnox@samba.org>
Tue, 25 Dec 2007 01:21:30 +0000 (02:21 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 25 Dec 2007 01:21:30 +0000 (02:21 +0100)
Michael

source/libnet/libnet_conf.c
source/utils/net_conf.c

index a371915a361b4ce446ec8e06357f41125b89baba..30342e1e430310f9f8bbeb131d0d3de35092a7ca 100644 (file)
@@ -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,
index d09079c6f28d22e136dbf067675130bf4d688963..f45042b2f8b17ac6d57075d02867944d3d4c2dd6 100644 (file)
@@ -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;