summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/proto.h19
-rw-r--r--source3/include/rpc_reg.h35
-rw-r--r--source3/rpc_client/cli_reg.c99
-rw-r--r--source3/rpc_parse/parse_reg.c42
-rw-r--r--source3/rpc_server/srv_reg.c14
-rw-r--r--source3/rpcclient/cmd_reg.c16
6 files changed, 149 insertions, 76 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 97c5156cc9..533ca72a02 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1295,9 +1295,12 @@ void cli_nt_session_close(struct cli_state *cli);
/*The following definitions come from rpc_client/cli_reg.c */
-BOOL do_reg_open_policy(struct cli_state *cli, uint16 unknown_0, uint32 level,
+BOOL do_reg_connect(struct cli_state *cli, char *full_keyname,
+ POLICY_HND *reg_hnd,
+ POLICY_HND *key_hnd);
+BOOL do_reg_open_hklm(struct cli_state *cli, uint16 unknown_0, uint32 level,
POLICY_HND *hnd);
-BOOL do_reg_open_unk_4(struct cli_state *cli, uint16 unknown_0, uint32 level,
+BOOL do_reg_open_hku(struct cli_state *cli, uint16 unknown_0, uint32 level,
POLICY_HND *hnd);
BOOL do_reg_unk_b(struct cli_state *cli, POLICY_HND *hnd);
BOOL do_reg_query_key(struct cli_state *cli, POLICY_HND *hnd,
@@ -1609,10 +1612,10 @@ BOOL prs_uint16_post(char *name, prs_struct *ps, int depth,
/*The following definitions come from rpc_parse/parse_reg.c */
-void make_reg_q_open_pol(REG_Q_OPEN_POLICY *q_o,
+void make_reg_q_open_hklm(REG_Q_OPEN_HKLM *q_o,
uint16 unknown_0, uint32 level);
-void reg_io_q_open_policy(char *desc, REG_Q_OPEN_POLICY *r_q, prs_struct *ps, int depth);
-void reg_io_r_open_policy(char *desc, REG_R_OPEN_POLICY *r_r, prs_struct *ps, int depth);
+void reg_io_q_open_hklm(char *desc, REG_Q_OPEN_HKLM *r_q, prs_struct *ps, int depth);
+void reg_io_r_open_hklm(char *desc, REG_R_OPEN_HKLM *r_r, prs_struct *ps, int depth);
void make_reg_q_unk_b(REG_Q_UNK_B *q_u, POLICY_HND *pol);
void reg_io_q_unk_b(char *desc, REG_Q_UNK_B *r_q, prs_struct *ps, int depth);
void reg_io_r_unk_b(char *desc, REG_R_UNK_B *r_r, prs_struct *ps, int depth);
@@ -1632,10 +1635,10 @@ void reg_io_r_query_key(char *desc, REG_R_QUERY_KEY *r_r, prs_struct *ps, int d
void make_reg_q_unk_1a(REG_Q_UNK_1A *q_o, POLICY_HND *hnd);
void reg_io_q_unk_1a(char *desc, REG_Q_UNK_1A *r_q, prs_struct *ps, int depth);
void reg_io_r_unk_1a(char *desc, REG_R_UNK_1A *r_r, prs_struct *ps, int depth);
-void make_reg_q_open_unk_4(REG_Q_OPEN_UNK_4 *q_o,
+void make_reg_q_open_hku(REG_Q_OPEN_HKU *q_o,
uint16 unknown_0, uint32 level);
-void reg_io_q_open_unk_4(char *desc, REG_Q_OPEN_UNK_4 *r_q, prs_struct *ps, int depth);
-void reg_io_r_open_unk_4(char *desc, REG_R_OPEN_UNK_4 *r_r, prs_struct *ps, int depth);
+void reg_io_q_open_hku(char *desc, REG_Q_OPEN_HKU *r_q, prs_struct *ps, int depth);
+void reg_io_r_open_hku(char *desc, REG_R_OPEN_HKU *r_r, prs_struct *ps, int depth);
void make_reg_q_close(REG_Q_CLOSE *q_c, POLICY_HND *hnd);
void reg_io_q_close(char *desc, REG_Q_CLOSE *q_u, prs_struct *ps, int depth);
void reg_io_r_close(char *desc, REG_R_CLOSE *r_u, prs_struct *ps, int depth);
diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h
index 33b7b72a25..32b1c1912f 100644
--- a/source3/include/rpc_reg.h
+++ b/source3/include/rpc_reg.h
@@ -26,8 +26,8 @@
/* winreg pipe defines */
-#define REG_OPEN_POLICY 0x02
-#define REG_OPEN_UNK_4 0x04
+#define REG_OPEN_HKLM 0x02
+#define REG_OPEN_HKU 0x04
#define REG_UNK_B 0x0B
#define REG_UNK_1A 0x1a
#define REG_QUERY_KEY 0x10
@@ -42,7 +42,7 @@
#define REG_CLOSE 0x05
-/* REG_Q_OPEN_POLICY */
+/* REG_Q_OPEN_HKLM */
typedef struct q_reg_open_policy_info
{
uint32 ptr;
@@ -50,18 +50,18 @@ typedef struct q_reg_open_policy_info
uint16 unknown_1; /* random. changes */
uint32 level; /* 0x0000 0002 - 32 bit unknown */
-} REG_Q_OPEN_POLICY;
+} REG_Q_OPEN_HKLM ;
-/* REG_R_OPEN_POLICY */
+/* REG_R_OPEN_HKLM */
typedef struct r_reg_open_policy_info
{
POLICY_HND pol; /* policy handle */
uint32 status; /* return status */
-} REG_R_OPEN_POLICY;
+} REG_R_OPEN_HKLM;
-/* REG_Q_OPEN_UNK_4 */
+/* REG_Q_OPEN_HKU */
typedef struct q_reg_open_unk4_info
{
uint32 ptr;
@@ -69,15 +69,15 @@ typedef struct q_reg_open_unk4_info
uint16 unknown_1; /* random. changes */
uint32 level; /* 0x0000 0002 - 32 bit unknown */
-} REG_Q_OPEN_UNK_4;
+} REG_Q_OPEN_HKU;
-/* REG_R_OPEN_UNK_4 */
+/* REG_R_OPEN_HKU */
typedef struct r_reg_open_unk4_info
{
POLICY_HND pol; /* policy handle */
uint32 status; /* return status */
-} REG_R_OPEN_UNK_4;
+} REG_R_OPEN_HKU;
/* REG_Q_UNK_B */
@@ -206,10 +206,17 @@ typedef struct q_reg_create_key_info
uint32 unknown_0; /* 0x0000 000C */
uint32 ptr2;
- uint32 unk_len1; /* 0x0000 0014 */
- uint32 unk_len2; /* 0x0000 0014 */
- uint32 unknown_1; /* 0x0002 0000 */
- BUFFER2 buf_unk; /* 01 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
+ uint32 sec_len1; /* 0x14 - length of security descriptor, bytes */
+ uint32 sec_len2; /* 0x14 - length of security descriptor, bytes */
+ uint32 sec_len3; /* 0x0 - length of security descriptor, bytes */
+ uint32 sec_len4; /* 0x14 - length of security descriptor, bytes */
+ uint32 sec_len5; /* 0x0 - length of security descriptor, bytes */
+ uint32 sec_len6; /* 0x14 - length of security descriptor, bytes */
+#if 0
+ SEC_DES sec_desc;
+#else
+ uint8 buf_unk[20]; /* 01 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
+#endif
uint32 unknown_2; /* 0x0000 0000 */
diff --git a/source3/rpc_client/cli_reg.c b/source3/rpc_client/cli_reg.c
index 3acd8281de..a38be4149d 100644
--- a/source3/rpc_client/cli_reg.c
+++ b/source3/rpc_client/cli_reg.c
@@ -35,12 +35,69 @@ extern int DEBUGLEVEL;
/****************************************************************************
do a REG Open Policy
****************************************************************************/
-BOOL do_reg_open_policy(struct cli_state *cli, uint16 unknown_0, uint32 level,
+BOOL do_reg_connect(struct cli_state *cli, char *full_keyname,
+ POLICY_HND *reg_hnd,
+ POLICY_HND *key_hnd)
+{
+ fstring key_name;
+ char *srch;
+ BOOL res1;
+ BOOL res;
+ BOOL hklm = False;
+ BOOL hku = False;
+
+ if (full_keyname == NULL)
+ {
+ return False;
+ }
+
+ srch = "HKLM";
+ if (strnequal(full_keyname, srch, strlen(srch)))
+ {
+ full_keyname += strlen(srch);
+ if (*full_keyname == '\\')
+ {
+ full_keyname++;
+ fstrcpy(key_name, full_keyname);
+ }
+ else if (*full_keyname != 0)
+ {
+ return False;
+ }
+ }
+
+ /* open registry receive a policy handle */
+
+ if (hklm)
+ {
+ res = res ? do_reg_open_hklm(cli,
+ 0x84E0, 0x02000000,
+ reg_hnd) : False;
+ }
+
+ if (hku)
+ {
+ res = res ? do_reg_open_hku(cli,
+ 0x84E0, 0x02000000,
+ reg_hnd) : False;
+ }
+
+ /* open an entry */
+ res1 = res ? do_reg_open_entry(cli, reg_hnd,
+ key_name, 0x02000000, key_hnd) : False;
+
+ return res1 && res;
+}
+
+/****************************************************************************
+do a REG Open Policy
+****************************************************************************/
+BOOL do_reg_open_hklm(struct cli_state *cli, uint16 unknown_0, uint32 level,
POLICY_HND *hnd)
{
prs_struct rbuf;
prs_struct buf;
- REG_Q_OPEN_POLICY q_o;
+ REG_Q_OPEN_HKLM q_o;
BOOL valid_pol = False;
if (hnd == NULL) return False;
@@ -48,30 +105,30 @@ BOOL do_reg_open_policy(struct cli_state *cli, uint16 unknown_0, uint32 level,
prs_init(&buf , 1024, 4, SAFETY_MARGIN, False);
prs_init(&rbuf, 0 , 4, SAFETY_MARGIN, True );
- /* create and send a MSRPC command with api REG_OPEN_POLICY */
+ /* create and send a MSRPC command with api REG_OPEN_HKLM */
- DEBUG(4,("REG Open Policy\n"));
+ DEBUG(4,("REG Open HKLM\n"));
- make_reg_q_open_pol(&q_o, unknown_0, level);
+ make_reg_q_open_hklm(&q_o, unknown_0, level);
/* turn parameters into data stream */
- reg_io_q_open_policy("", &q_o, &buf, 0);
+ reg_io_q_open_hklm("", &q_o, &buf, 0);
/* send the data on \PIPE\ */
- if (rpc_api_pipe_req(cli, REG_OPEN_POLICY, &buf, &rbuf))
+ if (rpc_api_pipe_req(cli, REG_OPEN_HKLM, &buf, &rbuf))
{
- REG_R_OPEN_POLICY r_o;
+ REG_R_OPEN_HKLM r_o;
BOOL p;
ZERO_STRUCT(r_o);
- reg_io_r_open_policy("", &r_o, &rbuf, 0);
+ reg_io_r_open_hklm("", &r_o, &rbuf, 0);
p = rbuf.offset != 0;
if (p && r_o.status != 0)
{
/* report error code */
- DEBUG(0,("REG_OPEN_POLICY: %s\n", get_nt_error_msg(r_o.status)));
+ DEBUG(0,("REG_OPEN_HKLM: %s\n", get_nt_error_msg(r_o.status)));
p = False;
}
@@ -90,14 +147,14 @@ BOOL do_reg_open_policy(struct cli_state *cli, uint16 unknown_0, uint32 level,
}
/****************************************************************************
-do a REG Open Unknown 4
+do a REG Open HKU
****************************************************************************/
-BOOL do_reg_open_unk_4(struct cli_state *cli, uint16 unknown_0, uint32 level,
+BOOL do_reg_open_hku(struct cli_state *cli, uint16 unknown_0, uint32 level,
POLICY_HND *hnd)
{
prs_struct rbuf;
prs_struct buf;
- REG_Q_OPEN_UNK_4 q_o;
+ REG_Q_OPEN_HKU q_o;
BOOL valid_pol = False;
if (hnd == NULL) return False;
@@ -105,30 +162,30 @@ BOOL do_reg_open_unk_4(struct cli_state *cli, uint16 unknown_0, uint32 level,
prs_init(&buf , 1024, 4, SAFETY_MARGIN, False);
prs_init(&rbuf, 0 , 4, SAFETY_MARGIN, True );
- /* create and send a MSRPC command with api REG_OPEN_UNK_4 */
+ /* create and send a MSRPC command with api REG_OPEN_HKU */
- DEBUG(4,("REG Open Unknown4\n"));
+ DEBUG(4,("REG Open HKU\n"));
- make_reg_q_open_unk_4(&q_o, unknown_0, level);
+ make_reg_q_open_hku(&q_o, unknown_0, level);
/* turn parameters into data stream */
- reg_io_q_open_unk_4("", &q_o, &buf, 0);
+ reg_io_q_open_hku("", &q_o, &buf, 0);
/* send the data on \PIPE\ */
- if (rpc_api_pipe_req(cli, REG_OPEN_UNK_4, &buf, &rbuf))
+ if (rpc_api_pipe_req(cli, REG_OPEN_HKU, &buf, &rbuf))
{
- REG_R_OPEN_UNK_4 r_o;
+ REG_R_OPEN_HKU r_o;
BOOL p;
ZERO_STRUCT(r_o);
- reg_io_r_open_unk_4("", &r_o, &rbuf, 0);
+ reg_io_r_open_hku("", &r_o, &rbuf, 0);
p = rbuf.offset != 0;
if (p && r_o.status != 0)
{
/* report error code */
- DEBUG(0,("REG_OPEN_UNK_4: %s\n", get_nt_error_msg(r_o.status)));
+ DEBUG(0,("REG_OPEN_HKU: %s\n", get_nt_error_msg(r_o.status)));
p = False;
}
diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c
index e329b7751d..109d75731c 100644
--- a/source3/rpc_parse/parse_reg.c
+++ b/source3/rpc_parse/parse_reg.c
@@ -30,7 +30,7 @@ extern int DEBUGLEVEL;
/*******************************************************************
creates a structure.
********************************************************************/
-void make_reg_q_open_pol(REG_Q_OPEN_POLICY *q_o,
+void make_reg_q_open_hklm(REG_Q_OPEN_HKLM *q_o,
uint16 unknown_0, uint32 level)
{
q_o->ptr = 1;
@@ -42,11 +42,11 @@ void make_reg_q_open_pol(REG_Q_OPEN_POLICY *q_o,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void reg_io_q_open_policy(char *desc, REG_Q_OPEN_POLICY *r_q, prs_struct *ps, int depth)
+void reg_io_q_open_hklm(char *desc, REG_Q_OPEN_HKLM *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL) return;
- prs_debug(ps, depth, desc, "reg_io_q_open_policy");
+ prs_debug(ps, depth, desc, "reg_io_q_open_hklm");
depth++;
prs_align(ps);
@@ -64,11 +64,11 @@ void reg_io_q_open_policy(char *desc, REG_Q_OPEN_POLICY *r_q, prs_struct *ps, i
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void reg_io_r_open_policy(char *desc, REG_R_OPEN_POLICY *r_r, prs_struct *ps, int depth)
+void reg_io_r_open_hklm(char *desc, REG_R_OPEN_HKLM *r_r, prs_struct *ps, int depth)
{
if (r_r == NULL) return;
- prs_debug(ps, depth, desc, "reg_io_r_open_policy");
+ prs_debug(ps, depth, desc, "reg_io_r_open_hklm");
depth++;
prs_align(ps);
@@ -156,11 +156,14 @@ void make_reg_q_create_key(REG_Q_CREATE_KEY *q_c, POLICY_HND *hnd,
q_c->unknown_0 = 0x0000000C;
q_c->ptr2 = 1;
- q_c->unk_len1 = 0x14;
- q_c->unk_len2 = 0x14;
- q_c->unknown_1 = 0x00020000;
+ q_c->sec_len1 = 0x14;
+ q_c->sec_len2 = 0x14;
+ q_c->sec_len3 = 0x0;
+ q_c->sec_len4 = 0x14;
+ q_c->sec_len5 = 0x0;
+ q_c->sec_len6 = 0x14;
- make_buffer2(&q_c->buf_unk, data, sizeof(data));
+ memcpy(&q_c->buf_unk, data, sizeof(q_c->buf_unk));
q_c->unknown_2 = 0x00000000;
}
@@ -199,10 +202,13 @@ void reg_io_q_create_key(char *desc, REG_Q_CREATE_KEY *r_q, prs_struct *ps, int
prs_uint32("ptr2", ps, depth, &(r_q->ptr2));
if (r_q->ptr2)
{
- prs_uint32("unk_len1", ps, depth, &(r_q->unk_len1));
- prs_uint32("unk_len2", ps, depth, &(r_q->unk_len2));
- prs_uint32("unknown_1", ps, depth, &(r_q->unknown_1));
- smb_io_buffer2("buf_unk", &r_q->buf_unk, 1, ps, depth);
+ prs_uint32("sec_len1", ps, depth, &(r_q->sec_len1));
+ prs_uint32("sec_len2", ps, depth, &(r_q->sec_len2));
+ prs_uint32("sec_len3", ps, depth, &(r_q->sec_len3));
+ prs_uint32("sec_len4", ps, depth, &(r_q->sec_len4));
+ prs_uint32("sec_len5", ps, depth, &(r_q->sec_len5));
+ prs_uint32("sec_len6", ps, depth, &(r_q->sec_len6));
+ prs_uint8s(False, "buf_unk", ps, depth, r_q->buf_unk, sizeof(r_q->buf_unk));
prs_align(ps);
prs_uint32("unknown_2", ps, depth, &(r_q->unknown_2));
@@ -389,7 +395,7 @@ void reg_io_r_unk_1a(char *desc, REG_R_UNK_1A *r_r, prs_struct *ps, int depth)
/*******************************************************************
creates a structure.
********************************************************************/
-void make_reg_q_open_unk_4(REG_Q_OPEN_UNK_4 *q_o,
+void make_reg_q_open_hku(REG_Q_OPEN_HKU *q_o,
uint16 unknown_0, uint32 level)
{
q_o->ptr = 1;
@@ -401,11 +407,11 @@ void make_reg_q_open_unk_4(REG_Q_OPEN_UNK_4 *q_o,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void reg_io_q_open_unk_4(char *desc, REG_Q_OPEN_UNK_4 *r_q, prs_struct *ps, int depth)
+void reg_io_q_open_hku(char *desc, REG_Q_OPEN_HKU *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL) return;
- prs_debug(ps, depth, desc, "reg_io_q_open_unk_4");
+ prs_debug(ps, depth, desc, "reg_io_q_open_hku");
depth++;
prs_align(ps);
@@ -423,11 +429,11 @@ void reg_io_q_open_unk_4(char *desc, REG_Q_OPEN_UNK_4 *r_q, prs_struct *ps, int
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void reg_io_r_open_unk_4(char *desc, REG_R_OPEN_UNK_4 *r_r, prs_struct *ps, int depth)
+void reg_io_r_open_hku(char *desc, REG_R_OPEN_HKU *r_r, prs_struct *ps, int depth)
{
if (r_r == NULL) return;
- prs_debug(ps, depth, desc, "reg_io_r_open_unk_4");
+ prs_debug(ps, depth, desc, "reg_io_r_open_hku");
depth++;
prs_align(ps);
diff --git a/source3/rpc_server/srv_reg.c b/source3/rpc_server/srv_reg.c
index c153a78ee1..33ccae3f93 100644
--- a/source3/rpc_server/srv_reg.c
+++ b/source3/rpc_server/srv_reg.c
@@ -77,10 +77,10 @@ static void api_reg_close( uint16 vuid, prs_struct *data,
/*******************************************************************
reg_reply_open
********************************************************************/
-static void reg_reply_open(REG_Q_OPEN_POLICY *q_r,
+static void reg_reply_open(REG_Q_OPEN_HKLM *q_r,
prs_struct *rdata)
{
- REG_R_OPEN_POLICY r_u;
+ REG_R_OPEN_HKLM r_u;
r_u.status = 0x0;
/* get a (unique) handle. open a policy on it. */
@@ -92,7 +92,7 @@ static void reg_reply_open(REG_Q_OPEN_POLICY *q_r,
DEBUG(5,("reg_open: %d\n", __LINE__));
/* store the response in the SMB stream */
- reg_io_r_open_policy("", &r_u, rdata, 0);
+ reg_io_r_open_hklm("", &r_u, rdata, 0);
DEBUG(5,("reg_open: %d\n", __LINE__));
}
@@ -103,10 +103,10 @@ static void reg_reply_open(REG_Q_OPEN_POLICY *q_r,
static void api_reg_open( uint16 vuid, prs_struct *data,
prs_struct *rdata )
{
- REG_Q_OPEN_POLICY q_u;
+ REG_Q_OPEN_HKLM q_u;
/* grab the reg open */
- reg_io_q_open_policy("", &q_u, data, 0);
+ reg_io_q_open_hklm("", &q_u, data, 0);
/* construct reply. always indicate success */
reg_reply_open(&q_u, rdata);
@@ -225,9 +225,9 @@ static struct api_struct api_reg_cmds[] =
{
{ "REG_CLOSE" , REG_CLOSE , api_reg_close },
{ "REG_OPEN_ENTRY" , REG_OPEN_ENTRY , api_reg_open_entry },
- { "REG_OPEN" , REG_OPEN_POLICY , api_reg_open },
+ { "REG_OPEN" , REG_OPEN_HKLM , api_reg_open },
{ "REG_INFO" , REG_INFO , api_reg_info },
- { NULL, 0 , NULL }
+ { NULL, 0 , NULL }
};
/*******************************************************************
diff --git a/source3/rpcclient/cmd_reg.c b/source3/rpcclient/cmd_reg.c
index 7dfc355569..189f4fe9d4 100644
--- a/source3/rpcclient/cmd_reg.c
+++ b/source3/rpcclient/cmd_reg.c
@@ -83,7 +83,7 @@ void cmd_reg_enum(struct client_info *info)
res = res ? cli_nt_session_open(smb_cli, PIPE_WINREG) : False;
/* open registry receive a policy handle */
- res = res ? do_reg_open_policy(smb_cli,
+ res = res ? do_reg_open_hklm(smb_cli,
0x84E0, 0x02000000,
&info->dom.reg_pol_connect) : False;
@@ -220,7 +220,7 @@ void cmd_reg_query_key(struct client_info *info)
res = res ? cli_nt_session_open(smb_cli, PIPE_WINREG) : False;
/* open registry receive a policy handle */
- res = res ? do_reg_open_policy(smb_cli,
+ res = res ? do_reg_open_hklm(smb_cli,
0x84E0, 0x02000000,
&info->dom.reg_pol_connect) : False;
@@ -320,11 +320,11 @@ void cmd_reg_test2(struct client_info *info)
res = res ? cli_nt_session_open(smb_cli, PIPE_WINREG) : False;
/* open registry receive a policy handle */
- res = res ? do_reg_open_policy(smb_cli,
+ res = res ? do_reg_open_hklm(smb_cli,
0x84E0, 0x02000000,
&info->dom.reg_pol_connect) : False;
- res1 = res ? do_reg_open_unk_4(smb_cli,
+ res1 = res ? do_reg_open_hku(smb_cli,
0x84E0, 0x02000000,
&info->dom.reg_pol_unk_4 ) : False;
@@ -477,7 +477,7 @@ void cmd_reg_create_val(struct client_info *info)
res = res ? cli_nt_session_open(smb_cli, PIPE_WINREG) : False;
/* open registry receive a policy handle */
- res = res ? do_reg_open_policy(smb_cli,
+ res = res ? do_reg_open_hklm(smb_cli,
0x84E0, 0x02000000,
&info->dom.reg_pol_connect) : False;
@@ -543,7 +543,7 @@ void cmd_reg_delete_key(struct client_info *info)
res = res ? cli_nt_session_open(smb_cli, PIPE_WINREG) : False;
/* open registry receive a policy handle */
- res = res ? do_reg_open_policy(smb_cli,
+ res = res ? do_reg_open_hklm(smb_cli,
0x84E0, 0x02000000,
&info->dom.reg_pol_connect) : False;
@@ -627,7 +627,7 @@ void cmd_reg_create_key(struct client_info *info)
res = res ? cli_nt_session_open(smb_cli, PIPE_WINREG) : False;
/* open registry receive a policy handle */
- res = res ? do_reg_open_policy(smb_cli,
+ res = res ? do_reg_open_hklm(smb_cli,
0x84E0, 0x02000000,
&info->dom.reg_pol_connect) : False;
@@ -696,7 +696,7 @@ void cmd_reg_get_key_sec(struct client_info *info)
res = res ? cli_nt_session_open(smb_cli, PIPE_WINREG) : False;
/* open registry receive a policy handle */
- res = res ? do_reg_open_policy(smb_cli,
+ res = res ? do_reg_open_hklm(smb_cli,
0x84E0, 0x02000000,
&info->dom.reg_pol_connect) : False;