summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-06-24 14:55:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:58:00 -0500
commit2fb7ff7d9def29e21dd87f565ccda5437c848cdd (patch)
treed1ffc64026796790b9d2f520cbe0cda32903e8a2
parent702dd3da6297967ce140771110f85d61e0dff1e5 (diff)
downloadsamba-2fb7ff7d9def29e21dd87f565ccda5437c848cdd.tar.gz
samba-2fb7ff7d9def29e21dd87f565ccda5437c848cdd.tar.bz2
samba-2fb7ff7d9def29e21dd87f565ccda5437c848cdd.zip
r7878: mostly just a rename of REG_INFO to REG_QUERY_VALUE for better clarity
(This used to be commit d50f0ba07e285728605c8e8aae9d9a251a525e78)
-rw-r--r--source3/include/reg_objects.h1
-rw-r--r--source3/include/rpc_reg.h7
-rw-r--r--source3/rpc_client/cli_reg.c14
-rw-r--r--source3/rpc_parse/parse_reg.c14
-rw-r--r--source3/rpc_server/srv_reg.c16
-rw-r--r--source3/rpc_server/srv_reg_nt.c11
6 files changed, 30 insertions, 33 deletions
diff --git a/source3/include/reg_objects.h b/source3/include/reg_objects.h
index a31f7097d3..753425a7f9 100644
--- a/source3/include/reg_objects.h
+++ b/source3/include/reg_objects.h
@@ -26,6 +26,7 @@
typedef struct {
fstring valuename;
uint16 type;
+ /* this should be encapsulated in an RPC_DATA_BLOB */
uint32 size; /* in bytes */
uint8 *data_p;
} REGISTRY_VALUE;
diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h
index f89571484c..c343e9c594 100644
--- a/source3/include/rpc_reg.h
+++ b/source3/include/rpc_reg.h
@@ -43,7 +43,7 @@
#define REG_GET_KEY_SEC 0x0c
#define REG_OPEN_ENTRY 0x0f
#define REG_QUERY_KEY 0x10
-#define REG_INFO 0x11
+#define REG_QUERY_VALUE 0x11
#define REG_RESTORE_KEY 0x13
#define REG_SAVE_KEY 0x14
#define REG_SET_KEY_SEC 0x15
@@ -241,7 +241,6 @@ typedef struct {
} REG_Q_DELETE_KEY;
typedef struct {
- POLICY_HND key_pol;
WERROR status;
} REG_R_DELETE_KEY;
@@ -389,7 +388,7 @@ typedef struct {
uint32 ptr_buflen2;
uint32 buflen2;
-} REG_Q_INFO;
+} REG_Q_QUERY_VALUE;
typedef struct {
uint32 *type;
@@ -397,7 +396,7 @@ typedef struct {
uint32 *buf_max_len;
uint32 *buf_len;
WERROR status; /* return status */
-} REG_R_INFO;
+} REG_R_QUERY_VALUE;
/***********************************************/
diff --git a/source3/rpc_client/cli_reg.c b/source3/rpc_client/cli_reg.c
index ca4b63c282..6de2626dde 100644
--- a/source3/rpc_client/cli_reg.c
+++ b/source3/rpc_client/cli_reg.c
@@ -286,24 +286,24 @@ WERROR cli_reg_getversion(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/****************************************************************************
do a REG Query Info
****************************************************************************/
-WERROR cli_reg_query_info(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+WERROR cli_reg_query_value(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *hnd, const char *val_name,
uint32 *type, REGVAL_BUFFER *buffer)
{
- REG_Q_INFO in;
- REG_R_INFO out;
+ REG_Q_QUERY_VALUE in;
+ REG_R_QUERY_VALUE out;
prs_struct qbuf, rbuf;
ZERO_STRUCT (in);
ZERO_STRUCT (out);
- init_reg_q_info(&in, hnd, val_name, buffer);
+ init_reg_q_query_value(&in, hnd, val_name, buffer);
- CLI_DO_RPC( cli, mem_ctx, PI_WINREG, REG_QUERY_KEY,
+ CLI_DO_RPC( cli, mem_ctx, PI_WINREG, REG_QUERY_VALUE,
in, out,
qbuf, rbuf,
- reg_io_q_info,
- reg_io_r_info,
+ reg_io_q_query_value,
+ reg_io_r_query_value,
WERR_GENERAL_FAILURE );
diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c
index 5cc4d06f4f..fc2d3c4086 100644
--- a/source3/rpc_parse/parse_reg.c
+++ b/source3/rpc_parse/parse_reg.c
@@ -905,7 +905,7 @@ BOOL reg_io_r_get_key_sec(const char *desc, REG_R_GET_KEY_SEC *q_u, prs_struct
makes a structure.
********************************************************************/
-BOOL init_reg_q_info(REG_Q_INFO *q_u, POLICY_HND *pol, const char *val_name,
+BOOL init_reg_q_query_value(REG_Q_QUERY_VALUE *q_u, POLICY_HND *pol, const char *val_name,
REGVAL_BUFFER *value_output)
{
if (q_u == NULL)
@@ -936,12 +936,12 @@ BOOL init_reg_q_info(REG_Q_INFO *q_u, POLICY_HND *pol, const char *val_name,
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_info(const char *desc, REG_Q_INFO *q_u, prs_struct *ps, int depth)
+BOOL reg_io_q_query_value(const char *desc, REG_Q_QUERY_VALUE *q_u, prs_struct *ps, int depth)
{
if ( !q_u )
return False;
- prs_debug(ps, depth, desc, "reg_io_q_info");
+ prs_debug(ps, depth, desc, "reg_io_q_query_value");
depth++;
if(!prs_align(ps))
@@ -990,10 +990,10 @@ BOOL reg_io_q_info(const char *desc, REG_Q_INFO *q_u, prs_struct *ps, int depth
/*******************************************************************
Inits a structure.
- New version to replace older init_reg_r_info()
+ New version to replace older init_reg_r_query_value()
********************************************************************/
-BOOL init_reg_r_info(uint32 include_keyval, REG_R_INFO *r_u,
+BOOL init_reg_r_query_value(uint32 include_keyval, REG_R_QUERY_VALUE *r_u,
REGISTRY_VALUE *val, WERROR status)
{
uint32 buf_len = 0;
@@ -1031,12 +1031,12 @@ BOOL init_reg_r_info(uint32 include_keyval, REG_R_INFO *r_u,
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_info(const char *desc, REG_R_INFO *r_u, prs_struct *ps, int depth)
+BOOL reg_io_r_query_value(const char *desc, REG_R_QUERY_VALUE *r_u, prs_struct *ps, int depth)
{
if ( !r_u )
return False;
- prs_debug(ps, depth, desc, "reg_io_r_info");
+ prs_debug(ps, depth, desc, "reg_io_r_query_value");
depth++;
if(!prs_align(ps))
diff --git a/source3/rpc_server/srv_reg.c b/source3/rpc_server/srv_reg.c
index c0abc2a9c2..fec6702758 100644
--- a/source3/rpc_server/srv_reg.c
+++ b/source3/rpc_server/srv_reg.c
@@ -164,13 +164,13 @@ static BOOL api_reg_open_entry(pipes_struct *p)
}
/*******************************************************************
- api_reg_info
+ api_reg_query_value
********************************************************************/
-static BOOL api_reg_info(pipes_struct *p)
+static BOOL api_reg_query_value(pipes_struct *p)
{
- REG_Q_INFO q_u;
- REG_R_INFO r_u;
+ REG_Q_QUERY_VALUE q_u;
+ REG_R_QUERY_VALUE r_u;
prs_struct *data = &p->in_data.data;
prs_struct *rdata = &p->out_data.rdata;
@@ -178,12 +178,12 @@ static BOOL api_reg_info(pipes_struct *p)
ZERO_STRUCT(r_u);
/* grab the reg unknown 0x11*/
- if(!reg_io_q_info("", &q_u, data, 0))
+ if(!reg_io_q_query_value("", &q_u, data, 0))
return False;
- r_u.status = _reg_info(p, &q_u, &r_u);
+ r_u.status = _reg_query_value(p, &q_u, &r_u);
- if(!reg_io_r_info("", &r_u, rdata, 0))
+ if(!reg_io_r_query_value("", &r_u, rdata, 0))
return False;
return True;
@@ -526,7 +526,7 @@ static struct api_struct api_reg_cmds[] =
{ "REG_ENUM_KEY" , REG_ENUM_KEY , api_reg_enum_key },
{ "REG_ENUM_VALUE" , REG_ENUM_VALUE , api_reg_enum_value },
{ "REG_QUERY_KEY" , REG_QUERY_KEY , api_reg_query_key },
- { "REG_INFO" , REG_INFO , api_reg_info },
+ { "REG_QUERY_VALUE" , REG_QUERY_VALUE , api_reg_query_value },
{ "REG_SHUTDOWN" , REG_SHUTDOWN , api_reg_shutdown },
{ "REG_SHUTDOWN_EX" , REG_SHUTDOWN_EX , api_reg_shutdown_ex },
{ "REG_ABORT_SHUTDOWN" , REG_ABORT_SHUTDOWN , api_reg_abort_shutdown },
diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c
index a3ab63d06e..455ff3da40 100644
--- a/source3/rpc_server/srv_reg_nt.c
+++ b/source3/rpc_server/srv_reg_nt.c
@@ -439,7 +439,7 @@ WERROR _reg_open_entry(pipes_struct *p, REG_Q_OPEN_ENTRY *q_u, REG_R_OPEN_ENTRY
reg_reply_info
********************************************************************/
-WERROR _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u)
+WERROR _reg_query_value(pipes_struct *p, REG_Q_QUERY_VALUE *q_u, REG_R_QUERY_VALUE *r_u)
{
WERROR status = WERR_BADFILE;
fstring name;
@@ -479,8 +479,7 @@ WERROR _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u)
regval_ctr_addvalue(&regvals, "RefusePasswordChange",
REG_DWORD,
(const char*)&dwValue, sizeof(dwValue));
- val = dup_registry_value(
- regval_ctr_specific_value( &regvals, 0 ) );
+ val = dup_registry_value( regval_ctr_specific_value( &regvals, 0 ) );
status = WERR_OK;
@@ -522,7 +521,7 @@ WERROR _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u)
for ( i=0; fetch_reg_values_specific(regkey, &val, i); i++ )
{
DEBUG(10,("_reg_info: Testing value [%s]\n", val->valuename));
- if ( StrCaseCmp( val->valuename, name ) == 0 ) {
+ if ( strequal( val->valuename, name ) ) {
DEBUG(10,("_reg_info: Found match for value [%s]\n", name));
status = WERR_OK;
break;
@@ -533,7 +532,7 @@ WERROR _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u)
out:
- init_reg_r_info(q_u->ptr_buf, r_u, val, status);
+ init_reg_r_query_value(q_u->ptr_buf, r_u, val, status);
regval_ctr_destroy( &regvals );
free_registry_value( val );
@@ -1385,8 +1384,6 @@ done:
if ( newparent != parent )
close_registry_key( p, &newparent_handle );
- /* rpc_reg.h says there is a POLICY_HDN in the reply...no idea if that is correct */
-
return write_result ? WERR_OK : WERR_REG_IO_FAILURE;
}