[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-0rc2-47-g9291214

Karolin Seeger kseeger at samba.org
Mon Jun 23 07:48:38 GMT 2008


The branch, v3-2-stable has been updated
       via  92912142993bb2b6b9203ad70343dd299c20f6bc (commit)
       via  2c1213b38cdabc58dd9a6a3587bb30cf1fe77e3c (commit)
       via  e9f57680b16e18f56e396746c82a7245cbcf5701 (commit)
       via  8804baefaa2f422a3e4235579eb580fe7d0ed9cc (commit)
       via  7705cb9f0910192139baba6de2e12b71267494fc (commit)
       via  78e7005c87603625e7d02b83af4a790277737806 (commit)
      from  5b439ea7cf94fdce24eaae62c2a772361ad5b422 (commit)

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


- Log -----------------------------------------------------------------
commit 92912142993bb2b6b9203ad70343dd299c20f6bc
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Jun 23 07:14:46 2008 +0200

    init_shared_module -> init_samba_module
    (cherry picked from commit 1b12e5f9ed28ac57c06d9597a8f3c57cde01beef)

commit 2c1213b38cdabc58dd9a6a3587bb30cf1fe77e3c
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jun 22 13:06:35 2008 +0200

    Fix a crash in _dfs_Enum
    (cherry picked from commit 4a996476297963d4cb300b4d45c23e83a493c339)

commit e9f57680b16e18f56e396746c82a7245cbcf5701
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jun 22 12:50:30 2008 +0200

    Fix an uninitialized variable access in callers of parse_msdfs_symlink
    
    At least form_junctions() does not initialize refcount, and I don't see it in
    get_referred_path(). For the latters, the callers might initialize it. But even
    if they did, I think parse_msdfs_symlink() should unconditionally return the
    number of referrals it found. I don't think it makes sense to count them up
    from somewhere else.
    (cherry picked from commit d75905ad66e96d4967eb8780d3a980eccb796898)

commit 8804baefaa2f422a3e4235579eb580fe7d0ed9cc
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jun 21 16:48:07 2008 +0200

    Fix a double-closedir() in form_junctions()
    (cherry picked from commit 394f4509bc5dd31801ef83ee9cc29c1e3a9f1078)

commit 7705cb9f0910192139baba6de2e12b71267494fc
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jun 21 16:15:02 2008 +0200

    Attempt to fix the darwin build
    (cherry picked from commit 9a4b5591a40e9150fdd3fc706ebb520d65eb1989)

commit 78e7005c87603625e7d02b83af4a790277737806
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Jun 20 14:30:02 2008 +0200

    Use "init_shared_module" instead of "init_module" for initializing .so's
    (cherry picked from commit eabea09243d164c03b9fdfc0d569054c03e67edf)

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

Summary of changes:
 source/exports/modules-darwin.syms  |    2 +-
 source/include/msdfs.h              |    2 +-
 source/lib/ldb/common/ldb_modules.c |    6 ++++--
 source/lib/module.c                 |    6 +++---
 source/m4/aclocal.m4                |    2 +-
 source/smbd/msdfs.c                 |    6 ++++--
 6 files changed, 14 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/exports/modules-darwin.syms b/source/exports/modules-darwin.syms
index 5999025..be45761 100644
--- a/source/exports/modules-darwin.syms
+++ b/source/exports/modules-darwin.syms
@@ -1 +1 @@
-_init_module
+_init_samba_module
diff --git a/source/include/msdfs.h b/source/include/msdfs.h
index 49b3ad4..4551325 100644
--- a/source/include/msdfs.h
+++ b/source/include/msdfs.h
@@ -52,7 +52,7 @@ struct referral {
 struct junction_map {
 	char *service_name;
 	char *volume_name;
-	char *comment;
+	const char *comment;
 	int referral_count;
 	struct referral* referral_list;
 };
diff --git a/source/lib/ldb/common/ldb_modules.c b/source/lib/ldb/common/ldb_modules.c
index d898f3d..fa7f685 100644
--- a/source/lib/ldb/common/ldb_modules.c
+++ b/source/lib/ldb/common/ldb_modules.c
@@ -231,10 +231,12 @@ int ldb_try_load_dso(struct ldb_context *ldb, const char *name)
 		return -1;
 	}
 
-	init_fn = (int (*)(void))dlsym(handle, "init_module");
+	init_fn = (int (*)(void))dlsym(handle, "init_samba_module");
 
 	if (init_fn == NULL) {
-		ldb_debug(ldb, LDB_DEBUG_ERROR, "no symbol `init_module' found in %s: %s\n", path, dlerror());
+		ldb_debug(ldb, LDB_DEBUG_ERROR, "no symbol "
+			  "`init_samba_module' found in %s: %s\n", path,
+			  dlerror());
 		dlclose(handle);
 		return -1;
 	}
diff --git a/source/lib/module.c b/source/lib/module.c
index 285bd9c..2e56e8e 100644
--- a/source/lib/module.c
+++ b/source/lib/module.c
@@ -49,14 +49,14 @@ static NTSTATUS do_smb_load_module(const char *module_name, bool is_probe)
 		return NT_STATUS_UNSUCCESSFUL;
 	}
 
