[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1241-g2146310

Volker Lendecke vlendec at samba.org
Thu Apr 23 12:36:09 GMT 2009


The branch, master has been updated
       via  2146310fb75b743d383aeeae3ac121e37903f229 (commit)
       via  b8cd1cff2dfad726cf6dab368dfcc31a29952889 (commit)
       via  d7208577f2a3f612dc851b3d9010f34ae4cc65b4 (commit)
      from  546d16500d0dce4d451efb7793065b323bf8edbd (commit)

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


- Log -----------------------------------------------------------------
commit 2146310fb75b743d383aeeae3ac121e37903f229
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Apr 23 14:24:16 2009 +0200

    Fix a couple of warnings

commit b8cd1cff2dfad726cf6dab368dfcc31a29952889
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Apr 23 14:23:23 2009 +0200

    Fix an uninitialized variable

commit d7208577f2a3f612dc851b3d9010f34ae4cc65b4
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Apr 23 14:14:37 2009 +0200

    Fix a type-punned warning

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

Summary of changes:
 libcli/auth/msrpc_parse.c       |   25 +++++++++++++++----------
 libcli/auth/ntlm_check.c        |    2 +-
 libcli/auth/smbencrypt.c        |    8 ++++----
 libcli/ldap/ldap_message.c      |    4 ++--
 source3/lib/eventlog/eventlog.c |    2 +-
 source3/lib/util_reg_api.c      |    2 +-
 source3/libnet/libnet_dssync.c  |    2 ++
 7 files changed, 26 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/auth/msrpc_parse.c b/libcli/auth/msrpc_parse.c
index 2f78f5f..9125c1c 100644
--- a/libcli/auth/msrpc_parse.c
+++ b/libcli/auth/msrpc_parse.c
@@ -66,8 +66,10 @@ bool msrpc_gen(TALLOC_CTX *mem_ctx,
 		case 'U':
 			s = va_arg(ap, char *);
 			head_size += 8;
-			ret = push_ucs2_talloc(pointers, (smb_ucs2_t **)&pointers[i].data, 
-								   s, &n);
+			ret = push_ucs2_talloc(
+				pointers,
+				(smb_ucs2_t **)(void *)&pointers[i].data,
+				s, &n);
 			if (!ret) {
 				return false;
 			}
@@ -78,8 +80,9 @@ bool msrpc_gen(TALLOC_CTX *mem_ctx,
 		case 'A':
 			s = va_arg(ap, char *);
 			head_size += 8;
-			ret = push_ascii_talloc(pointers, (char **)&pointers[i].data, s,
-									&n);
+			ret = push_ascii_talloc(
+				pointers, (char **)(void *)&pointers[i].data,
+				s, &n);
 			if (!ret) {
 				return false;
 			}
@@ -91,8 +94,10 @@ bool msrpc_gen(TALLOC_CTX *mem_ctx,
 			j = va_arg(ap, int);
 			intargs[i] = j;
 			s = va_arg(ap, char *);
-			ret = push_ucs2_talloc(pointers, (smb_ucs2_t **)&pointers[i].data, 
-								   s, &n);
+			ret = push_ucs2_talloc(
+				pointers,
+				(smb_ucs2_t **)(void *)&pointers[i].data,
+				s, &n);
 			if (!ret) {
 				return false;
 			}
@@ -230,7 +235,7 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
 
 			ps = va_arg(ap, char **);
 			if (len1 == 0 && len2 == 0) {
-				*ps = discard_const("");
+				*ps = (char *)discard_const("");
 			} else {
 				/* make sure its in the right format - be strict */
 				if ((len1 != len2) || (ptr + len1 < ptr) || (ptr + len1 < len1) || (ptr + len1 > blob->length)) {
@@ -257,7 +262,7 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
 						goto cleanup;
 					}
 				} else {
-					(*ps) = discard_const("");
+					(*ps) = (char *)discard_const("");
 				}
 			}
 			break;
@@ -270,7 +275,7 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
 			ps = (char **)va_arg(ap, char **);
 			/* make sure its in the right format - be strict */
 			if (len1 == 0 && len2 == 0) {
-				*ps = discard_const("");
+				*ps = (char *)discard_const("");
 			} else {
 				if ((len1 != len2) || (ptr + len1 < ptr) || (ptr + len1 < len1) || (ptr + len1 > blob->length)) {
 					ret = false;
@@ -293,7 +298,7 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
 						goto cleanup;
 					}
 				} else {
-					(*ps) = discard_const("");
+					(*ps) = (char *)discard_const("");
 				}
 			}
 			break;
diff --git a/libcli/auth/ntlm_check.c b/libcli/auth/ntlm_check.c
index 2cfe8e1..978f0fe 100644
--- a/libcli/auth/ntlm_check.c
+++ b/libcli/auth/ntlm_check.c
@@ -322,7 +322,7 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
 		if (lm_response->length && 
 		    (convert_string_talloc(mem_ctx, CH_DOS, CH_UNIX, 
 					  lm_response->data, lm_response->length, 
-					   (void **)&unix_pw, NULL, false))) {
+					   (void *)&unix_pw, NULL, false))) {
 			if (E_deshash(unix_pw, client_lm.hash)) {
 				lm_ok = true;
 			} else {
diff --git a/libcli/auth/smbencrypt.c b/libcli/auth/smbencrypt.c
index 7659446..8d07b94 100644
--- a/libcli/auth/smbencrypt.c
+++ b/libcli/auth/smbencrypt.c
@@ -231,14 +231,14 @@ bool ntv2_owf_gen(const uint8_t owf[16],
 	domain_byte_len = domain_byte_len - 2;
 	
 	hmac_md5_init_limK_to_64(owf, 16, &ctx);
-	hmac_md5_update((const void *)user, user_byte_len, &ctx);
-	hmac_md5_update((const void *)domain, domain_byte_len, &ctx);
+	hmac_md5_update((uint8_t *)user, user_byte_len, &ctx);
+	hmac_md5_update((uint8_t *)domain, domain_byte_len, &ctx);
 	hmac_md5_final(kr_buf, &ctx);
 
 #ifdef DEBUG_PASSWORD
 	DEBUG(100, ("ntv2_owf_gen: user, domain, owfkey, kr\n"));
-	dump_data(100, (const void *)user, user_byte_len);
-	dump_data(100, (const void *)domain, domain_byte_len);
+	dump_data(100, (uint8_t *)user, user_byte_len);
+	dump_data(100, (uint8_t *)domain, domain_byte_len);
 	dump_data(100, owf, 16);
 	dump_data(100, kr_buf, 16);
 #endif
diff --git a/libcli/ldap/ldap_message.c b/libcli/ldap/ldap_message.c
index 9b00d01..8b0f8a2 100644
--- a/libcli/ldap/ldap_message.c
+++ b/libcli/ldap/ldap_message.c
@@ -1230,8 +1230,8 @@ _PUBLIC_ NTSTATUS ldap_decode(struct asn1_data *data,
 		msg->type = LDAP_TAG_SearchRequest;
 		asn1_start_tag(data, tag);
 		asn1_read_OctetString_talloc(msg, data, &r->basedn);
-		asn1_read_enumerated(data, (int *)&(r->scope));
-		asn1_read_enumerated(data, (int *)&(r->deref));
+		asn1_read_enumerated(data, (int *)(void *)&(r->scope));
+		asn1_read_enumerated(data, (int *)(void *)&(r->deref));
 		asn1_read_Integer(data, &sizelimit);
 		r->sizelimit = sizelimit;
 		asn1_read_Integer(data, &timelimit);
diff --git a/source3/lib/eventlog/eventlog.c b/source3/lib/eventlog/eventlog.c
index 11cb28a..42b2a06 100644
--- a/source3/lib/eventlog/eventlog.c
+++ b/source3/lib/eventlog/eventlog.c
@@ -936,7 +936,7 @@ NTSTATUS evlog_tdb_entry_to_evt_entry(TALLOC_CTX *mem_ctx,
 		size_t len;
 		if (!convert_string_talloc(mem_ctx, CH_UTF16, CH_UNIX,
 					   t->sid.data, t->sid.length,
-					   (void **)&sid_str, &len, false)) {
+					   (void *)&sid_str, &len, false)) {
 			return NT_STATUS_INVALID_SID;
 		}
 		if (len > 0) {
diff --git a/source3/lib/util_reg_api.c b/source3/lib/util_reg_api.c
index 9313193..56ecc54 100644
--- a/source3/lib/util_reg_api.c
+++ b/source3/lib/util_reg_api.c
@@ -92,7 +92,7 @@ WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
 		}
 
 		if (!convert_string_talloc(value, CH_UTF16LE, CH_UNIX, tmp,
-					   length+2, (void **)&value->v.sz.str,
+					   length+2, (void *)&value->v.sz.str,
 					   &value->v.sz.len, False)) {
 			SAFE_FREE(tmp);
 			err = WERR_INVALID_PARAM;
diff --git a/source3/libnet/libnet_dssync.c b/source3/libnet/libnet_dssync.c
index 59feac2..0b61b16 100644
--- a/source3/libnet/libnet_dssync.c
+++ b/source3/libnet/libnet_dssync.c
@@ -601,6 +601,8 @@ static NTSTATUS libnet_dssync_process(TALLOC_CTX *mem_ctx,
 		dn_count = 1;
 	}
 
+	status = NT_STATUS_OK;
+
 	for (count=0; count < dn_count; count++) {
 		status = libnet_dssync_build_request(mem_ctx, ctx,
 						     dns[count],


-- 
Samba Shared Repository


More information about the samba-cvs mailing list