summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_reg.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-07-23 04:55:06 +0000
committerGerald Carter <jerry@samba.org>2002-07-23 04:55:06 +0000
commite8177d1104c8f7a1035f5c9c340ae5c9b594a729 (patch)
tree6fb8ca0c2ae68a9892f0ff38cfb4440b83205c3e /source3/rpc_parse/parse_reg.c
parent445a52ebb0cdbc5fff47559f70c2000283da9611 (diff)
downloadsamba-e8177d1104c8f7a1035f5c9c340ae5c9b594a729.tar.gz
samba-e8177d1104c8f7a1035f5c9c340ae5c9b594a729.tar.bz2
samba-e8177d1104c8f7a1035f5c9c340ae5c9b594a729.zip
* changed structure of REG_R_ENUM_VALUE structure since the BUFFER2
is not and [in/out] buffer * registry value enumeration is working now for the Print\Forms key. The format of the binary data is not quite right yet but all installed forms are listed (This used to be commit 998eb9c7312c3c9a9ed1e9ec294593503c0304bf)
Diffstat (limited to 'source3/rpc_parse/parse_reg.c')
-rw-r--r--source3/rpc_parse/parse_reg.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c
index 1ebc1532f3..3987f20885 100644
--- a/source3/rpc_parse/parse_reg.c
+++ b/source3/rpc_parse/parse_reg.c
@@ -1139,6 +1139,38 @@ void init_reg_q_enum_val(REG_Q_ENUM_VALUE *q_i, POLICY_HND *pol,
}
/*******************************************************************
+makes a structure.
+********************************************************************/
+
+void init_reg_r_enum_val(REG_R_ENUM_VALUE *r_u, REGISTRY_VALUE *val )
+{
+ ZERO_STRUCTP(r_u);
+
+ /* value name */
+
+ init_uni_hdr( &r_u->hdr_name, strlen(val->valuename)+1 );
+ init_unistr2( &r_u->uni_name, val->valuename, strlen(val->valuename)+1 );
+
+ /* type */
+
+ r_u->ptr_type = 1;
+ r_u->type = val->type;
+
+ /* data */
+
+ r_u->ptr_value = 1;
+ init_buffer2( &r_u->buf_value, val->data.void_ptr, val->size );
+
+ /* lengths */
+
+ r_u->ptr1 = 1;
+ r_u->len_value1 = val->size;
+
+ r_u->ptr2 = 1;
+ r_u->len_value2 = val->size;
+}
+
+/*******************************************************************
reads or writes a structure.
********************************************************************/
@@ -1158,6 +1190,7 @@ BOOL reg_io_q_enum_val(char *desc, REG_Q_ENUM_VALUE *q_q, prs_struct *ps, int d
if(!prs_uint32("val_index", ps, depth, &q_q->val_index))
return False;
+
if(!smb_io_unihdr ("hdr_name", &q_q->hdr_name, ps, depth))
return False;
if(!smb_io_unistr2("uni_name", &q_q->uni_name, q_q->hdr_name.buffer, ps, depth))
@@ -1228,7 +1261,7 @@ BOOL reg_io_r_enum_val(char *desc, REG_R_ENUM_VALUE *r_q, prs_struct *ps, int d
if(!prs_uint32("ptr_value", ps, depth, &r_q->ptr_value))
return False;
- if(!smb_io_buffer2("buf_value", r_q->buf_value, r_q->ptr_value, ps, depth))
+ if(!smb_io_buffer2("buf_value", &r_q->buf_value, r_q->ptr_value, ps, depth))
return False;
if(!prs_align(ps))
return False;