summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_ds.c6
-rw-r--r--source3/rpc_parse/parse_epmapper.c482
-rw-r--r--source3/rpc_parse/parse_lsa.c2
-rw-r--r--source3/rpc_parse/parse_misc.c28
-rw-r--r--source3/rpc_parse/parse_rpc.c108
-rw-r--r--source3/rpc_parse/parse_samr.c4
-rw-r--r--source3/rpc_parse/parse_sec.c4
7 files changed, 64 insertions, 570 deletions
diff --git a/source3/rpc_parse/parse_ds.c b/source3/rpc_parse/parse_ds.c
index 8d894b6c6a..26dcdb34b8 100644
--- a/source3/rpc_parse/parse_ds.c
+++ b/source3/rpc_parse/parse_ds.c
@@ -48,8 +48,8 @@ static BOOL ds_io_dominfobasic( const char *desc, prs_struct *ps, int depth, DSR
return False;
if ( !prs_uint32("forestname_ptr", ps, depth, &p->forestname_ptr) )
return False;
-
- if ( !smb_io_uuid("domain_guid", &p->domain_guid, ps, depth) )
+
+ if ( !prs_uint8s(False, "domain_guid", ps, depth, p->domain_guid.info, GUID_SIZE) )
return False;
if ( !smb_io_unistr2( "netbios_domain", &p->netbios_domain, p->netbios_ptr, ps, depth) )
@@ -179,7 +179,7 @@ static BOOL ds_io_domain_trusts( const char *desc, prs_struct *ps, int depth, DS
if ( !prs_uint32( "sid_ptr", ps, depth, &trust->sid_ptr ) )
return False;
- if ( !smb_io_uuid("guid", &trust->guid, ps, depth) )
+ if ( !prs_uint8s(False, "guid", ps, depth, trust->guid.info, GUID_SIZE) )
return False;
return True;
diff --git a/source3/rpc_parse/parse_epmapper.c b/source3/rpc_parse/parse_epmapper.c
deleted file mode 100644
index bc2cd17503..0000000000
--- a/source3/rpc_parse/parse_epmapper.c
+++ /dev/null
@@ -1,482 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
- Samba end point mapper functions
- Copyright (C) Jim McDonough (jmcd@us.ibm.com) 2003.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include "includes.h"
-
-#undef DBGC_CLASS
-#define DBGC_CLASS DBGC_RPC_PARSE
-
-static uint32 internal_referent_id = 0;
-
-
-/*******************************************************************
- Reads or writes a handle.
-********************************************************************/
-BOOL epm_io_handle(const char *desc, EPM_HANDLE *handle, prs_struct *ps,
- int depth)
-{
- if (!prs_align(ps))
- return False;
-
- if (!prs_uint8s(False, "data", ps, depth, handle->data,
- sizeof(handle->data)))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- inits an EPM_FLOOR structure.
-********************************************************************/
-NTSTATUS init_epm_floor(EPM_FLOOR *efloor, uint8 protocol)
-{
- /* handle lhs */
- efloor->lhs.protocol = protocol;
- efloor->lhs.length = sizeof(efloor->lhs.protocol);
-
- switch(efloor->lhs.protocol) {
- case EPM_FLOOR_UUID:
- efloor->lhs.length += sizeof(efloor->lhs.uuid.uuid);
- efloor->lhs.length += sizeof(efloor->lhs.uuid.version);
- break;
- default:
- break;
- }
-
- /* handle rhs */
- switch(efloor->lhs.protocol) {
- case EPM_FLOOR_RPC:
- case EPM_FLOOR_UUID:
- efloor->rhs.length = sizeof(efloor->rhs.unknown);
- break;
- case EPM_FLOOR_TCP:
- efloor->rhs.length = sizeof(efloor->rhs.tcp.port);
- break;
- case EPM_FLOOR_IP:
- efloor->rhs.length = sizeof(efloor->rhs.ip.addr);
- break;
- case EPM_FLOOR_NMPIPES:
- case EPM_FLOOR_LRPC:
- case EPM_FLOOR_NETBIOS:
- efloor->rhs.length = strlen(efloor->rhs.string) + 1;
- break;
- default:
- break;
- }
-
- return NT_STATUS_OK;
-}
-
-/*******************************************************************
- inits an EPM_FLOOR structure with a UUID
-********************************************************************/
-NTSTATUS init_epm_floor_uuid(EPM_FLOOR *efloor,
- const struct uuid uuid, uint16 version)
-{
- memcpy(&efloor->lhs.uuid.uuid, &uuid, sizeof(uuid));
- efloor->lhs.uuid.version = version;
- efloor->rhs.unknown = 0;
- return init_epm_floor(efloor, EPM_FLOOR_UUID);
-}
-
-/*******************************************************************
- inits an EPM_FLOOR structure for RPC
-********************************************************************/
-NTSTATUS init_epm_floor_rpc(EPM_FLOOR *efloor)
-{
- efloor->rhs.unknown = 0;
- return init_epm_floor(efloor, EPM_FLOOR_RPC);
-}
-
-/*******************************************************************
- inits an EPM_FLOOR structure for TCP
-********************************************************************/
-NTSTATUS init_epm_floor_tcp(EPM_FLOOR *efloor, uint16 port)
-{
- efloor->rhs.tcp.port = htons(port);
- return init_epm_floor(efloor, EPM_FLOOR_TCP);
-}
-
-/*******************************************************************
- inits an EPM_FLOOR structure for IP
-********************************************************************/
-NTSTATUS init_epm_floor_ip(EPM_FLOOR *efloor, uint8 addr[4])
-{
- memcpy(&efloor->rhs.ip.addr, addr, sizeof(addr));
- return init_epm_floor(efloor, EPM_FLOOR_IP);
-}
-
-/*******************************************************************
- inits an EPM_FLOOR structure for named pipe
-********************************************************************/
-NTSTATUS init_epm_floor_np(EPM_FLOOR *efloor, const char *pipe_name)
-{
- safe_strcpy(efloor->rhs.string, pipe_name, sizeof(efloor->rhs.string)-1);
- return init_epm_floor(efloor, EPM_FLOOR_NMPIPES);
-}
-
-/*******************************************************************
- inits an EPM_FLOOR structure for named pipe
-********************************************************************/
-NTSTATUS init_epm_floor_lrpc(EPM_FLOOR *efloor, const char *pipe_name)
-{
- safe_strcpy(efloor->rhs.string, pipe_name, sizeof(efloor->rhs.string)-1);
- return init_epm_floor(efloor, EPM_FLOOR_LRPC);
-}
-
-/*******************************************************************
- inits an EPM_FLOOR structure for named pipe
-********************************************************************/
-NTSTATUS init_epm_floor_nb(EPM_FLOOR *efloor, char *host_name)
-{
- safe_strcpy(efloor->rhs.string, host_name, sizeof(efloor->rhs.string)-1);
- return init_epm_floor(efloor, EPM_FLOOR_NETBIOS);
-}
-
-/*******************************************************************
- reads and writes EPM_FLOOR.
-********************************************************************/
-BOOL epm_io_floor(const char *desc, EPM_FLOOR *efloor,
- prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "epm_io_floor");
- depth++;
-
- if (!prs_uint16("lhs_length", ps, depth, &efloor->lhs.length))
- return False;
- if (!prs_uint8("protocol", ps, depth, &efloor->lhs.protocol))
- return False;
-
- switch (efloor->lhs.protocol) {
- case EPM_FLOOR_UUID:
- if (!smb_io_uuid("uuid", &efloor->lhs.uuid.uuid, ps, depth))
- return False;
- if (!prs_uint16("version", ps, depth,
- &efloor->lhs.uuid.version))
- return False;
- break;
- }
-
- if (!prs_uint16("rhs_length", ps, depth, &efloor->rhs.length))
- return False;
-
- switch (efloor->lhs.protocol) {
- case EPM_FLOOR_UUID:
- case EPM_FLOOR_RPC:
- if (!prs_uint16("unknown", ps, depth, &efloor->rhs.unknown))
- return False;
- break;
- case EPM_FLOOR_TCP:
- if (!prs_uint16("tcp_port", ps, depth, &efloor->rhs.tcp.port))
- return False;
- break;
- case EPM_FLOOR_IP:
- if (!prs_uint8s(False, "ip_addr", ps, depth,
- efloor->rhs.ip.addr,
- sizeof(efloor->rhs.ip.addr)))
- return False;
- break;
- case EPM_FLOOR_NMPIPES:
- case EPM_FLOOR_LRPC:
- case EPM_FLOOR_NETBIOS:
- if (!prs_uint8s(False, "string", ps, depth,
- efloor->rhs.string,
- efloor->rhs.length))
- return False;
- break;
- default:
- break;
- }
-
- return True;
-}
-
-/*******************************************************************
- Inits a EPM_TOWER structure.
-********************************************************************/
-NTSTATUS init_epm_tower(TALLOC_CTX *ctx, EPM_TOWER *tower,
- const EPM_FLOOR *floors, int num_floors)
-{
- int size = 0;
- int i;
-
- DEBUG(5, ("init_epm_tower\n"));
-
- size += sizeof(uint16); /* number of floors is in tower length */
- for (i = 0; i < num_floors; i++) {
- size += (sizeof(uint16) * 2);
- size += floors[i].lhs.length;
- size += floors[i].rhs.length;
- }
-
- tower->max_length = tower->length = size;
- tower->num_floors = num_floors;
- tower->floors = talloc(ctx, sizeof(EPM_FLOOR) * num_floors);
- if (!tower->floors) {
- return NT_STATUS_NO_MEMORY;
- }
- memcpy(tower->floors, floors, sizeof(EPM_FLOOR) * num_floors);
- tower->unknown = 0x7e;
-
- return NT_STATUS_OK;
-}
-
-/*******************************************************************
- Reads or writes an EPM_TOWER structure.
-********************************************************************/
-BOOL epm_io_tower(const char *desc, EPM_TOWER *tower,
- prs_struct *ps, int depth)
-{
- int i;
-
- prs_debug(ps, depth, desc, "epm_io_tower");
- depth++;
-
- if (!prs_align(ps))
- return False;
-
- if (!prs_uint32("max_length", ps, depth, &tower->max_length))
- return False;
- if (!prs_uint32("length", ps, depth, &tower->length))
- return False;
- if (!prs_uint16("num_floors", ps, depth, &tower->num_floors))
- return False;
-
- if (UNMARSHALLING(ps)) {
- tower->floors = talloc(ps->mem_ctx,
- sizeof(EPM_FLOOR) * tower->num_floors);
- if (!tower->floors)
- return False;
- }
-
- for (i = 0; i < tower->num_floors; i++) {
- if (!epm_io_floor("floor", tower->floors + i, ps, depth))
- return False;
- }
-
- return True;
-}
-
-/*******************************************************************
- Initialize an EPM_TOWER_ARRAY structure
-********************************************************************/
-NTSTATUS init_epm_tower_array(TALLOC_CTX *ctx, EPM_TOWER_ARRAY *array,
- const EPM_TOWER *towers, int num_towers)
-{
- int i;
-
- array->max_count = num_towers;
- array->offset = 0;
- array->count = num_towers;
- array->tower_ref_ids = talloc(ctx, sizeof(uint32) * num_towers);
- if (!array->tower_ref_ids) {
- return NT_STATUS_NO_MEMORY;
- }
- for (i=0;i<num_towers;i++)
- array->tower_ref_ids[i] = ++internal_referent_id;
-
- array->towers = talloc(ctx, sizeof(EPM_TOWER) * num_towers);
- if (!array->towers) {
- return NT_STATUS_NO_MEMORY;
- }
- memcpy(array->towers, towers, sizeof(EPM_TOWER) * num_towers);
-
- return NT_STATUS_OK;
-}
-
-/*******************************************************************
- Reads or writes an EPM_TOWER_ARRAY structure.
-********************************************************************/
-BOOL epm_io_tower_array(const char *desc, EPM_TOWER_ARRAY *array,
- prs_struct *ps, int depth)
-{
- int i;
-
- prs_debug(ps, depth, desc, "epm_io_tower_array");
- depth++;
-
- if (!prs_uint32("max_count", ps, depth, &array->max_count))
- return False;
- if (!prs_uint32("offset", ps, depth, &array->offset))
- return False;
- if (!prs_uint32("count", ps, depth, &array->count))
- return False;
-
-
- if (UNMARSHALLING(ps)) {
- array->tower_ref_ids = talloc(ps->mem_ctx,
- sizeof(uint32) * array->count);
- if (!array->tower_ref_ids) {
- return False;
- }
- }
- for (i=0; i < array->count; i++) {
- if (!prs_uint32("ref_id", ps, depth, &array->tower_ref_ids[i])) {
- return False;
- } else {
- if (array->tower_ref_ids[i] > internal_referent_id) {
- internal_referent_id = array->tower_ref_ids[i];
- }
- }
- }
-
-
-
- if (!prs_set_offset(ps, prs_offset(ps) + array->offset))
- return False;
-
- if (UNMARSHALLING(ps)) {
- array->towers = talloc(ps->mem_ctx,
- sizeof(EPM_TOWER) * array->count);
- if (!array->towers) {
- return False;
- }
- }
-
- for (i = 0; i < array->count; i++) {
- if (!epm_io_tower("tower", &array->towers[i], ps, depth))
- return False;
- }
-
- return True;
-}
-
-/*******************************************************************
- Initialize EPM_R_MAP structure
-******************************************************************/
-NTSTATUS init_epm_r_map(TALLOC_CTX *ctx, EPM_R_MAP *r_map,
- const EPM_HANDLE *handle, const EPM_TOWER_ARRAY *array,
- int num_elements, uint32 status)
-{
- memcpy(&r_map->handle, handle, sizeof(*handle));
- r_map->num_results = num_elements;
- r_map->results = talloc(ctx, sizeof(EPM_TOWER_ARRAY) * num_elements);
- if (!r_map->results) {
- return NT_STATUS_NO_MEMORY;
- }
- memcpy(r_map->results, array, sizeof(EPM_TOWER_ARRAY) * num_elements);
- r_map->status = status;
- return NT_STATUS_OK;
-}
-
-/*************************************************************************
- Inits a EPM_Q_MAP structure.
-**************************************************************************
-* We attempt to hide the ugliness of the wire format by taking a EPM_TOWER
-* array with a defined size
-**************************************************************************/
-NTSTATUS init_epm_q_map(TALLOC_CTX *ctx, EPM_Q_MAP *q_map,
- const EPM_TOWER *towers, int num_towers)
-{
- static uint32 handle = 1;
-
- ZERO_STRUCTP(q_map);
-
- DEBUG(5, ("init_epm_q_map\n"));
- q_map->handle.data[0] = (handle >> 0) & 0xFF;
- q_map->handle.data[1] = (handle >> 8) & 0xFF;
- q_map->handle.data[2] = (handle >> 16) & 0xFF;
- q_map->handle.data[3] = (handle >> 24) & 0xFF;
-
- q_map->tower = talloc(ctx, sizeof(EPM_TOWER) * (num_towers + 1));
- if (!q_map->tower) {
- return NT_STATUS_NO_MEMORY;
- }
-
- memcpy(q_map->tower, towers, sizeof(EPM_TOWER) * num_towers);
-
- ZERO_STRUCT(q_map->tower[num_towers]);
-
- /* For now let's not take more than 4 towers per result */
- q_map->max_towers = num_towers * 4;
-
- q_map->tower_ref_id = ++internal_referent_id;
-
- handle++;
-
- return NT_STATUS_OK;
-}
-
-/*****************************************************************
- epm_io_q_map - read or write EPM_Q_MAP structure
-******************************************************************/
-BOOL epm_io_q_map(const char *desc, EPM_Q_MAP *io_map, prs_struct *ps,
- int depth)
-{
- prs_debug(ps, depth, desc, "epm_io_q_map");
- depth++;
-
- if (!epm_io_handle("handle", &io_map->handle, ps, depth))
- return False;
-
- if (!prs_uint32("referent_id", ps, 0, &io_map->tower_ref_id))
- return False;
- if (io_map->tower_ref_id > internal_referent_id)
- internal_referent_id = io_map->tower_ref_id;
-
- /* HACK: We need a more elegant way of doing this */
- if (UNMARSHALLING(ps)) {
- io_map->tower = talloc(ps->mem_ctx, sizeof(EPM_TOWER));
- if (!io_map->tower)
- return False;
- }
- if (!epm_io_tower("tower", io_map->tower, ps, depth))
- return False;
- if (!epm_io_handle("term_handle", &io_map->term_handle, ps, depth))
- return False;
-
- if (!prs_uint32("max_towers", ps, 0, &io_map->max_towers))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- epm_io_r_map - Read/Write EPM_R_MAP structure
-******************************************************************/
-BOOL epm_io_r_map(const char *desc, EPM_R_MAP *io_map,
- prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "epm_io_r_map");
- depth++;
-
- if (!epm_io_handle("handle", &io_map->handle, ps, depth))
- return False;
- if (!prs_uint32("num_results", ps, depth, &io_map->num_results))
- return False;
-
- if (UNMARSHALLING(ps)) {
- io_map->results = talloc(ps->mem_ctx,
- sizeof(EPM_TOWER_ARRAY) *
- io_map->num_results);
- if (!io_map->results)
- return False;
- }
- if (!epm_io_tower_array("results", io_map->results, ps, depth))
- return False;
-
- if (!prs_align(ps))
- return False;
-
- if (!prs_uint32("status", ps, depth, &io_map->status))
- return False;
-
- return True;
-}
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c
index 5fff1fea37..d29b7bc580 100644
--- a/source3/rpc_parse/parse_lsa.c
+++ b/source3/rpc_parse/parse_lsa.c
@@ -2142,7 +2142,7 @@ BOOL lsa_io_dns_dom_info(const char *desc, LSA_DNS_DOM_INFO *info,
if(!prs_align(ps))
return False;
- if ( !smb_io_uuid("dom_guid", &info->dom_guid, ps, depth) )
+ if (!prs_uint8s(False, "dom_guid", ps, depth, info->dom_guid.info, GUID_SIZE))
return False;
if(!prs_align(ps))
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index cea31c88a8..efb2bfa97f 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -323,34 +323,6 @@ BOOL smb_io_dom_sid2(const char *desc, DOM_SID2 *sid, prs_struct *ps, int depth)
}
/*******************************************************************
- Reads or writes a struct uuid
-********************************************************************/
-
-BOOL smb_io_uuid(const char *desc, struct uuid *uuid,
- prs_struct *ps, int depth)
-{
- if (uuid == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "smb_io_uuid");
- depth++;
-
- if(!prs_uint32 ("data ", ps, depth, &uuid->time_low))
- return False;
- if(!prs_uint16 ("data ", ps, depth, &uuid->time_mid))
- return False;
- if(!prs_uint16 ("data ", ps, depth, &uuid->time_hi_and_version))
- return False;
-
- if(!prs_uint8s (False, "data ", ps, depth, uuid->clock_seq, sizeof(uuid->clock_seq)))
- return False;
- if(!prs_uint8s (False, "data ", ps, depth, uuid->node, sizeof(uuid->node)))
- return False;
-
- return True;
-}
-
-/*******************************************************************
creates a STRHDR structure.
********************************************************************/
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index 696f258e5d..e2781b2008 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -34,9 +34,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x8a885d04, 0x1ceb, 0x11c9, \
- { 0x9f, 0xe8 }, \
- { 0x08, 0x00, \
- 0x2b, 0x10, 0x48, 0x60 } \
+ { 0x9f, 0xe8, 0x08, 0x00, \
+ 0x2b, 0x10, 0x48, 0x60 } \
}, 0x02 \
}
@@ -44,9 +43,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x8a885d04, 0x1ceb, 0x11c9, \
- { 0x9f, 0xe8 }, \
- { 0x08, 0x00, \
- 0x2b, 0x10, 0x48, 0x60 } \
+ { 0x9f, 0xe8, 0x08, 0x00, \
+ 0x2b, 0x10, 0x48, 0x60 } \
}, 0x02 \
}
@@ -54,9 +52,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x6bffd098, 0xa112, 0x3610, \
- { 0x98, 0x33 }, \
- { 0x46, 0xc3, \
- 0xf8, 0x7e, 0x34, 0x5a } \
+ { 0x98, 0x33, 0x46, 0xc3, \
+ 0xf8, 0x7e, 0x34, 0x5a } \
}, 0x01 \
}
@@ -64,9 +61,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x4b324fc8, 0x1670, 0x01d3, \
- { 0x12, 0x78 }, \
- { 0x5a, 0x47, \
- 0xbf, 0x6e, 0xe1, 0x88 } \
+ { 0x12, 0x78, 0x5a, 0x47, \
+ 0xbf, 0x6e, 0xe1, 0x88 } \
}, 0x03 \
}
@@ -74,9 +70,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x12345778, 0x1234, 0xabcd, \
- { 0xef, 0x00 }, \
- { 0x01, 0x23, \
- 0x45, 0x67, 0x89, 0xab } \
+ { 0xef, 0x00, 0x01, 0x23, \
+ 0x45, 0x67, 0x89, 0xab } \
}, 0x00 \
}
@@ -84,9 +79,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x3919286a, 0xb10c, 0x11d0, \
- { 0x9b, 0xa8 }, \
- { 0x00, 0xc0, \
- 0x4f, 0xd9, 0x2e, 0xf5 } \
+ { 0x9b, 0xa8, 0x00, 0xc0, \
+ 0x4f, 0xd9, 0x2e, 0xf5 } \
}, 0x00 \
}
@@ -94,9 +88,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x12345778, 0x1234, 0xabcd, \
- { 0xef, 0x00 }, \
- { 0x01, 0x23, \
- 0x45, 0x67, 0x89, 0xac } \
+ { 0xef, 0x00, 0x01, 0x23, \
+ 0x45, 0x67, 0x89, 0xac } \
}, 0x01 \
}
@@ -104,9 +97,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x12345678, 0x1234, 0xabcd, \
- { 0xef, 0x00 }, \
- { 0x01, 0x23, \
- 0x45, 0x67, 0xcf, 0xfb } \
+ { 0xef, 0x00, 0x01, 0x23, \
+ 0x45, 0x67, 0xcf, 0xfb } \
}, 0x01 \
}
@@ -114,9 +106,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x338cd001, 0x2244, 0x31f1, \
- { 0xaa, 0xaa }, \
- { 0x90, 0x00, \
- 0x38, 0x00, 0x10, 0x03 } \
+ { 0xaa, 0xaa, 0x90, 0x00, \
+ 0x38, 0x00, 0x10, 0x03 } \
}, 0x01 \
}
@@ -124,9 +115,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x12345678, 0x1234, 0xabcd, \
- { 0xef, 0x00 }, \
- { 0x01, 0x23, \
- 0x45, 0x67, 0x89, 0xab } \
+ { 0xef, 0x00, 0x01, 0x23, \
+ 0x45, 0x67, 0x89, 0xab } \
}, 0x01 \
}
@@ -134,9 +124,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x0, 0x0, 0x0, \
- { 0x00, 0x00 }, \
- { 0x00, 0x00, \
- 0x00, 0x00, 0x00, 0x00 } \
+ { 0x00, 0x00, 0x00, 0x00, \
+ 0x00, 0x00, 0x00, 0x00 } \
}, 0x00 \
}
@@ -144,8 +133,7 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x4fc742e0, 0x4a10, 0x11cf, \
- { 0x82, 0x73 }, \
- { 0x00, 0xaa, \
+ { 0x82, 0x73, 0x00, 0xaa, \
0x00, 0x4a, 0xe6, 0x73 } \
}, 0x03 \
}
@@ -154,8 +142,7 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x60a15ec5, 0x4de8, 0x11d7, \
- { 0xa6, 0x37 }, \
- { 0x00, 0x50, \
+ { 0xa6, 0x37, 0x00, 0x50, \
0x56, 0xa2, 0x01, 0x82 } \
}, 0x01 \
}
@@ -164,22 +151,11 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x894de0c0, 0x0d55, 0x11d3, \
- { 0xa3, 0x22 }, \
- { 0x00, 0xc0, \
+ { 0xa3, 0x22, 0x00, 0xc0, \
0x4f, 0xa3, 0x21, 0xa1 } \
}, 0x01 \
}
-#define SYNT_EPM_V3 \
-{ \
- { \
- 0xe1af8308, 0x5d1f, 0x11c9, \
- { 0x91, 0xa4 }, \
- { 0x08, 0x00, \
- 0x2b, 0x14, 0xa0, 0xfa } \
- }, 0x03 \
-}
-
/*
* IMPORTANT!! If you update this structure, make sure to
* update the index #defines in smb.h.
@@ -199,7 +175,6 @@ const struct pipe_id_info pipe_names [] =
{ PIPE_NETDFS , SYNT_NETDFS_V3 , PIPE_NETDFS , TRANS_SYNT_V2 },
{ PIPE_ECHO , SYNT_ECHO_V1 , PIPE_ECHO , TRANS_SYNT_V2 },
{ PIPE_SHUTDOWN, SYNT_SHUTDOWN_V1 , PIPE_SHUTDOWN , TRANS_SYNT_V2 },
- { PIPE_EPM , SYNT_EPM_V3 , PIPE_EPM , TRANS_SYNT_V2 },
{ NULL , SYNT_NONE_V0 , NULL , SYNT_NONE_V0 }
};
@@ -278,6 +253,34 @@ BOOL smb_io_rpc_hdr(const char *desc, RPC_HDR *rpc, prs_struct *ps, int depth)
}
/*******************************************************************
+ Reads or writes an RPC_UUID structure.
+********************************************************************/
+
+static BOOL smb_io_rpc_uuid(const char *desc, RPC_UUID *uuid, prs_struct *ps, int depth)
+{
+ if (uuid == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "smb_io_rpc_uuid");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!prs_uint32 ("data ", ps, depth, &uuid->time_low))
+ return False;
+ if(!prs_uint16 ("data ", ps, depth, &uuid->time_mid))
+ return False;
+ if(!prs_uint16 ("data ", ps, depth, &uuid->time_hi_and_version))
+ return False;
+
+ if(!prs_uint8s (False, "data ", ps, depth, uuid->remaining, sizeof(uuid->remaining)))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
Reads or writes an RPC_IFACE structure.
********************************************************************/
@@ -289,10 +292,7 @@ static BOOL smb_io_rpc_iface(const char *desc, RPC_IFACE *ifc, prs_struct *ps, i
prs_debug(ps, depth, desc, "smb_io_rpc_iface");
depth++;
- if (!prs_align(ps))
- return False;
-
- if (!smb_io_uuid( "uuid", &ifc->uuid, ps, depth))
+ if (!smb_io_rpc_uuid( "uuid", &ifc->uuid, ps, depth))
return False;
if(!prs_uint32 ("version", ps, depth, &ifc->version))
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index 287dc3bd7f..34b0cf2848 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -5315,6 +5315,10 @@ static BOOL sam_io_user_info11(const char *desc, SAM_USER_INFO_11 * usr,
/*************************************************************************
init_sam_user_infoa
+
+ unknown_5 = 0x0001 0000
+ unknown_6 = 0x0000 04ec
+
*************************************************************************/
void init_sam_user_info24(SAM_USER_INFO_24 * usr, char newpass[516], uint16 pw_len)
diff --git a/source3/rpc_parse/parse_sec.c b/source3/rpc_parse/parse_sec.c
index a78627650a..bf43ef288a 100644
--- a/source3/rpc_parse/parse_sec.c
+++ b/source3/rpc_parse/parse_sec.c
@@ -83,11 +83,11 @@ BOOL sec_io_ace(const char *desc, SEC_ACE *psa, prs_struct *ps, int depth)
return False;
if (psa->obj_flags & SEC_ACE_OBJECT_PRESENT)
- if (!smb_io_uuid("obj_guid", &psa->obj_guid, ps,depth))
+ if (!prs_uint8s(False, "obj_guid", ps, depth, psa->obj_guid.info, GUID_SIZE))
return False;
if (psa->obj_flags & SEC_ACE_OBJECT_INHERITED_PRESENT)
- if (!smb_io_uuid("inh_guid", &psa->inh_guid, ps,depth))
+ if (!prs_uint8s(False, "inh_guid", ps, depth, psa->inh_guid.info, GUID_SIZE))
return False;
if(!smb_io_dom_sid("trustee ", &psa->trustee , ps, depth))