summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2003-10-30 17:37:21 +0000
committerJim McDonough <jmcd@samba.org>2003-10-30 17:37:21 +0000
commit4f22327e21cc442f954a87835c377e11568d4cf4 (patch)
tree3b6b2ddd2e5730e6d02665970e7c60d1fad7eb17 /source3
parentbb971b44b84a72d628205fba0c27207f5fd00bf2 (diff)
downloadsamba-4f22327e21cc442f954a87835c377e11568d4cf4.tar.gz
samba-4f22327e21cc442f954a87835c377e11568d4cf4.tar.bz2
samba-4f22327e21cc442f954a87835c377e11568d4cf4.zip
Ok, nearing the end of the GUID->struct uuid changes.
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)
Diffstat (limited to 'source3')
-rw-r--r--source3/include/rpc_secdes.h4
-rw-r--r--source3/lib/secace.c4
-rw-r--r--source3/rpc_parse/parse_misc.c28
-rw-r--r--source3/rpc_parse/parse_rpc.c28
-rw-r--r--source3/rpc_parse/parse_sec.c4
5 files changed, 34 insertions, 34 deletions
diff --git a/source3/include/rpc_secdes.h b/source3/include/rpc_secdes.h
index 5e718f8167..4bb39dc935 100644
--- a/source3/include/rpc_secdes.h
+++ b/source3/include/rpc_secdes.h
@@ -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;
diff --git a/source3/lib/secace.c b/source3/lib/secace.c
index 6769f1288a..8c54c97043 100644
--- a/source3/lib/secace.c
+++ b/source3/lib/secace.c
@@ -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);
}
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index e182535532..a075dbd833 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -323,6 +323,34 @@ BOOL smb_io_dom_sid2(const char *desc, DOM_SID2 *sid, prs_struct *ps, int depth)
}
/*******************************************************************
+ 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.
********************************************************************/
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index 1718841cf7..696f258e5d 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -278,34 +278,6 @@ BOOL smb_io_rpc_hdr(const char *desc, RPC_HDR *rpc, prs_struct *ps, int depth)
}
/*******************************************************************
- 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.
********************************************************************/
diff --git a/source3/rpc_parse/parse_sec.c b/source3/rpc_parse/parse_sec.c
index bf43ef288a..a78627650a 100644
--- a/source3/rpc_parse/parse_sec.c
+++ b/source3/rpc_parse/parse_sec.c
@@ -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))