Ok, nearing the end of the GUID->struct uuid changes.
authorJim McDonough <jmcd@samba.org>
Thu, 30 Oct 2003 17:37:21 +0000 (17:37 +0000)
committerJim McDonough <jmcd@samba.org>
Thu, 30 Oct 2003 17:37:21 +0000 (17:37 +0000)
Takes care of secdescs.

Had to move the uuid marshall/unmarshalling code to parse_misc, because
it's needed outside of parse_rpc.c (for no-auth calls)
(This used to be commit 5d2bb079b65ccfec14604d8dcf0ce789d1795b46)

source3/include/rpc_secdes.h
source3/lib/secace.c
source3/rpc_parse/parse_misc.c
source3/rpc_parse/parse_rpc.c
source3/rpc_parse/parse_sec.c

index 5e718f8167d6094cad8cbb8fa2122a98109f62b5..4bb39dc935640b93b8d318299a672d972c02c419 100644 (file)
@@ -138,8 +138,8 @@ typedef struct security_ace_info
 
        /* this stuff may be present when type is XXXX_TYPE_XXXX_OBJECT */
        uint32  obj_flags; /* xxxx_ACE_OBJECT_xxxx e.g present/inherited present etc */
-       GUID    obj_guid;  /* object GUID */
-       GUID    inh_guid;  /* inherited object GUID */          
+       struct uuid obj_guid;  /* object GUID */
+       struct uuid inh_guid;  /* inherited object GUID */              
         /* eof object stuff */
 
        DOM_SID trustee;
index 6769f1288a23e580d95a5d343ad012917203099f..8c54c970433ce9e04c8571be74c3a6a9f5e528be 100644 (file)
@@ -48,8 +48,8 @@ void sec_ace_copy(SEC_ACE *ace_dest, SEC_ACE *ace_src)
        ace_dest->size  = ace_src->size;
        ace_dest->info.mask = ace_src->info.mask;
        ace_dest->obj_flags = ace_src->obj_flags;
-       memcpy(&ace_dest->obj_guid, &ace_src->obj_guid, GUID_SIZE);
-       memcpy(&ace_dest->inh_guid, &ace_src->inh_guid, GUID_SIZE);     
+       memcpy(&ace_dest->obj_guid, &ace_src->obj_guid, sizeof(struct uuid));
+       memcpy(&ace_dest->inh_guid, &ace_src->inh_guid, sizeof(struct uuid));
        sid_copy(&ace_dest->trustee, &ace_src->trustee);
 }
 
index e18253553201283df973fa64b0699df58b5d57bd..a075dbd83397be189ef60f550ff6eb27369e4e31 100644 (file)
@@ -322,6 +322,34 @@ BOOL smb_io_dom_sid2(const char *desc, DOM_SID2 *sid, prs_struct *ps, int depth)
        return True;
 }
 
+/*******************************************************************
+ Reads or writes a struct uuid
+********************************************************************/
+
+BOOL smb_io_uuid(const char *desc, struct uuid *uuid, 
+                prs_struct *ps, int depth)
+{
+       if (uuid == NULL)
+               return False;
+
+       prs_debug(ps, depth, desc, "smb_io_uuid");
+       depth++;
+
+       if(!prs_uint32 ("data   ", ps, depth, &uuid->time_low))
+               return False;
+       if(!prs_uint16 ("data   ", ps, depth, &uuid->time_mid))
+               return False;
+       if(!prs_uint16 ("data   ", ps, depth, &uuid->time_hi_and_version))
+               return False;
+
+       if(!prs_uint8s (False, "data   ", ps, depth, uuid->clock_seq, sizeof(uuid->clock_seq)))
+               return False;
+       if(!prs_uint8s (False, "data   ", ps, depth, uuid->node, sizeof(uuid->node)))
+               return False;
+
+       return True;
+}
+
 /*******************************************************************
 creates a STRHDR structure.
 ********************************************************************/
index 1718841cf7dcdbff15bcf51d2c7cca52ca46e1e9..696f258e5defa73ad6e3b61ba035cce89716c39d 100644 (file)
@@ -277,34 +277,6 @@ BOOL smb_io_rpc_hdr(const char *desc,  RPC_HDR *rpc, prs_struct *ps, int depth)
        return True;
 }
 
-/*******************************************************************
- Reads or writes a struct uuid
-********************************************************************/
-
-BOOL smb_io_uuid(const char *desc, struct uuid *uuid, 
-                prs_struct *ps, int depth)
-{
-       if (uuid == NULL)
-               return False;
-
-       prs_debug(ps, depth, desc, "smb_io_uuid");
-       depth++;
-
-       if(!prs_uint32 ("data   ", ps, depth, &uuid->time_low))
-               return False;
-       if(!prs_uint16 ("data   ", ps, depth, &uuid->time_mid))
-               return False;
-       if(!prs_uint16 ("data   ", ps, depth, &uuid->time_hi_and_version))
-               return False;
-
-       if(!prs_uint8s (False, "data   ", ps, depth, uuid->clock_seq, sizeof(uuid->clock_seq)))
-               return False;
-       if(!prs_uint8s (False, "data   ", ps, depth, uuid->node, sizeof(uuid->node)))
-               return False;
-
-       return True;
-}
-
 /*******************************************************************
  Reads or writes an RPC_IFACE structure.
 ********************************************************************/
index bf43ef288aed13153eeae078f18c27f4e2451264..a78627650ada3c21faca56f927d0a0c18828a402 100644 (file)
@@ -83,11 +83,11 @@ BOOL sec_io_ace(const char *desc, SEC_ACE *psa, prs_struct *ps, int depth)
                        return False;
 
                if (psa->obj_flags & SEC_ACE_OBJECT_PRESENT)
-                       if (!prs_uint8s(False, "obj_guid", ps, depth, psa->obj_guid.info, GUID_SIZE))
+                       if (!smb_io_uuid("obj_guid", &psa->obj_guid, ps,depth))
                                return False;
 
                if (psa->obj_flags & SEC_ACE_OBJECT_INHERITED_PRESENT)
-                       if (!prs_uint8s(False, "inh_guid", ps, depth, psa->inh_guid.info, GUID_SIZE))
+                       if (!smb_io_uuid("inh_guid", &psa->inh_guid, ps,depth))
                                return False;
 
                if(!smb_io_dom_sid("trustee  ", &psa->trustee , ps, depth))