diff options
-rw-r--r-- | source3/include/ntdomain.h | 16 | ||||
-rw-r--r-- | source3/include/rpc_dce.h | 18 | ||||
-rw-r--r-- | source3/include/rpc_ds.h | 4 | ||||
-rw-r--r-- | source3/include/rpc_epmapper.h | 2 | ||||
-rw-r--r-- | source3/lib/util_sid.c | 17 | ||||
-rw-r--r-- | source3/lib/util_uuid.c | 64 | ||||
-rw-r--r-- | source3/libads/ldap.c | 12 | ||||
-rw-r--r-- | source3/passdb/secrets.c | 21 | ||||
-rw-r--r-- | source3/rpc_parse/parse_ds.c | 6 | ||||
-rw-r--r-- | source3/rpc_parse/parse_epmapper.c | 6 | ||||
-rw-r--r-- | source3/rpc_parse/parse_rpc.c | 82 | ||||
-rw-r--r-- | source3/rpc_server/srv_epmapper_nt.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/srv_pipe.c | 4 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 5 | ||||
-rw-r--r-- | source3/rpcclient/cmd_epmapper.c | 18 | ||||
-rw-r--r-- | source3/rpcclient/cmd_lsarpc.c | 7 | ||||
-rw-r--r-- | source3/utils/net_ads_cldap.c | 10 |
17 files changed, 141 insertions, 153 deletions
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index 5da6d86410..d9fff4d2a9 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -23,6 +23,22 @@ #ifndef _NT_DOMAIN_H /* _NT_DOMAIN_H */ #define _NT_DOMAIN_H +struct uuid +{ + uint32 time_low; + uint16 time_mid; + uint16 time_hi_and_version; + uint8 clock_seq[2]; + uint8 node[6]; +}; +#define UUID_SIZE 16 + +#define UUID_FLAT_SIZE 16 +typedef struct uuid_flat +{ + uint8 info[UUID_FLAT_SIZE]; +} UUID_FLAT; + /* dce/rpc support */ #include "rpc_dce.h" diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h index 52fe08d875..8266fc861f 100644 --- a/source3/include/rpc_dce.h +++ b/source3/include/rpc_dce.h @@ -87,29 +87,15 @@ enum netsec_direction /* #define MAX_PDU_FRAG_LEN 0x1630 this is what wnt sets */ #define MAX_PDU_FRAG_LEN 0x10b8 /* this is what w2k sets */ -/* - * Actual structure of a DCE UUID - */ - -typedef struct rpc_uuid -{ - uint32 time_low; - uint16 time_mid; - uint16 time_hi_and_version; - uint8 remaining[8]; -} RPC_UUID; - -#define RPC_UUID_LEN 16 - /* RPC_IFACE */ typedef struct rpc_iface_info { - RPC_UUID uuid; /* 16 bytes of rpc interface identification */ + struct uuid uuid; /* 16 bytes of rpc interface identification */ uint32 version; /* the interface version number */ } RPC_IFACE; -#define RPC_IFACE_LEN (RPC_UUID_LEN + 4) +#define RPC_IFACE_LEN (UUID_SIZE + 4) struct pipe_id_info { diff --git a/source3/include/rpc_ds.h b/source3/include/rpc_ds.h index e2622be532..4d3f5416ac 100644 --- a/source3/include/rpc_ds.h +++ b/source3/include/rpc_ds.h @@ -64,7 +64,7 @@ typedef struct uint32 dnsname_ptr; uint32 forestname_ptr; - GUID domain_guid; + struct uuid domain_guid; UNISTR2 netbios_domain; @@ -110,7 +110,7 @@ typedef struct { uint32 trust_type; uint32 trust_attributes; uint32 sid_ptr; - GUID guid; + struct uuid guid; UNISTR2 netbios_domain; UNISTR2 dns_domain; diff --git a/source3/include/rpc_epmapper.h b/source3/include/rpc_epmapper.h index de3a2cb08d..bbca6ac1f2 100644 --- a/source3/include/rpc_epmapper.h +++ b/source3/include/rpc_epmapper.h @@ -51,7 +51,7 @@ typedef struct uint16 length; uint8 protocol; struct { - RPC_UUID uuid; + struct uuid uuid; uint16 version; } uuid; } lhs; diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c index 50bbb4c72c..2c0bd79785 100644 --- a/source3/lib/util_sid.c +++ b/source3/lib/util_sid.c @@ -617,23 +617,6 @@ char *sid_binstring(const DOM_SID *sid) return s; } - -/***************************************************************** - Print a GUID structure for debugging. -*****************************************************************/ - -void print_guid(GUID *guid) -{ - int i; - - d_printf("%08x-%04x-%04x", - IVAL(guid->info, 0), SVAL(guid->info, 4), SVAL(guid->info, 6)); - d_printf("-%02x%02x-", guid->info[8], guid->info[9]); - for (i=10;i<GUID_SIZE;i++) - d_printf("%02x", guid->info[i]); - d_printf("\n"); -} - /******************************************************************* Tallocs a duplicate SID. ********************************************************************/ diff --git a/source3/lib/util_uuid.c b/source3/lib/util_uuid.c index 56f0ecd85b..8217006e58 100644 --- a/source3/lib/util_uuid.c +++ b/source3/lib/util_uuid.c @@ -27,57 +27,47 @@ #define TIME_OFFSET_HIGH 0x01B21DD2 #define TIME_OFFSET_LOW 0x13814000 -struct uuid { - uint32 time_low; - uint16 time_mid; - uint16 time_hi_and_version; - uint8 clock_seq[2]; - uint8 node[6]; -}; - - -static void uuid_pack(const struct uuid *uu, GUID *ptr) +void smb_uuid_pack(const struct uuid *uu, UUID_FLAT *ptr) { - uint8 *out = ptr->info; + SIVAL(ptr, 0, uu->time_low); + SSVAL(ptr, 4, uu->time_mid); + SSVAL(ptr, 6, uu->time_hi_and_version); + memcpy(ptr+8, uu->clock_seq, 2); + memcpy(ptr+10, uu->node, 6); +} - SIVAL(out, 0, uu->time_low); - SSVAL(out, 4, uu->time_mid); - SSVAL(out, 6, uu->time_hi_and_version); - memcpy(out+8, uu->clock_seq, 2); - memcpy(out+10, uu->node, 6); +void smb_uuid_unpack(const UUID_FLAT in, struct uuid *uu) +{ + uu->time_low = IVAL(in.info, 0); + uu->time_mid = SVAL(in.info, 4); + uu->time_hi_and_version = SVAL(in.info, 6); + memcpy(uu->clock_seq, in.info+8, 2); + memcpy(uu->node, in.info+10, 6); } -static void uuid_unpack(const GUID in, struct uuid *uu) +const struct uuid smb_uuid_unpack_static(const UUID_FLAT in) { - const uint8 *ptr = in.info; + static struct uuid uu; - uu->time_low = IVAL(ptr, 0); - uu->time_mid = SVAL(ptr, 4); - uu->time_hi_and_version = SVAL(ptr, 6); - memcpy(uu->clock_seq, ptr+8, 2); - memcpy(uu->node, ptr+10, 6); + smb_uuid_unpack(in, &uu); + return uu; } -void smb_uuid_generate_random(GUID *out) +void smb_uuid_generate_random(struct uuid *uu) { - GUID tmp; - struct uuid uu; + UUID_FLAT tmp; generate_random_buffer(tmp.info, sizeof(tmp.info), True); - uuid_unpack(tmp, &uu); + smb_uuid_unpack(tmp, uu); - uu.clock_seq[0] = (uu.clock_seq[0] & 0x3F) | 0x80; - uu.time_hi_and_version = (uu.time_hi_and_version & 0x0FFF) | 0x4000; - uuid_pack(&uu, out); + uu->clock_seq[0] = (uu->clock_seq[0] & 0x3F) | 0x80; + uu->time_hi_and_version = (uu->time_hi_and_version & 0x0FFF) | 0x4000; } -char *smb_uuid_to_string(const GUID in) +char *smb_uuid_to_string(const struct uuid uu) { - struct uuid uu; char *out; - uuid_unpack(in, &uu); - asprintf(&out, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", uu.time_low, uu.time_mid, uu.time_hi_and_version, uu.clock_seq[0], uu.clock_seq[1], @@ -87,13 +77,11 @@ char *smb_uuid_to_string(const GUID in) return out; } -const char *smb_uuid_string_static(const GUID in) +const char *smb_uuid_string_static(const struct uuid uu) { - struct uuid uu; static char out[37]; - uuid_unpack(in, &uu); - slprintf(out, sizeof(out) -1, + slprintf(out, sizeof(out), "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", uu.time_low, uu.time_mid, uu.time_hi_and_version, uu.clock_seq[0], uu.clock_seq[1], diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index b3706cb240..ed26bf07f2 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -1091,20 +1091,14 @@ static void dump_binary(const char *field, struct berval **values) } } -struct uuid { - uint32 i1; - uint16 i2; - uint16 i3; - uint8 s[8]; -}; - static void dump_guid(const char *field, struct berval **values) { int i; - GUID guid; + UUID_FLAT guid; for (i=0; values[i]; i++) { memcpy(guid.info, values[i]->bv_val, sizeof(guid.info)); - printf("%s: %s\n", field, smb_uuid_string_static(guid)); + printf("%s: %s\n", field, + smb_uuid_string_static(smb_uuid_unpack_static(guid))); } } diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index 8a146f0d68..a5a2c29a8b 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -128,39 +128,38 @@ BOOL secrets_fetch_domain_sid(const char *domain, DOM_SID *sid) return True; } -BOOL secrets_store_domain_guid(const char *domain, GUID *guid) +BOOL secrets_store_domain_guid(const char *domain, struct uuid *guid) { fstring key; slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_GUID, domain); strupper_m(key); - return secrets_store(key, guid, sizeof(GUID)); + return secrets_store(key, guid, sizeof(struct uuid)); } -BOOL secrets_fetch_domain_guid(const char *domain, GUID *guid) +BOOL secrets_fetch_domain_guid(const char *domain, struct uuid *guid) { - GUID *dyn_guid; + struct uuid *dyn_guid; fstring key; size_t size; - GUID new_guid; + struct uuid new_guid; slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_GUID, domain); strupper_m(key); - dyn_guid = (GUID *)secrets_fetch(key, &size); + dyn_guid = (struct uuid *)secrets_fetch(key, &size); - DEBUG(6,("key is %s, size is %d\n", key, (int)size)); - - if ((NULL == dyn_guid) && (ROLE_DOMAIN_PDC == lp_server_role())) { + if ((!dyn_guid) && (lp_server_role() == ROLE_DOMAIN_PDC)) { smb_uuid_generate_random(&new_guid); if (!secrets_store_domain_guid(domain, &new_guid)) return False; - dyn_guid = (GUID *)secrets_fetch(key, &size); + dyn_guid = (struct uuid *)secrets_fetch(key, &size); if (dyn_guid == NULL) return False; } - if (size != sizeof(GUID)) + if (size != sizeof(struct uuid)) { + DEBUG(1,("UUID size %d is wrong!\n", (int)size)); SAFE_FREE(dyn_guid); return False; } diff --git a/source3/rpc_parse/parse_ds.c b/source3/rpc_parse/parse_ds.c index 26dcdb34b8..8d894b6c6a 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 ( !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_epmapper.c b/source3/rpc_parse/parse_epmapper.c index 7a5f147c50..89dc0994c6 100644 --- a/source3/rpc_parse/parse_epmapper.c +++ b/source3/rpc_parse/parse_epmapper.c @@ -88,9 +88,9 @@ NTSTATUS init_epm_floor(EPM_FLOOR *floor, uint8 protocol) inits an EPM_FLOOR structure with a UUID ********************************************************************/ NTSTATUS init_epm_floor_uuid(EPM_FLOOR *floor, - const RPC_UUID *uuid, uint16 version) + const struct uuid uuid, uint16 version) { - memcpy(&floor->lhs.uuid.uuid, uuid, sizeof(*uuid)); + memcpy(&floor->lhs.uuid.uuid, &uuid, sizeof(uuid)); floor->lhs.uuid.version = version; floor->rhs.unknown = 0; return init_epm_floor(floor, EPM_FLOOR_UUID); @@ -166,7 +166,7 @@ BOOL epm_io_floor(const char *desc, EPM_FLOOR *floor, switch (floor->lhs.protocol) { case EPM_FLOOR_UUID: - if (!smb_io_rpc_uuid("uuid", &floor->lhs.uuid.uuid, ps, depth)) + if (!smb_io_uuid("uuid", &floor->lhs.uuid.uuid, ps, depth)) return False; if (!prs_uint16("version", ps, depth, &floor->lhs.uuid.version)) diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c index 18ac37778c..1718841cf7 100644 --- a/source3/rpc_parse/parse_rpc.c +++ b/source3/rpc_parse/parse_rpc.c @@ -34,8 +34,9 @@ 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 \ } @@ -43,8 +44,9 @@ 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 \ } @@ -52,8 +54,9 @@ 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 \ } @@ -61,8 +64,9 @@ 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 \ } @@ -70,8 +74,9 @@ 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 \ } @@ -79,8 +84,9 @@ 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 \ } @@ -88,8 +94,9 @@ 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 \ } @@ -97,8 +104,9 @@ 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 \ } @@ -106,8 +114,9 @@ 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 \ } @@ -115,8 +124,9 @@ 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 \ } @@ -124,8 +134,9 @@ 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 \ } @@ -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 \ } @@ -160,8 +174,9 @@ interface/version dce/rpc pipe identification { \ { \ 0xe1af8308, 0x5d1f, 0x11c9, \ - { 0x91, 0xa4, 0x08, 0x00, \ - 0x2b, 0x14, 0xa0, 0xfa } \ + { 0x91, 0xa4 }, \ + { 0x08, 0x00, \ + 0x2b, 0x14, 0xa0, 0xfa } \ }, 0x03 \ } @@ -263,15 +278,16 @@ BOOL smb_io_rpc_hdr(const char *desc, RPC_HDR *rpc, prs_struct *ps, int depth) } /******************************************************************* - Reads or writes an RPC_UUID structure. + Reads or writes a struct uuid ********************************************************************/ -BOOL smb_io_rpc_uuid(const char *desc, RPC_UUID *uuid, prs_struct *ps, int depth) +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_rpc_uuid"); + prs_debug(ps, depth, desc, "smb_io_uuid"); depth++; if(!prs_uint32 ("data ", ps, depth, &uuid->time_low)) @@ -281,7 +297,9 @@ BOOL smb_io_rpc_uuid(const char *desc, RPC_UUID *uuid, prs_struct *ps, int depth 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))) + 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; @@ -302,7 +320,7 @@ static BOOL smb_io_rpc_iface(const char *desc, RPC_IFACE *ifc, prs_struct *ps, i if (!prs_align(ps)) return False; - if (!smb_io_rpc_uuid( "uuid", &ifc->uuid, ps, depth)) + if (!smb_io_uuid( "uuid", &ifc->uuid, ps, depth)) return False; if(!prs_uint32 ("version", ps, depth, &ifc->version)) diff --git a/source3/rpc_server/srv_epmapper_nt.c b/source3/rpc_server/srv_epmapper_nt.c index 1b72a5ed41..e82484af4a 100644 --- a/source3/rpc_server/srv_epmapper_nt.c +++ b/source3/rpc_server/srv_epmapper_nt.c @@ -43,7 +43,7 @@ void _epm_map(pipes_struct *ps, const EPM_Q_MAP *q_u, EPM_R_MAP *r_u) switch (q_u->tower->floors[i].lhs.protocol) { case EPM_FLOOR_UUID: init_epm_floor_uuid(&floors[i], - &q_u->tower->floors[i]. + q_u->tower->floors[i]. lhs.uuid.uuid, q_u->tower->floors[i]. lhs.uuid.version); diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 444c35987a..7bbe726f5a 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -731,9 +731,9 @@ BOOL check_bind_req(struct pipes_struct *p, RPC_IFACE* abstract, { if ( strequal(pipe_names[i].client_pipe, pname) && (abstract->version == pipe_names[i].abstr_syntax.version) - && (memcmp(&abstract->uuid, &pipe_names[i].abstr_syntax.uuid, sizeof(RPC_UUID)) == 0) + && (memcmp(&abstract->uuid, &pipe_names[i].abstr_syntax.uuid, sizeof(struct uuid)) == 0) && (transfer->version == pipe_names[i].trans_syntax.version) - && (memcmp(&transfer->uuid, &pipe_names[i].trans_syntax.uuid, sizeof(RPC_UUID)) == 0) ) + && (memcmp(&transfer->uuid, &pipe_names[i].trans_syntax.uuid, sizeof(struct uuid)) == 0) ) { struct api_struct *fns = NULL; int n_fns = 0; diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 15578f6148..ad8f5af432 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -4358,10 +4358,11 @@ static BOOL construct_printer_info_5(Printer_entry *print_hnd, PRINTER_INFO_5 *p static BOOL construct_printer_info_7(Printer_entry *print_hnd, PRINTER_INFO_7 *printer, int snum) { char *guid_str = NULL; - GUID guid; + UUID_FLAT guid; if (is_printer_published(print_hnd, snum, &guid)) { - asprintf(&guid_str, "{%s}", smb_uuid_string_static(guid)); + asprintf(&guid_str, "{%s}", + smb_uuid_string_static(smb_uuid_unpack_static(guid))); strupper_m(guid_str); init_unistr(&printer->guid, guid_str); printer->action = SPOOL_DS_PUBLISH; diff --git a/source3/rpcclient/cmd_epmapper.c b/source3/rpcclient/cmd_epmapper.c index e2eecb6f04..4998286194 100644 --- a/source3/rpcclient/cmd_epmapper.c +++ b/source3/rpcclient/cmd_epmapper.c @@ -34,19 +34,21 @@ static NTSTATUS cmd_epm_map(struct cli_state *cli, uint32 numtowers; /* need to allow all this stuff to be passed in, but for now, it demonstrates the call */ - RPC_UUID if_uuid = {0xe3514235, 0x4b06, 0x11d1, \ - { 0xab, 0x04, 0x00, 0xc0, \ - 0x4f, 0xc2, 0xdc, 0xd2 }}, - syn_uuid = {0x8a885d04, 0x1ceb, 0x11c9, \ - { 0x9f, 0xe8, 0x08, 0x00, \ - 0x2b, 0x10, 0x48, 0x60 }}; + struct uuid if_uuid = {0xe3514235, 0x4b06, 0x11d1, \ + { 0xab, 0x04 }, \ + { 0x00, 0xc0, \ + 0x4f, 0xc2, 0xdc, 0xd2 } }, + syn_uuid = {0x8a885d04, 0x1ceb, 0x11c9, \ + { 0x9f, 0xe8 }, \ + { 0x08, 0x00, \ + 0x2b, 0x10, 0x48, 0x60 } }; NTSTATUS result; ZERO_STRUCT(handle); numtowers = 1; - init_epm_floor_uuid(&floors[0], &if_uuid, 4); - init_epm_floor_uuid(&floors[1], &syn_uuid, 2); + init_epm_floor_uuid(&floors[0], if_uuid, 4); + init_epm_floor_uuid(&floors[1], syn_uuid, 2); init_epm_floor_rpc(&floors[2]); /* sample for netbios named pipe query diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c index db74370bc0..d4509eae44 100644 --- a/source3/rpcclient/cmd_lsarpc.c +++ b/source3/rpcclient/cmd_lsarpc.c @@ -69,7 +69,7 @@ static NTSTATUS cmd_lsa_query_info_policy(struct cli_state *cli, POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; DOM_SID dom_sid; - GUID dom_guid; + UUID_FLAT dom_guid; fstring sid_str, domain_name="", dns_name="", forest_name=""; uint32 info_class = 3; @@ -123,8 +123,9 @@ static NTSTATUS cmd_lsa_query_info_policy(struct cli_state *cli, printf("forest name is %s\n", forest_name); if (info_class == 12) { - printf("domain GUID is "); - print_guid(&dom_guid); + printf("domain GUID is %s\n", + smb_uuid_string_static( + smb_uuid_unpack_static(dom_guid))); } done: return result; diff --git a/source3/utils/net_ads_cldap.c b/source3/utils/net_ads_cldap.c index 44de9cb891..1903172cf7 100644 --- a/source3/utils/net_ads_cldap.c +++ b/source3/utils/net_ads_cldap.c @@ -29,7 +29,7 @@ struct cldap_netlogon_reply { uint32 type; uint32 flags; - GUID guid; + UUID_FLAT guid; char forest[MAX_DNS_LABEL]; char domain[MAX_DNS_LABEL]; @@ -241,8 +241,8 @@ static int recv_cldap_netlogon(int sock, struct cldap_netlogon_reply *reply) reply->type = IVAL(p, 0); p += 4; reply->flags = IVAL(p, 0); p += 4; - memcpy(&reply->guid.info, p, GUID_SIZE); - p += GUID_SIZE; + memcpy(&reply->guid.info, p, UUID_FLAT_SIZE); + p += UUID_FLAT_SIZE; p += pull_netlogon_string(reply->forest, p, (const char *)os3.data); p += pull_netlogon_string(reply->domain, p, (const char *)os3.data); @@ -316,8 +316,8 @@ int ads_cldap_netlogon(ADS_STRUCT *ads) d_printf("0x%x\n", reply.type); break; } - d_printf("GUID: "); - print_guid(&reply.guid); + d_printf("GUID: %s\n", + smb_uuid_string_static(smb_uuid_unpack_static(reply.guid))); d_printf("Flags:\n" "\tIs a PDC: %s\n" "\tIs a GC of the forest: %s\n" |