/* 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;
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);
}
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.
********************************************************************/
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.
********************************************************************/
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))