[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Tue Aug 17 05:49:09 MDT 2010


The branch, master has been updated
       via  feb22e0... s3-samr: Correctly fix the transition from enum to uint32_t.
      from  56f0418... s4-ldb: ensure element flags are zero in ldb search return

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit feb22e08972ab8a2ed6610b4d1ac1de361e6a500
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Aug 17 13:44:42 2010 +0200

    s3-samr: Correctly fix the transition from enum to uint32_t.
    
    What type an enum is depends on the implementation, the compiler and
    probably the compiler options. sizeof(enum) is normally not sizeof(int)!

-----------------------------------------------------------------------

Summary of changes:
 source3/rpc_server/srv_samr_nt.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index a19be4e..127a0cb 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -1795,7 +1795,11 @@ NTSTATUS _samr_LookupNames(struct pipes_struct *p,
 	rids.ids = rid;
 
 	types.count = num_rids;
-	types.ids = (uint32_t *) type;
+	types.ids = talloc_array(p->mem_ctx, uint32_t, num_rids);
+	NT_STATUS_HAVE_NO_MEMORY(type);
+	for (i = 0; i < num_rids; i++) {
+		types.ids[i] = (type[i] & 0xffffffff);
+	}
 
 	*r->out.rids = rids;
 	*r->out.types = types;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list