Nearing the end of the GUID -> struct uuid changes.
authorJim McDonough <jmcd@samba.org>
Thu, 30 Oct 2003 17:50:56 +0000 (17:50 +0000)
committerJim McDonough <jmcd@samba.org>
Thu, 30 Oct 2003 17:50:56 +0000 (17:50 +0000)
(This used to be commit 0e8fcfac702515f8870c979262bf881d1155efdc)

source3/lib/util_uuid.c
source3/nmbd/nmbd_processlogon.c

index 8217006e58f230754b835a4d27de7844399aec85..fe8595c8cbe2796c0508256bc86e81104a7af606 100644 (file)
 #define TIME_OFFSET_HIGH 0x01B21DD2
 #define TIME_OFFSET_LOW  0x13814000
 
-void smb_uuid_pack(const struct uuid *uu, UUID_FLAT *ptr)
+void smb_uuid_pack(const struct uuid uu, UUID_FLAT *ptr)
 {
-       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(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);
 }
 
 void smb_uuid_unpack(const UUID_FLAT in, struct uuid *uu)
index 816b3514644a73ea3dd7b78326a4486b6eb88b13..fc66e0d6b49b584ef2335fcdff0051c3b79a91d1 100644 (file)
@@ -313,7 +313,8 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
                                }
 #ifdef HAVE_ADS
                                else {
-                                       GUID domain_guid;
+                                       struct uuid domain_guid;
+                                       UUID_FLAT flat_guid;
                                        pstring domain;
                                        pstring hostname;
                                        char *component, *dc, *q1;
@@ -340,8 +341,10 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
                                                DEBUG(2, ("Could not fetch DomainGUID for %s\n", domain));
                                                return;
                                        }
-                                       memcpy(q, &domain_guid, sizeof(domain_guid));
-                                       q += sizeof(domain_guid);
+
+                                       smb_uuid_pack(domain_guid, &flat_guid);
+                                       memcpy(q, &flat_guid.info, UUID_FLAT_SIZE);
+                                       q += UUID_FLAT_SIZE;
 
                                        /* Forest */
                                        str_offset = q - q_orig;