[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-374-gb82cf75

Volker Lendecke vlendec at samba.org
Fri Mar 21 11:06:53 GMT 2008


The branch, v3-2-test has been updated
       via  b82cf75c825298444781697072d83a163c43df4b (commit)
       via  c9add4d59a1615aabc565e323cb19cf7ef4b6b64 (commit)
       via  4ea5798b97497359b09d97c27c2005750a6cbddd (commit)
       via  b19ea3635ccc1f2c7cd6c7f2d179264fbdce13a7 (commit)
       via  d69b8b19aeac2266fb5e5ee280ffffe48a690099 (commit)
       via  120d8c889fa9ad61c74f1f936e83537513454648 (commit)
       via  e2021c5b5710768968ae724220eb1e3f47c9e639 (commit)
       via  1a0aed566b7e4fc75bf894aac6828bfa4152c3dc (commit)
      from  4689057f63599ebaf9ce658ca3b3168b2bbe531f (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit b82cf75c825298444781697072d83a163c43df4b
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Mar 21 11:52:34 2008 +0100

    Fix Coverity ID 473
    
    Simo, S4 also has this bug, you might want to merge the fix.

commit c9add4d59a1615aabc565e323cb19cf7ef4b6b64
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Mar 21 11:48:09 2008 +0100

    Fix Coverity ID 506

commit 4ea5798b97497359b09d97c27c2005750a6cbddd
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Mar 21 11:45:57 2008 +0100

    Fix Coverity ID 507

commit b19ea3635ccc1f2c7cd6c7f2d179264fbdce13a7
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Mar 21 11:42:42 2008 +0100

    Fix Coverity ID 537

commit d69b8b19aeac2266fb5e5ee280ffffe48a690099
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Mar 21 11:41:15 2008 +0100

    Fix Coverity ID 538

commit 120d8c889fa9ad61c74f1f936e83537513454648
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Mar 21 10:40:40 2008 +0100

    Fix Coverity ID 547
    
    Günther, please check. If r->in.ads==NULL, we can't call ads_leave_realm at
    all.
    
    Thanks,
    
    Volker

commit e2021c5b5710768968ae724220eb1e3f47c9e639
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Mar 21 10:28:33 2008 +0100

    Fix Coverity ID 548
    
    Günther, please check -- in all infolevels we do a comment=talloc_strdup
    
    Thanks,
    
    Volker

commit 1a0aed566b7e4fc75bf894aac6828bfa4152c3dc
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Mar 21 10:20:53 2008 +0100

    Fix Coverity IDs 553, 552

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

Summary of changes:
 source/lib/ldb/ldb_tdb/ldb_tdb.c  |    2 +-
 source/lib/substitute.c           |   12 ++++++------
 source/libnet/libnet_join.c       |    5 +----
 source/modules/vfs_full_audit.c   |    4 ++++
 source/registry/reg_perfcount.c   |    5 ++++-
 source/rpc_server/srv_srvsvc_nt.c |    8 +++++---
 source/rpcclient/cmd_dfs.c        |    2 ++
 7 files changed, 23 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/ldb/ldb_tdb/ldb_tdb.c b/source/lib/ldb/ldb_tdb/ldb_tdb.c
index cdcfe5a..27cc0c6 100644
--- a/source/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -1058,7 +1058,7 @@ static int ltdb_connect(struct ldb_context *ldb, const char *url,
 	ltdb->sequence_number = 0;
 
 	*module = talloc(ldb, struct ldb_module);
-	if (!module) {
+	if ((*module) == NULL) {
 		ldb_oom(ldb);
 		talloc_free(ltdb);
 		return -1;
diff --git a/source/lib/substitute.c b/source/lib/substitute.c
index ce97a36..6ecc3fc 100644
--- a/source/lib/substitute.c
+++ b/source/lib/substitute.c
@@ -433,6 +433,9 @@ static const char *automount_path(const char *user_name)
 						(home_path_start+1):""));
 				server_path = talloc_strdup(ctx,
 							home_path_start+1);
+				if (!server_path) {
+					server_path = "";
+				}
 			}
 		} else {
 			/* NIS key lookup failed: default to
@@ -443,9 +446,6 @@ static const char *automount_path(const char *user_name)
 	}
 #endif
 
-	if (!server_path) {
-		server_path = "";
-	}
 	DEBUG(4,("Home server path: %s\n", server_path));
 	return server_path;
 }
@@ -483,6 +483,9 @@ static const char *automount_server(const char *user_name)
 			return "";
 		}
 		srv = talloc_strdup(ctx, automount_value);
+		if (!srv) {
+			return "";
+		}
 		p = strchr_m(srv, ':');
 		if (!p) {
 			return "";
@@ -494,9 +497,6 @@ static const char *automount_server(const char *user_name)
 	}
 #endif
 
-	if (!server_name) {
-		server_name = "";
-	}
 	DEBUG(4,("Home server: %s\n", server_name));
 	return server_name;
 }
diff --git a/source/libnet/libnet_join.c b/source/libnet/libnet_join.c
index d3fba16..52376ac 100644
--- a/source/libnet/libnet_join.c
+++ b/source/libnet/libnet_join.c
@@ -264,10 +264,7 @@ static ADS_STATUS libnet_unjoin_remove_machine_acct(TALLOC_CTX *mem_ctx,
 	ADS_STATUS status;
 
 	if (!r->in.ads) {
-		status = libnet_unjoin_connect_ads(mem_ctx, r);
-		if (!ADS_ERR_OK(status)) {
-			return status;
-		}
+		return libnet_unjoin_connect_ads(mem_ctx, r);
 	}
 
 	status = ads_leave_realm(r->in.ads, r->in.machine_name);
diff --git a/source/modules/vfs_full_audit.c b/source/modules/vfs_full_audit.c
index 5aa9bab..6a88613 100644
--- a/source/modules/vfs_full_audit.c
+++ b/source/modules/vfs_full_audit.c
@@ -546,6 +546,7 @@ static struct {
 	{ SMB_VFS_OP_SET_QUOTA,	"set_quota" },
 	{ SMB_VFS_OP_GET_SHADOW_COPY_DATA,	"get_shadow_copy_data" },
 	{ SMB_VFS_OP_STATVFS,	"statvfs" },
+	{ SMB_VFS_OP_FS_CAPABILITIES,	"fs_capabilities" },
 	{ SMB_VFS_OP_OPENDIR,	"opendir" },
 	{ SMB_VFS_OP_READDIR,	"readdir" },
 	{ SMB_VFS_OP_SEEKDIR,   "seekdir" },
@@ -636,6 +637,9 @@ static struct {
 	{ SMB_VFS_OP_AIO_ERROR,	"aio_error" },
 	{ SMB_VFS_OP_AIO_FSYNC,	"aio_fsync" },
 	{ SMB_VFS_OP_AIO_SUSPEND,"aio_suspend" },
+	{ SMB_VFS_OP_AIO_FORCE, "aio_force" },
+	{ SMB_VFS_OP_IS_OFFLINE, "aio_is_offline" },
+	{ SMB_VFS_OP_SET_OFFLINE, "aio_set_offline" },
 	{ SMB_VFS_OP_LAST, NULL }
 };	
 
diff --git a/source/registry/reg_perfcount.c b/source/registry/reg_perfcount.c
index bc22b3d..e608847 100644
--- a/source/registry/reg_perfcount.c
+++ b/source/registry/reg_perfcount.c
@@ -678,7 +678,10 @@ bool _reg_perfcount_get_instance_info(PERF_INSTANCE_DEFINITION *inst,
 	memset(temp, 0, PERFCOUNT_MAX_LEN);
 	snprintf(temp, PERFCOUNT_MAX_LEN, "i%d", instId);
 	_reg_perfcount_make_key(&key, buf, PERFCOUNT_MAX_LEN, obj->ObjectNameTitleIndex, temp);
-	_reg_perfcount_get_counter_data(key, &data);
+	if (!_reg_perfcount_get_counter_data(key, &data)) {
+		DEBUG(3, ("_reg_perfcount_get_counter_data failed\n"));
+		return false;
+	}
 	if(data.dptr == NULL)
 	{
 		DEBUG(3, ("_reg_perfcount_get_instance_info: No instance data for instance [%s].\n",
diff --git a/source/rpc_server/srv_srvsvc_nt.c b/source/rpc_server/srv_srvsvc_nt.c
index a89a996..8359511 100644
--- a/source/rpc_server/srv_srvsvc_nt.c
+++ b/source/rpc_server/srv_srvsvc_nt.c
@@ -1580,6 +1580,10 @@ WERROR _srvsvc_NetShareSetInfo(pipes_struct *p,
 	if (type != STYPE_DISKTREE)
 		return WERR_ACCESS_DENIED;
 
+	if (comment == NULL) {
+		return WERR_NOMEM;
+	}
+
 	/* Check if the pathname is valid. */
 	if (!(path = valid_share_pathname(p->mem_ctx, pathname )))
 		return WERR_OBJECT_PATH_INVALID;
@@ -1587,9 +1591,7 @@ WERROR _srvsvc_NetShareSetInfo(pipes_struct *p,
 	/* Ensure share name, pathname and comment don't contain '"' characters. */
 	string_replace(share_name, '"', ' ');
 	string_replace(path, '"', ' ');
-	if (comment) {
-		string_replace(comment, '"', ' ');
-	}
+	string_replace(comment, '"', ' ');
 
 	DEBUG(10,("_srvsvc_NetShareSetInfo: change share command = %s\n",
 		lp_change_share_cmd() ? lp_change_share_cmd() : "NULL" ));
diff --git a/source/rpcclient/cmd_dfs.c b/source/rpcclient/cmd_dfs.c
index b3198fc..9630e63 100644
--- a/source/rpcclient/cmd_dfs.c
+++ b/source/rpcclient/cmd_dfs.c
@@ -252,6 +252,8 @@ static WERROR cmd_dfs_enumex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
 		return WERR_OK;
 	}
 
+	str.level = 1;
+
 	if (argc == 3)
 		str.level = atoi(argv[2]);
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list