[SCM] Samba Shared Repository - branch master updated

Matthias Dieter Wallnöfer mdw at samba.org
Wed Jun 16 13:52:26 MDT 2010


The branch, master has been updated
       via  d9c81e3... s4:dcesrv_netr_DsRAddressToSitenamesExW - fix the read of the IP packet version
       via  ad7859d... s4:ldif_handlers.c - fix warning
      from  7e388c8... Remove an unused chunk of code (will make it easier to talloc'ize prs_XXX).

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


- Log -----------------------------------------------------------------
commit d9c81e3ea54fabc30121872a56bf3a393f26983b
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Wed Jun 16 21:47:22 2010 +0200

    s4:dcesrv_netr_DsRAddressToSitenamesExW - fix the read of the IP packet version
    
    This should make it clearer by the use of the standardised "sa_family_t" type
    and hopefully fixes the problems on platforms other than Linux (NetBSD in the
    buildfarm for example).

commit ad7859dfff3598d351aa91b025e4afba7ab46382
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Wed Jun 16 21:45:15 2010 +0200

    s4:ldif_handlers.c - fix warning

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

Summary of changes:
 source4/lib/ldb-samba/ldif_handlers.c         |    7 ++++---
 source4/rpc_server/netlogon/dcerpc_netlogon.c |    7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb-samba/ldif_handlers.c b/source4/lib/ldb-samba/ldif_handlers.c
index 2ce1055..a7706ac 100644
--- a/source4/lib/ldb-samba/ldif_handlers.c
+++ b/source4/lib/ldb-samba/ldif_handlers.c
@@ -930,9 +930,10 @@ static int samba_ldb_dn_link_canonicalise(struct ldb_context *ldb, void *mem_ctx
 	/* By including the RMD_FLAGS of a deleted DN, we ensure it
 	 * does not casually match a not deleted DN */
 	if (dsdb_dn_is_deleted_val(in)) {
-		out->data = talloc_asprintf(mem_ctx, "<RMD_FLAGS=%u>%s",
-					    dsdb_dn_val_rmd_flags(in),
-					    ldb_dn_get_casefold(dn));
+		out->data = (uint8_t *)talloc_asprintf(mem_ctx,
+						       "<RMD_FLAGS=%u>%s",
+						       dsdb_dn_val_rmd_flags(in),
+						       ldb_dn_get_casefold(dn));
 	} else {
 		out->data = (uint8_t *)ldb_dn_alloc_casefold(mem_ctx, dn);
 	}
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 8bfa449..b1ac583 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -1659,7 +1659,7 @@ static WERROR dcesrv_netr_DsRAddressToSitenamesExW(struct dcesrv_call_state *dce
 	struct ldb_context *sam_ctx;
 	struct netr_DsRAddressToSitenamesExWCtr *ctr;
 	struct loadparm_context *lp_ctx = dce_call->conn->dce_ctx->lp_ctx;
-	uint16_t sin_family;
+	sa_family_t sin_family;
 	struct sockaddr_in *addr;
 #ifdef HAVE_IPV6
 	struct sockaddr_in6 *addr6;
@@ -1692,10 +1692,11 @@ static WERROR dcesrv_netr_DsRAddressToSitenamesExW(struct dcesrv_call_state *dce
 		ctr->sitename[i].string = NULL;
 		ctr->subnetname[i].string = NULL;
 
-		if (r->in.addresses[i].size < sizeof(sin_family)) {
+		if (r->in.addresses[i].size < sizeof(sa_family_t)) {
 			continue;
 		}
-		sin_family = SVAL(r->in.addresses[i].buffer, 0);
+		/* the first two byte of the buffer are the "sin_family" */
+		sin_family = (sa_family_t) *r->in.addresses[i].buffer;
 
 		switch (sin_family) {
 		case AF_INET:


-- 
Samba Shared Repository


More information about the samba-cvs mailing list