summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-08-19 16:55:29 +0000
committerAndrew Tridgell <tridge@samba.org>2002-08-19 16:55:29 +0000
commite6fa31d6cb8056b6a0e60e4068e9828599a5689a (patch)
tree15a5889d174525cc8961c64d59dfb10bf0935f63 /source3
parenta90c9b2ccdbb8e41c54293b57808a6c61a4be8a7 (diff)
downloadsamba-e6fa31d6cb8056b6a0e60e4068e9828599a5689a.tar.gz
samba-e6fa31d6cb8056b6a0e60e4068e9828599a5689a.tar.bz2
samba-e6fa31d6cb8056b6a0e60e4068e9828599a5689a.zip
added a generic print_guid utility, and get the byte order handing
right (This used to be commit ec2c17c56f06e122868b2a55bc7c292106ad3911)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/util_sid.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index ad09f91234..8bb06e8866 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -525,3 +525,18 @@ char *sid_binstring(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");
+}