diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-14 02:26:18 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-14 02:26:18 +0200 |
commit | 1f3e4f39c5219b8ca3564e0c2eb685d9e7fdb13e (patch) | |
tree | dc2074d60a5f0cf1eca3236e02a95782613b1533 /source3 | |
parent | 7e5bbe806958ea8176e4c8494e3b3f79570635da (diff) | |
download | samba-1f3e4f39c5219b8ca3564e0c2eb685d9e7fdb13e.tar.gz samba-1f3e4f39c5219b8ca3564e0c2eb685d9e7fdb13e.tar.xz samba-1f3e4f39c5219b8ca3564e0c2eb685d9e7fdb13e.zip |
Use GUID_string rather than smb_uuid_string().
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 8ccf987a6dd..794c2cb6db6 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 5427a8173ee..a0d93d6fe76 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 3a8f7b3f4f4..5d9a56cd23c 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 f4c68638dfd..a5e04a4a6c4 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 fbbe1a546ba..2dcd1fd6aee 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 85f42feb91a..d549fa81b00 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 52cb02b109c..af9246c49f2 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 5b5b4ff78cb..746fc25d7d5 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 30c47ddd341..8e8dd7e7672 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" |