svn commit: samba r18846 - in branches/SAMBA_3_0/source/rpc_parse: .

jra at samba.org jra at samba.org
Sat Sep 23 18:24:03 GMT 2006


Author: jra
Date: 2006-09-23 18:24:03 +0000 (Sat, 23 Sep 2006)
New Revision: 18846

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18846

Log:
Fix the same bug Volker noticed when marshalling/unmarshalling
SEC_ACE. "type" is also an enum that may be any size. Treat as
a uint8.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/rpc_parse/parse_sec.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_sec.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_parse/parse_sec.c	2006-09-23 17:59:52 UTC (rev 18845)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_sec.c	2006-09-23 18:24:03 UTC (rev 18846)
@@ -53,6 +53,7 @@
 {
 	uint32 old_offset;
 	uint32 offset_ace_size;
+	uint8 type;
 
 	if (psa == NULL)
 		return False;
@@ -62,9 +63,17 @@
 	
 	old_offset = prs_offset(ps);
 
-	if(!prs_uint8("type ", ps, depth, (uint8*)&psa->type))
+	if (MARSHALLING(ps)) {
+		type = (uint8)psa->type;
+	}
+
+	if(!prs_uint8("type ", ps, depth, &type))
 		return False;
 
+	if (UNMARSHALLING(ps)) {
+		psa->type = (enum security_ace_type)type;
+	}
+
 	if(!prs_uint8("flags", ps, depth, &psa->flags))
 		return False;
 



More information about the samba-cvs mailing list