From 3c9f7c7a64e886ae54beb4242b227a9a223520e1 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 3 Jan 2008 01:12:23 +0100 Subject: 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) --- source3/libnet/libnet_conf.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'source3/libnet') 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; -- cgit