added a generic print_guid utility, and get the byte order handing
authorAndrew Tridgell <tridge@samba.org>
Mon, 19 Aug 2002 16:55:29 +0000 (16:55 +0000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 19 Aug 2002 16:55:29 +0000 (16:55 +0000)
right
(This used to be commit ec2c17c56f06e122868b2a55bc7c292106ad3911)

source3/lib/util_sid.c

index ad09f9123460d937250cf0f53c86d703768a4b25..8bb06e8866c503c82bea9c3fba4a876bdf1ab377 100644 (file)
@@ -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");
+}