-	init = (init_module_function *)sys_dlsym(handle, "init_module");
+	init = (init_module_function *)sys_dlsym(handle, "init_samba_module");
 
 	/* we must check sys_dlerror() to determine if it worked, because
            sys_dlsym() can validly return NULL */
 	error = sys_dlerror();
 	if (error) {
-		DEBUG(0, ("Error trying to resolve symbol 'init_module' in %s: %s\n", 
-			  module_name, error));
+		DEBUG(0, ("Error trying to resolve symbol 'init_samba_module' "
+			  "in %s: %s\n", module_name, error));
 		sys_dlclose(handle);
 		return NT_STATUS_UNSUCCESSFUL;
 	}
diff --git a/source/m4/aclocal.m4 b/source/m4/aclocal.m4
index 48cdacc..69bf95e 100644
--- a/source/m4/aclocal.m4
+++ b/source/m4/aclocal.m4
@@ -25,7 +25,7 @@ AC_DEFUN(SMB_MODULE,
 	fi
 	
 	if test x"$DEST" = xSHARED; then
-		AC_DEFINE([$1][_init], [init_module], [Whether to build $1 as shared module])
+		AC_DEFINE([$1][_init], [init_samba_module], [Whether to build $1 as shared module])
 		$4_MODULES="$$4_MODULES $3"
 		AC_MSG_RESULT([shared])
 		[$6]
diff --git a/source/smbd/msdfs.c b/source/smbd/msdfs.c
index f0dd900..baf41bd 100644
--- a/source/smbd/msdfs.c
+++ b/source/smbd/msdfs.c
@@ -367,9 +367,10 @@ static bool parse_msdfs_symlink(TALLOC_CTX *ctx,
 		reflist[i].ttl = REFERRAL_TTL;
 		DEBUG(10, ("parse_msdfs_symlink: Created alt path: %s\n",
 					reflist[i].alternate_path));
-		*refcount += 1;
 	}
 
+	*refcount = count;
+
 	TALLOC_FREE(alt_path);
 	return True;
 }
@@ -1501,6 +1502,7 @@ static int form_junctions(TALLOC_CTX *ctx,
 	if (!jucn[cnt].service_name || !jucn[cnt].volume_name) {
 		goto out;
 	}
+	jucn[cnt].comment = "";
 	jucn[cnt].referral_count = 1;
 
 	ref = jucn[cnt].referral_list = TALLOC_ZERO_P(ctx, struct referral);
@@ -1539,7 +1541,6 @@ static int form_junctions(TALLOC_CTX *ctx,
 	while ((dname = vfs_readdirname(&conn, dirp)) != NULL) {
 		char *link_target = NULL;
 		if (cnt >= jn_remain) {
-			SMB_VFS_CLOSEDIR(&conn,dirp);
 			DEBUG(2, ("form_junctions: ran out of MSDFS "
 				"junction slots"));
 			goto out;
@@ -1561,6 +1562,7 @@ static int form_junctions(TALLOC_CTX *ctx,
 						!jucn[cnt].volume_name) {
 					goto out;
 				}
+				jucn[cnt].comment = "";
 				cnt++;
 			}
 		}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list