summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicentiu Ciorbaru <cvicentiu@gmail.com>2011-07-13 22:57:08 +0300
committerMichael Adam <obnox@samba.org>2011-08-22 13:59:24 +0200
commit8efd30ca610692fad3103ae7c9de57fc46206763 (patch)
tree2bae96c014559e9c15ecc4917271912bb9b7ba9a
parentf16d092ad91d96a99bd5d4935d6614876950c112 (diff)
downloadsamba-8efd30ca610692fad3103ae7c9de57fc46206763.tar.gz
samba-8efd30ca610692fad3103ae7c9de57fc46206763.tar.bz2
samba-8efd30ca610692fad3103ae7c9de57fc46206763.zip
s3-net: rpc_conf_list now uses the wrapper rpc_conf_open_conf
Signed-off-by: Michael Adam <obnox@samba.org>
-rw-r--r--source3/utils/net_rpc_conf.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/source3/utils/net_rpc_conf.c b/source3/utils/net_rpc_conf.c
index 84101f6dcd..365d0ee8bb 100644
--- a/source3/utils/net_rpc_conf.c
+++ b/source3/utils/net_rpc_conf.c
@@ -355,7 +355,6 @@ static NTSTATUS rpc_conf_list_internal(struct net_context *c,
NTSTATUS status = NT_STATUS_OK;
WERROR werr = WERR_OK;
WERROR _werr;
- struct winreg_String key;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
@@ -367,7 +366,6 @@ static NTSTATUS rpc_conf_list_internal(struct net_context *c,
const char **subkeys = NULL;
- ZERO_STRUCT(key);
ZERO_STRUCT(hive_hnd);
ZERO_STRUCT(key_hnd);
@@ -378,34 +376,18 @@ static NTSTATUS rpc_conf_list_internal(struct net_context *c,
goto error;
}
- status = dcerpc_winreg_OpenHKLM(b, frame, NULL,
- REG_KEY_READ, &hive_hnd, &werr);
+ status = rpc_conf_open_conf(frame,
+ b,
+ REG_KEY_READ,
+ &hive_hnd,
+ &key_hnd,
+ &werr);
if (!(NT_STATUS_IS_OK(status))) {
- d_fprintf(stderr, _("Failed to open hive: %s\n"),
- nt_errstr(status));
- goto error;
- }
- if (!W_ERROR_IS_OK(werr)) {
- d_fprintf(stderr, _("Failed to open hive: %s\n"),
- win_errstr(werr));
goto error;
}
- key.name = confpath;
- status = dcerpc_winreg_OpenKey(b, frame, &hive_hnd, key, 0,
- REG_KEY_READ, &key_hnd, &werr);
-
- if (!(NT_STATUS_IS_OK(status))) {
- d_fprintf(stderr, _("Failed to open smbconf key: %s\n"),
- nt_errstr(status));
- dcerpc_winreg_CloseKey(b, frame, &hive_hnd, &_werr);
- goto error;
- }
if (!(W_ERROR_IS_OK(werr))) {
- d_fprintf(stderr, _("Failed to open smbconf key: %s\n"),
- win_errstr(werr));
- dcerpc_winreg_CloseKey(b, frame, &hive_hnd, &_werr);
goto error;
}