summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-11-11 12:49:20 +0100
committerGünther Deschner <gd@samba.org>2008-11-19 23:25:33 +0100
commitf9d691d9d808ec2f91f3f469fe2201b0909a8552 (patch)
tree0dc1042629ae2a62c72fd40c402b612989a7008a /source3
parent12fdb5eb4628db08a665791fb76d15e9f5894478 (diff)
downloadsamba-f9d691d9d808ec2f91f3f469fe2201b0909a8552.tar.gz
samba-f9d691d9d808ec2f91f3f469fe2201b0909a8552.tar.bz2
samba-f9d691d9d808ec2f91f3f469fe2201b0909a8552.zip
s3-ntsvcs: remove old hand-marshalling for ntsvcs getdevregprop.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h7
-rw-r--r--source3/include/rpc_ntsvcs.h19
-rw-r--r--source3/rpc_client/cli_reg.c17
-rw-r--r--source3/rpc_parse/parse_misc.c54
-rw-r--r--source3/rpc_parse/parse_ntsvcs.c68
-rw-r--r--source3/rpc_parse/parse_prs.c33
6 files changed, 0 insertions, 198 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 45f66203e1..dd4b9d15f7 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5296,7 +5296,6 @@ NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
NTSTATUS rpccli_winreg_Connect(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
uint32 reg_type, uint32 access_mask,
POLICY_HND *reg_hnd);
-uint32 reg_init_regval_buffer( REGVAL_BUFFER *buf2, REGISTRY_VALUE *val );
/* The following definitions come from rpc_client/cli_samr.c */
@@ -5910,8 +5909,6 @@ void init_rpc_blob_str(RPC_DATA_BLOB *str, const char *buf, int len);
void init_rpc_blob_hex(RPC_DATA_BLOB *str, const char *buf);
void init_rpc_blob_bytes(RPC_DATA_BLOB *str, uint8 *buf, size_t len);
bool smb_io_buffer5(const char *desc, BUFFER5 *buf5, prs_struct *ps, int depth);
-void init_regval_buffer(REGVAL_BUFFER *str, const uint8 *buf, size_t len);
-bool smb_io_regval_buffer(const char *desc, prs_struct *ps, int depth, REGVAL_BUFFER *buf2);
void init_buf_unistr2(UNISTR2 *str, uint32 *ptr, const char *buf);
void copy_unistr2(UNISTR2 *str, const UNISTR2 *from);
void init_string2(STRING2 *str, const char *buf, size_t max_len, size_t str_len);
@@ -5974,8 +5971,6 @@ bool policy_handle_is_valid(const POLICY_HND *hnd);
bool ntsvcs_io_q_get_device_list(const char *desc, NTSVCS_Q_GET_DEVICE_LIST *q_u, prs_struct *ps, int depth);
bool ntsvcs_io_r_get_device_list(const char *desc, NTSVCS_R_GET_DEVICE_LIST *r_u, prs_struct *ps, int depth);
-bool ntsvcs_io_q_get_device_reg_property(const char *desc, NTSVCS_Q_GET_DEVICE_REG_PROPERTY *q_u, prs_struct *ps, int depth);
-bool ntsvcs_io_r_get_device_reg_property(const char *desc, NTSVCS_R_GET_DEVICE_REG_PROPERTY *r_u, prs_struct *ps, int depth);
/* The following definitions come from rpc_parse/parse_prs.c */
@@ -6031,7 +6026,6 @@ bool prs_uint16s(bool charmode, const char *name, prs_struct *ps, int depth, uin
bool prs_uint16uni(bool charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len);
bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, int depth, uint32 *data32s, int len);
bool prs_buffer5(bool charmode, const char *name, prs_struct *ps, int depth, BUFFER5 *str);
-bool prs_regval_buffer(bool charmode, const char *name, prs_struct *ps, int depth, REGVAL_BUFFER *buf);
bool prs_string2(bool charmode, const char *name, prs_struct *ps, int depth, STRING2 *str);
bool prs_unistr2(bool charmode, const char *name, prs_struct *ps, int depth, UNISTR2 *str);
bool prs_unistr3(bool charmode, const char *name, UNISTR3 *str, prs_struct *ps, int depth);
@@ -6824,7 +6818,6 @@ WERROR _PNP_GetVersion(pipes_struct *p,
WERROR _PNP_GetDeviceListSize(pipes_struct *p,
struct PNP_GetDeviceListSize *r);
WERROR _ntsvcs_get_device_list( pipes_struct *p, NTSVCS_Q_GET_DEVICE_LIST *q_u, NTSVCS_R_GET_DEVICE_LIST *r_u );
-WERROR _ntsvcs_get_device_reg_property( pipes_struct *p, NTSVCS_Q_GET_DEVICE_REG_PROPERTY *q_u, NTSVCS_R_GET_DEVICE_REG_PROPERTY *r_u );
WERROR _PNP_ValidateDeviceInstance(pipes_struct *p,
struct PNP_ValidateDeviceInstance *r);
WERROR _PNP_GetHwProfInfo(pipes_struct *p,
diff --git a/source3/include/rpc_ntsvcs.h b/source3/include/rpc_ntsvcs.h
index 0056d16eb9..dc74298cb9 100644
--- a/source3/include/rpc_ntsvcs.h
+++ b/source3/include/rpc_ntsvcs.h
@@ -47,23 +47,4 @@ typedef struct {
WERROR status;
} NTSVCS_R_GET_DEVICE_LIST;
-/**************************/
-
-typedef struct {
- UNISTR2 devicepath;
- uint32 property;
- uint32 unknown2;
- uint32 buffer_size1;
- uint32 buffer_size2;
- uint32 unknown5;
-} NTSVCS_Q_GET_DEVICE_REG_PROPERTY;
-
-typedef struct {
- uint32 unknown1;
- REGVAL_BUFFER value;
- uint32 size;
- uint32 needed;
- WERROR status;
-} NTSVCS_R_GET_DEVICE_REG_PROPERTY;
-
#endif /* _RPC_NTSVCS_H */
diff --git a/source3/rpc_client/cli_reg.c b/source3/rpc_client/cli_reg.c
index ba98e25d63..2ed7119f4b 100644
--- a/source3/rpc_client/cli_reg.c
+++ b/source3/rpc_client/cli_reg.c
@@ -60,20 +60,3 @@ NTSTATUS rpccli_winreg_Connect(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
return NT_STATUS_INVALID_PARAMETER;
}
-
-/*******************************************************************
- Fill in a REGVAL_BUFFER for the data given a REGISTRY_VALUE
- *******************************************************************/
-
-uint32 reg_init_regval_buffer( REGVAL_BUFFER *buf2, REGISTRY_VALUE *val )
-{
- uint32 real_size = 0;
-
- if ( !buf2 || !val )
- return 0;
-
- real_size = regval_size(val);
- init_regval_buffer( buf2, (unsigned char*)regval_data_p(val), real_size );
-
- return real_size;
-}
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index cf989c8b5e..169e5cb560 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -558,60 +558,6 @@ bool smb_io_buffer5(const char *desc, BUFFER5 *buf5, prs_struct *ps, int depth)
}
/*******************************************************************
- Inits a REGVAL_BUFFER structure.
-********************************************************************/
-
-void init_regval_buffer(REGVAL_BUFFER *str, const uint8 *buf, size_t len)
-{
- ZERO_STRUCTP(str);
-
- /* max buffer size (allocated size) */
- str->buf_max_len = len;
- str->offset = 0;
- str->buf_len = buf != NULL ? len : 0;
-
- if (buf != NULL) {
- SMB_ASSERT(str->buf_max_len >= str->buf_len);
- str->buffer = (uint16 *)TALLOC_ZERO(talloc_tos(),
- str->buf_max_len);
- if (str->buffer == NULL)
- smb_panic("init_regval_buffer: talloc fail");
- memcpy(str->buffer, buf, str->buf_len);
- }
-}
-
-/*******************************************************************
- Reads or writes a REGVAL_BUFFER structure.
- the uni_max_len member tells you how large the buffer is.
- the uni_str_len member tells you how much of the buffer is really used.
-********************************************************************/
-
-bool smb_io_regval_buffer(const char *desc, prs_struct *ps, int depth, REGVAL_BUFFER *buf2)
-{
-
- prs_debug(ps, depth, desc, "smb_io_regval_buffer");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("buf_max_len", ps, depth, &buf2->buf_max_len))
- return False;
- if(!prs_uint32("offset ", ps, depth, &buf2->offset))
- return False;
- if(!prs_uint32("buf_len ", ps, depth, &buf2->buf_len))
- return False;
-
- /* buffer advanced by indicated length of string
- NOT by searching for null-termination */
-
- if(!prs_regval_buffer(True, "buffer ", ps, depth, buf2))
- return False;
-
- return True;
-}
-
-/*******************************************************************
creates a UNISTR2 structure: sets up the buffer, too
********************************************************************/
diff --git a/source3/rpc_parse/parse_ntsvcs.c b/source3/rpc_parse/parse_ntsvcs.c
index 2b15a45506..17b51fa751 100644
--- a/source3/rpc_parse/parse_ntsvcs.c
+++ b/source3/rpc_parse/parse_ntsvcs.c
@@ -77,71 +77,3 @@ bool ntsvcs_io_r_get_device_list(const char *desc, NTSVCS_R_GET_DEVICE_LIST *r_u
return True;
}
-
-/*******************************************************************
-********************************************************************/
-
-bool ntsvcs_io_q_get_device_reg_property(const char *desc, NTSVCS_Q_GET_DEVICE_REG_PROPERTY *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "ntsvcs_io_q_get_device_reg_property");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if ( !prs_io_unistr2("devicepath", ps, depth, &q_u->devicepath) )
- return False;
- if( !prs_align(ps) )
- return False;
-
- if ( !prs_uint32("property", ps, depth, &q_u->property) )
- return False;
- if ( !prs_uint32("unknown2", ps, depth, &q_u->unknown2) )
- return False;
- if ( !prs_uint32("buffer_size1", ps, depth, &q_u->buffer_size1) )
- return False;
- if ( !prs_uint32("buffer_size2", ps, depth, &q_u->buffer_size2) )
- return False;
- if ( !prs_uint32("unknown5", ps, depth, &q_u->unknown5) )
- return False;
-
- return True;
-
-}
-
-/*******************************************************************
-********************************************************************/
-
-bool ntsvcs_io_r_get_device_reg_property(const char *desc, NTSVCS_R_GET_DEVICE_REG_PROPERTY *r_u, prs_struct *ps, int depth)
-{
- if ( !r_u )
- return False;
-
- prs_debug(ps, depth, desc, "ntsvcs_io_r_get_device_reg_property");
- depth++;
-
- if ( !prs_align(ps) )
- return False;
-
- if ( !prs_uint32("unknown1", ps, depth, &r_u->unknown1) )
- return False;
-
- if ( !smb_io_regval_buffer("value", ps, depth, &r_u->value) )
- return False;
- if ( !prs_align(ps) )
- return False;
-
- if ( !prs_uint32("size", ps, depth, &r_u->size) )
- return False;
-
- if ( !prs_uint32("needed", ps, depth, &r_u->needed) )
- return False;
-
- if(!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index a0d3ed7397..acc0cc88ef 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -1056,39 +1056,6 @@ bool prs_buffer5(bool charmode, const char *name, prs_struct *ps, int depth, BUF
}
/******************************************************************
- Stream a "not" unicode string, length/buffer specified separately,
- in byte chars. String is in little-endian format.
- ********************************************************************/
-
-bool prs_regval_buffer(bool charmode, const char *name, prs_struct *ps, int depth, REGVAL_BUFFER *buf)
-{
- char *p;
- char *q = prs_mem_get(ps, buf->buf_len);
- if (q == NULL)
- return False;
-
- if (UNMARSHALLING(ps)) {
- if (buf->buf_len > buf->buf_max_len) {
- return False;
- }
- if ( buf->buf_max_len ) {
- buf->buffer = PRS_ALLOC_MEM(ps, uint16, buf->buf_max_len);
- if ( buf->buffer == NULL )
- return False;
- } else {
- buf->buffer = NULL;
- }
- }
-
- p = (char *)buf->buffer;
-
- dbg_rw_punival(charmode, name, depth, ps, q, p, buf->buf_len/2);
- ps->data_offset += buf->buf_len;
-
- return True;
-}
-
-/******************************************************************
Stream a string, length/buffer specified separately,
in uint8 chars.
********************************************************************/