diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/lib/display_sec.c | 8 | ||||
-rw-r--r-- | source3/lib/util_uuid.c | 16 | ||||
-rw-r--r-- | source3/libads/disp_sec.c | 8 | ||||
-rw-r--r-- | source3/libads/ldap.c | 4 | ||||
-rw-r--r-- | source3/printing/nt_printing.c | 4 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 2 | ||||
-rw-r--r-- | source3/rpcclient/cmd_lsarpc.c | 4 | ||||
-rw-r--r-- | source3/utils/net_ads.c | 2 |
9 files changed, 16 insertions, 33 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 8ccf987a6d..794c2cb6db 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1763,7 +1763,6 @@ int islower_ascii(int c); void smb_uuid_pack(const struct GUID uu, UUID_FLAT *ptr); void smb_uuid_unpack(const UUID_FLAT in, struct GUID *uu); void smb_uuid_generate_random(struct GUID *uu); -const char *smb_uuid_string(TALLOC_CTX *mem_ctx, const struct GUID uu); bool smb_string_to_uuid(const char *in, struct GUID* uu); char *guid_binstring(const struct GUID *guid); diff --git a/source3/lib/display_sec.c b/source3/lib/display_sec.c index 5427a8173e..a0d93d6fe7 100644 --- a/source3/lib/display_sec.c +++ b/source3/lib/display_sec.c @@ -157,13 +157,13 @@ static void disp_sec_ace_object(struct security_ace_object *object) { if (object->flags & SEC_ACE_OBJECT_PRESENT) { printf("Object type: SEC_ACE_OBJECT_PRESENT\n"); - printf("Object GUID: %s\n", smb_uuid_string(talloc_tos(), - object->type.type)); + printf("Object GUID: %s\n", GUID_string(talloc_tos(), + &object->type.type)); } if (object->flags & SEC_ACE_OBJECT_INHERITED_PRESENT) { printf("Object type: SEC_ACE_OBJECT_INHERITED_PRESENT\n"); - printf("Object GUID: %s\n", smb_uuid_string(talloc_tos(), - object->inherited_type.inherited_type)); + printf("Object GUID: %s\n", GUID_string(talloc_tos(), + &object->inherited_type.inherited_type)); } } diff --git a/source3/lib/util_uuid.c b/source3/lib/util_uuid.c index 3a8f7b3f4f..5d9a56cd23 100644 --- a/source3/lib/util_uuid.c +++ b/source3/lib/util_uuid.c @@ -55,22 +55,6 @@ void smb_uuid_generate_random(struct GUID *uu) uu->time_hi_and_version = (uu->time_hi_and_version & 0x0FFF) | 0x4000; } -const char *smb_uuid_string(TALLOC_CTX *mem_ctx, const struct GUID uu) -{ - char *result; - - result = talloc_asprintf( - mem_ctx, - "%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], - uu.node[0], uu.node[1], uu.node[2], - uu.node[3], uu.node[4], uu.node[5]); - - SMB_ASSERT(result != NULL); - return result; -} - bool smb_string_to_uuid(const char *in, struct GUID* uu) { bool ret = False; diff --git a/source3/libads/disp_sec.c b/source3/libads/disp_sec.c index f4c68638df..a5e04a4a6c 100644 --- a/source3/libads/disp_sec.c +++ b/source3/libads/disp_sec.c @@ -114,15 +114,15 @@ static void ads_disp_sec_ace_object(ADS_STRUCT *ads, { if (object->flags & SEC_ACE_OBJECT_PRESENT) { printf("Object type: SEC_ACE_OBJECT_PRESENT\n"); - printf("Object GUID: %s (%s)\n", smb_uuid_string(mem_ctx, - object->type.type), + printf("Object GUID: %s (%s)\n", GUID_string(mem_ctx, + &object->type.type), ads_interprete_guid_from_object(ads, mem_ctx, &object->type.type)); } if (object->flags & SEC_ACE_OBJECT_INHERITED_PRESENT) { printf("Object type: SEC_ACE_OBJECT_INHERITED_PRESENT\n"); - printf("Object GUID: %s (%s)\n", smb_uuid_string(mem_ctx, - object->inherited_type.inherited_type), + printf("Object GUID: %s (%s)\n", GUID_string(mem_ctx, + &object->inherited_type.inherited_type), ads_interprete_guid_from_object(ads, mem_ctx, &object->inherited_type.inherited_type)); } diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index fbbe1a546b..2dcd1fd6ae 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -2062,7 +2062,7 @@ static void dump_guid(ADS_STRUCT *ads, const char *field, struct berval **values memcpy(guid.info, values[i]->bv_val, sizeof(guid.info)); smb_uuid_unpack(guid, &tmp); - printf("%s: %s\n", field, smb_uuid_string(talloc_tos(), tmp)); + printf("%s: %s\n", field, GUID_string(talloc_tos(), &tmp)); } } @@ -3748,7 +3748,7 @@ const char *ads_get_extended_right_name_by_guid(ADS_STRUCT *ads, } expr = talloc_asprintf(mem_ctx, "(rightsGuid=%s)", - smb_uuid_string(mem_ctx, *rights_guid)); + GUID_string(mem_ctx, rights_guid)); if (!expr) { goto done; } diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 85f42feb91..d549fa81b0 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -3221,7 +3221,7 @@ static void store_printer_guid(NT_PRINTER_INFO_LEVEL_2 *info2, ZERO_STRUCT( unistr_guid ); - init_unistr2( &unistr_guid, smb_uuid_string(talloc_tos(), guid), + init_unistr2( &unistr_guid, GUID_string(talloc_tos(), &guid), UNI_STR_TERMINATE ); regval_ctr_addvalue(ctr, "objectGUID", REG_SZ, @@ -3841,7 +3841,7 @@ static int unpack_values(NT_PRINTER_DATA *printer_data, const uint8 *buf, int bu memcpy( &guid, data_p, sizeof(struct GUID) ); init_unistr2( &unistr_guid, - smb_uuid_string(talloc_tos(), guid), + GUID_string(talloc_tos(), &guid), UNI_STR_TERMINATE ); regval_ctr_addvalue( printer_data->keys[key_index].values, diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 52cb02b109..af9246c49f 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -4373,7 +4373,7 @@ static bool construct_printer_info_7(Printer_entry *print_hnd, PRINTER_INFO_7 *p if (is_printer_published(print_hnd, snum, &guid)) { if (asprintf(&guid_str, "{%s}", - smb_uuid_string(talloc_tos(), guid)) == -1) { + GUID_string(talloc_tos(), &guid)) == -1) { return false; } strupper_m(guid_str); diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c index 5b5b4ff78c..746fc25d7d 100644 --- a/source3/rpcclient/cmd_lsarpc.c +++ b/source3/rpcclient/cmd_lsarpc.c @@ -112,8 +112,8 @@ static void display_query_info_12(struct lsa_DnsDomainInfo *r) d_printf("Domain DNS Name: %s\n", r->dns_domain.string); d_printf("Domain Forest Name: %s\n", r->dns_forest.string); d_printf("Domain Sid: %s\n", sid_string_tos(r->sid)); - d_printf("Domain GUID: %s\n", smb_uuid_string(talloc_tos(), - r->domain_guid)); + d_printf("Domain GUID: %s\n", GUID_string(talloc_tos(), + &r->domain_guid)); } static void display_lsa_query_info(union lsa_PolicyInformation *info, diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 30c47ddd34..8e8dd7e767 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -67,7 +67,7 @@ static int net_ads_cldap_netlogon(struct net_context *c, ADS_STRUCT *ads) break; } - d_printf("GUID: %s\n", smb_uuid_string(talloc_tos(), reply.domain_uuid)); + d_printf("GUID: %s\n", GUID_string(talloc_tos(), &reply.domain_uuid)); d_printf("Flags:\n" "\tIs a PDC: %s\n" |