summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-01-03 01:12:23 +0100
committerMichael Adam <obnox@samba.org>2008-01-03 01:29:43 +0100
commit3c9f7c7a64e886ae54beb4242b227a9a223520e1 (patch)
treea539fd024ec7920cb3edf16418e896a3b3fb47a8
parent3bf57a4d824b75dcbfea074e4e10d57f1d907682 (diff)
downloadsamba-3c9f7c7a64e886ae54beb4242b227a9a223520e1.tar.gz
samba-3c9f7c7a64e886ae54beb4242b227a9a223520e1.tar.bz2
samba-3c9f7c7a64e886ae54beb4242b227a9a223520e1.zip
Use libnet_smbconf_reg_open_path() in libnet_smbconf_drop().
Replaces creation of token and direct use of reg_open_path. Michael (This used to be commit 7e407e18be0761e7004acfbd2376c3a435922c25)
-rw-r--r--source3/libnet/libnet_conf.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c
index 0bc7c63471..ca5b0c408f 100644
--- a/source3/libnet/libnet_conf.c
+++ b/source3/libnet/libnet_conf.c
@@ -395,13 +395,6 @@ WERROR libnet_smbconf_drop(void)
TALLOC_CTX* mem_ctx = talloc_stackframe();
enum winreg_CreateAction action;
- if (!(token = registry_create_admin_token(mem_ctx))) {
- DEBUG(1, ("Error creating admin token\n"));
- /* what is the appropriate error code here? */
- werr = WERR_CAN_NOT_COMPLETE;
- goto done;
- }
-
path = talloc_strdup(mem_ctx, KEY_SMBCONF);
if (path == NULL) {
werr = WERR_NOMEM;
@@ -409,7 +402,8 @@ WERROR libnet_smbconf_drop(void)
}
p = strrchr(path, '\\');
*p = '\0';
- werr = reg_open_path(mem_ctx, path, REG_KEY_WRITE, token, &parent_key);
+ werr = libnet_smbconf_reg_open_path(mem_ctx, path, REG_KEY_WRITE,
+ &parent_key);
if (!W_ERROR_IS_OK(werr)) {
goto done;