[SCM] Samba Shared Repository - branch master updated

Michael Adam obnox at samba.org
Thu Sep 11 18:46:04 MDT 2014


The branch, master has been updated
       via  8c1b143 media_harmony: Fix a crash bug
       via  4038eb8 media_harmony: Fix warnings
      from  518247b s3: smbd - open logic fix.

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


- Log -----------------------------------------------------------------
commit 8c1b1435fe102d36fbea54a941b04570d529a44c
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Sep 11 11:33:42 2014 +0000

    media_harmony: Fix a crash bug
    
    Now that the dust has settled, fix a crash bug that was hidden behind
    the warnings...
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Simo Sorce <idra at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    
    Autobuild-User(master): Michael Adam <obnox at samba.org>
    Autobuild-Date(master): Fri Sep 12 02:45:40 CEST 2014 on sn-devel-104

commit 4038eb8968c0a0ba2ecadd85ed6b38e430192481
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Sep 11 11:22:52 2014 +0000

    media_harmony: Fix warnings
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Simo Sorce <idra at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

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

Summary of changes:
 source3/modules/vfs_media_harmony.c |   25 +++++++++++--------------
 1 files changed, 11 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c
index f9432dc..2418349 100644
--- a/source3/modules/vfs_media_harmony.c
+++ b/source3/modules/vfs_media_harmony.c
@@ -93,7 +93,6 @@
 #define MH_INFO_DEBUG 10
 #define MH_ERR_DEBUG 0
 
-static const char* MH_MODULE_NAME = "media_harmony";
 static const char* MDB_FILENAME = "msmMMOB.mdb";
 static const size_t MDB_FILENAME_LEN = 11;
 static const char* PMR_FILENAME = "msmFMID.pmr";
@@ -190,7 +189,7 @@ static bool starts_with_media_dir(const char* media_dirname,
 		size_t media_dirname_len, const char* path)
 {
 	bool ret = False;
-	char* path_start;
+	const char *path_start;
 
 	DEBUG(MH_INFO_DEBUG, ("Entering with media_dirname '%s' "
 			      "path '%s'\n", media_dirname, path));
@@ -265,8 +264,8 @@ static int depth_from_media_dir(const char* media_dirname,
 		size_t media_dirname_len, const char* path)
 {
 	int transition_count = 0;
-	char* path_start;
-	char* pathPtr;
+	const char *path_start;
+	const char *pathPtr;
 
 	DEBUG(MH_INFO_DEBUG, ("Entering with media_dirname '%s' "
 			      "path '%s'\n", media_dirname, path));
@@ -355,7 +354,7 @@ static bool is_avid_database(
 		(
 			path[path_len - avid_db_filename_len - 1] == '/'
 			||
-			path_len > avid_db_filename_len
+			(path_len > avid_db_filename_len
 				+ APPLE_DOUBLE_PREFIX_LEN
 				&&
 			path[path_len - avid_db_filename_len
@@ -363,7 +362,7 @@ static bool is_avid_database(
 				&&
 			is_apple_double(&path[path_len
 				- avid_db_filename_len
-				- APPLE_DOUBLE_PREFIX_LEN])
+				- APPLE_DOUBLE_PREFIX_LEN]))
 		)
 	)
 	{
@@ -417,15 +416,15 @@ static int alloc_get_client_path(vfs_handle_struct *handle,
 		)
 			&&
 		(
-			pathPtr - path > 0
+			(pathPtr - path > 0
 				&&
-			*(pathPtr - 1) == '/'
+			 *(pathPtr - 1) == '/')
 			||
-			pathPtr - path > APPLE_DOUBLE_PREFIX_LEN
+			(pathPtr - path > APPLE_DOUBLE_PREFIX_LEN
 				&&
 			*(pathPtr - APPLE_DOUBLE_PREFIX_LEN - 1) == '/'
 				&&
-			is_apple_double(pathPtr - APPLE_DOUBLE_PREFIX_LEN)
+			 is_apple_double(pathPtr - APPLE_DOUBLE_PREFIX_LEN))
 		)
 	)
 	{
@@ -487,13 +486,12 @@ static int alloc_get_client_smb_fname(struct vfs_handle_struct *handle,
 		struct smb_filename **clientFname)
 {
 	int status = 0;
-	NTSTATUS copystatus;
 
 	DEBUG(MH_INFO_DEBUG, ("Entering with smb_fname->base_name '%s'\n",
 			      smb_fname->base_name));
 
-	clientFname = cp_smb_filename(ctx, smb_fname);
-	if (clientFname == NULL) {
+	*clientFname = cp_smb_filename(ctx, smb_fname);
+	if ((*clientFname) == NULL) {
 		DEBUG(MH_ERR_DEBUG, ("alloc_get_client_smb_fname "
 					"NTERR\n"));
 		errno = ENOMEM;
@@ -788,7 +786,6 @@ static DIR *mh_opendir(vfs_handle_struct *handle,
 		goto err;
 	}
 
-out:
 	/* Success is freed in closedir. */
 	DEBUG(MH_INFO_DEBUG, ("Leaving with dirInfo->dirpath '%s', "
 				"dirInfo->clientPath '%s'\n",


-- 
Samba Shared Repository


More information about the samba-cvs mailing list