[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Sun Mar 27 04:13:02 MDT 2011


The branch, master has been updated
       via  8cd2622 s3: Fix Coverity ID 2296: UNUSED_VALUE
       via  1d690e3 s3: Fix Coverity ID 2327: FORWARD_NULL
       via  f762886 s3: Fix Coverity ID 2328: FORWARD_NULL
       via  4cdaac0 s3: Fix Coverity ID 2329: RESOURCE_LEAK
       via  c104939 s3: Fix Coverity ID 2330: RESOURCE_LEAK
       via  66c9680 s3: Fix Coverity ID 2331: RESOURCE_LEAK
      from  288fb9d s3: Fix an uninitialized variable read

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


- Log -----------------------------------------------------------------
commit 8cd262240e4856c172d9cf01d998d63441357dc3
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Mar 27 11:22:57 2011 +0200

    s3: Fix Coverity ID 2296: UNUSED_VALUE
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Sun Mar 27 12:12:35 CEST 2011 on sn-devel-104

commit 1d690e37b7b042747d27ccbd5eedf0881e47af57
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Mar 27 11:11:07 2011 +0200

    s3: Fix Coverity ID 2327: FORWARD_NULL
    
    Make check_ft_info robust against an invalid type.
    
    Günther, please check!

commit f762886687492e3b2dfeefb22fcd82bd6c662baf
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Mar 27 11:06:02 2011 +0200

    s3: Fix Coverity ID 2328: FORWARD_NULL
    
    Make startsmbfilepwent robust against an invalid open type

commit 4cdaac02dc827879de35235ed6e69c386d584e8e
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Mar 27 11:00:36 2011 +0200

    s3: Fix Coverity ID 2329: RESOURCE_LEAK

commit c1049391c15596b1a725511a1f8979f0795bf6a0
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Mar 27 10:59:57 2011 +0200

    s3: Fix Coverity ID 2330: RESOURCE_LEAK

commit 66c968068de9fba24c26e79a2ce314404353a991
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Mar 27 10:58:19 2011 +0200

    s3: Fix Coverity ID 2331: RESOURCE_LEAK

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

Summary of changes:
 source3/nmbd/nmbd_packets.c         |    1 +
 source3/passdb/pdb_smbpasswd.c      |    3 +++
 source3/rpc_server/lsa/srv_lsa_nt.c |    2 ++
 source3/smbd/posix_acls.c           |    2 ++
 source3/winbindd/idmap_tdb.c        |    3 ---
 5 files changed, 8 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c
index c511a4e..36dacfb 100644
--- a/source3/nmbd/nmbd_packets.c
+++ b/source3/nmbd/nmbd_packets.c
@@ -1826,6 +1826,7 @@ static bool store_processed_packet(struct processed_packet **pp_processed_packet
 	} else if (packet->packet_type == DGRAM_PACKET) {
 		p->packet_id = packet->packet.dgram.header.dgm_id;
 	} else {
+		SAFE_FREE(p);
 		return false;
 	}
 
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index 8d6ac31..005c23d 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -225,6 +225,9 @@ creating file %s\n", pfile));
 				lock_type = F_WRLCK;
 				break;
 			}
+		default:
+			DEBUG(10, ("Invalid open mode: %d\n", type));
+			return NULL;
 	}
 
 	for(race_loop = 0; race_loop < 5; race_loop++) {
diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c
index be8747b..01e4a64 100644
--- a/source3/rpc_server/lsa/srv_lsa_nt.c
+++ b/source3/rpc_server/lsa/srv_lsa_nt.c
@@ -3659,6 +3659,8 @@ static NTSTATUS check_ft_info(TALLOC_CTX *mem_ctx,
 				ex_rule = false;
 				tname = trec->data.info.dns_name.string;
 				tlen = trec->data.info.dns_name.size;
+			default:
+				return NT_STATUS_INVALID_PARAMETER;
 			}
 			ret = dns_cmp(dns_name, dns_len, tname, tlen);
 			switch (ret) {
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 5faf26f..ebdc644 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -442,6 +442,7 @@ static const char *create_pai_v1_entries(struct pai_val *paiv,
 
 		paie->ace_flags = SEC_ACE_FLAG_INHERITED_ACE;
 		if (!get_pai_owner_type(paie, entry_offset)) {
+			SAFE_FREE(paie);
 			return NULL;
 		}
 
@@ -520,6 +521,7 @@ static const char *create_pai_v2_entries(struct pai_val *paiv,
 		paie->ace_flags = CVAL(entry_offset,0);
 
 		if (!get_pai_owner_type(paie, entry_offset+1)) {
+			SAFE_FREE(paie);
 			return NULL;
 		}
 		if (!def_entry) {
diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c
index c83ebc5..18c7fbb 100644
--- a/source3/winbindd/idmap_tdb.c
+++ b/source3/winbindd/idmap_tdb.c
@@ -799,7 +799,6 @@ done:
 
 static NTSTATUS idmap_tdb_unixids_to_sids(struct idmap_domain *dom, struct id_map **ids)
 {
-	struct idmap_tdb_context *ctx;
 	NTSTATUS ret;
 	int i;
 
@@ -808,8 +807,6 @@ static NTSTATUS idmap_tdb_unixids_to_sids(struct idmap_domain *dom, struct id_ma
 		ids[i]->status = ID_UNKNOWN;
 	}
 
-	ctx = talloc_get_type(dom->private_data, struct idmap_tdb_context);
-
 	for (i = 0; ids[i]; i++) {
 		ret = idmap_tdb_id_to_sid(dom, ids[i]);
 		if ( ! NT_STATUS_IS_OK(ret)) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list