summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-04-13 14:39:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:13 -0500
commit8ad3d8c9b065f3a2040beff801bdc9dceac868a8 (patch)
tree8c0763ba095ca5386b5b06ddb3f10a05d9a85dcf /source3/rpc_parse
parent142f5604b56240054f088dce4703c714b7065106 (diff)
downloadsamba-8ad3d8c9b065f3a2040beff801bdc9dceac868a8.tar.gz
samba-8ad3d8c9b065f3a2040beff801bdc9dceac868a8.tar.bz2
samba-8ad3d8c9b065f3a2040beff801bdc9dceac868a8.zip
r196: merging struct uuid from trunk
(This used to be commit 911a28361b9d8dd50597627f245ebfb57c6294fb)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_ds.c4
-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.c75
-rw-r--r--source3/rpc_parse/parse_samr.c4
-rw-r--r--source3/rpc_parse/parse_sec.c4
6 files changed, 65 insertions, 52 deletions
diff --git a/source3/rpc_parse/parse_ds.c b/source3/rpc_parse/parse_ds.c
index 26dcdb34b8..070f6be43a 100644
--- a/source3/rpc_parse/parse_ds.c
+++ b/source3/rpc_parse/parse_ds.c
@@ -49,7 +49,7 @@ static BOOL ds_io_dominfobasic( const char *desc, prs_struct *ps, int depth, DSR
if ( !prs_uint32("forestname_ptr", ps, depth, &p->forestname_ptr) )
return False;
- if ( !prs_uint8s(False, "domain_guid", ps, depth, p->domain_guid.info, GUID_SIZE) )
+ if ( !smb_io_uuid("domain_guid", &p->domain_guid, ps, depth) )
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 ( !prs_uint8s(False, "guid", ps, depth, trust->guid.info, GUID_SIZE) )
+ if ( !smb_io_uuid("guid", &trust->guid, ps, depth) )
return False;
return True;
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c
index d29b7bc580..5fff1fea37 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 (!prs_uint8s(False, "dom_guid", ps, depth, info->dom_guid.info, GUID_SIZE))
+ if ( !smb_io_uuid("dom_guid", &info->dom_guid, ps, depth) )
return False;
if(!prs_align(ps))
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index efb2bfa97f..cea31c88a8 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -323,6 +323,34 @@ 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 e2781b2008..69262b6d0c 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -34,7 +34,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x8a885d04, 0x1ceb, 0x11c9, \
- { 0x9f, 0xe8, 0x08, 0x00, \
+ { 0x9f, 0xe8 }, \
+ { 0x08, 0x00, \
0x2b, 0x10, 0x48, 0x60 } \
}, 0x02 \
}
@@ -43,7 +44,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x8a885d04, 0x1ceb, 0x11c9, \
- { 0x9f, 0xe8, 0x08, 0x00, \
+ { 0x9f, 0xe8 }, \
+ { 0x08, 0x00, \
0x2b, 0x10, 0x48, 0x60 } \
}, 0x02 \
}
@@ -52,7 +54,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x6bffd098, 0xa112, 0x3610, \
- { 0x98, 0x33, 0x46, 0xc3, \
+ { 0x98, 0x33 }, \
+ { 0x46, 0xc3, \
0xf8, 0x7e, 0x34, 0x5a } \
}, 0x01 \
}
@@ -61,7 +64,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x4b324fc8, 0x1670, 0x01d3, \
- { 0x12, 0x78, 0x5a, 0x47, \
+ { 0x12, 0x78 }, \
+ { 0x5a, 0x47, \
0xbf, 0x6e, 0xe1, 0x88 } \
}, 0x03 \
}
@@ -70,7 +74,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x12345778, 0x1234, 0xabcd, \
- { 0xef, 0x00, 0x01, 0x23, \
+ { 0xef, 0x00 }, \
+ { 0x01, 0x23, \
0x45, 0x67, 0x89, 0xab } \
}, 0x00 \
}
@@ -79,7 +84,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x3919286a, 0xb10c, 0x11d0, \
- { 0x9b, 0xa8, 0x00, 0xc0, \
+ { 0x9b, 0xa8 }, \
+ { 0x00, 0xc0, \
0x4f, 0xd9, 0x2e, 0xf5 } \
}, 0x00 \
}
@@ -88,7 +94,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x12345778, 0x1234, 0xabcd, \
- { 0xef, 0x00, 0x01, 0x23, \
+ { 0xef, 0x00 }, \
+ { 0x01, 0x23, \
0x45, 0x67, 0x89, 0xac } \
}, 0x01 \
}
@@ -97,7 +104,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x12345678, 0x1234, 0xabcd, \
- { 0xef, 0x00, 0x01, 0x23, \
+ { 0xef, 0x00 }, \
+ { 0x01, 0x23, \
0x45, 0x67, 0xcf, 0xfb } \
}, 0x01 \
}
@@ -106,7 +114,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x338cd001, 0x2244, 0x31f1, \
- { 0xaa, 0xaa, 0x90, 0x00, \
+ { 0xaa, 0xaa }, \
+ { 0x90, 0x00, \
0x38, 0x00, 0x10, 0x03 } \
}, 0x01 \
}
@@ -115,7 +124,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x12345678, 0x1234, 0xabcd, \
- { 0xef, 0x00, 0x01, 0x23, \
+ { 0xef, 0x00 }, \
+ { 0x01, 0x23, \
0x45, 0x67, 0x89, 0xab } \
}, 0x01 \
}
@@ -124,7 +134,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x0, 0x0, 0x0, \
- { 0x00, 0x00, 0x00, 0x00, \
+ { 0x00, 0x00 }, \
+ { 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00 } \
}, 0x00 \
}
@@ -133,7 +144,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x4fc742e0, 0x4a10, 0x11cf, \
- { 0x82, 0x73, 0x00, 0xaa, \
+ { 0x82, 0x73 }, \
+ { 0x00, 0xaa, \
0x00, 0x4a, 0xe6, 0x73 } \
}, 0x03 \
}
@@ -142,7 +154,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x60a15ec5, 0x4de8, 0x11d7, \
- { 0xa6, 0x37, 0x00, 0x50, \
+ { 0xa6, 0x37 }, \
+ { 0x00, 0x50, \
0x56, 0xa2, 0x01, 0x82 } \
}, 0x01 \
}
@@ -151,7 +164,8 @@ interface/version dce/rpc pipe identification
{ \
{ \
0x894de0c0, 0x0d55, 0x11d3, \
- { 0xa3, 0x22, 0x00, 0xc0, \
+ { 0xa3, 0x22 }, \
+ { 0x00, 0xc0, \
0x4f, 0xa3, 0x21, 0xa1 } \
}, 0x01 \
}
@@ -253,34 +267,6 @@ 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.
********************************************************************/
@@ -292,7 +278,10 @@ 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 (!smb_io_rpc_uuid( "uuid", &ifc->uuid, ps, depth))
+ if (!prs_align(ps))
+ return False;
+
+ if (!smb_io_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 34b0cf2848..287dc3bd7f 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -5315,10 +5315,6 @@ 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 bf43ef288a..a78627650a 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 (!prs_uint8s(False, "obj_guid", ps, depth, psa->obj_guid.info, GUID_SIZE))
+ if (!smb_io_uuid("obj_guid", &psa->obj_guid, ps,depth))
return False;
if (psa->obj_flags & SEC_ACE_OBJECT_INHERITED_PRESENT)
- if (!prs_uint8s(False, "inh_guid", ps, depth, psa->inh_guid.info, GUID_SIZE))
+ if (!smb_io_uuid("inh_guid", &psa->inh_guid, ps,depth))
return False;
if(!smb_io_dom_sid("trustee ", &psa->trustee , ps, depth))