summaryrefslogtreecommitdiff
path: root/source3/libnet/libnet_conf.c
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/libnet/libnet_conf.c
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/libnet/libnet_conf.c')
-rw-r--r--source3/libnet/libnet_conf.c24
1 files changed, 24 insertions, 0 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,