[SCM] Samba Shared Repository - branch master updated

Matthias Dieter Wallnöfer mdw at samba.org
Thu Oct 21 01:53:01 MDT 2010


The branch, master has been updated
       via  8044a20 ldb:ldb_modules.c - if we don't find the associated dynamic object then please close the handle
       via  0b8b9ae ldb:ldb_tdb/ldb_cache.c - remove a superflous "talloc_free"
       via  de9b737 ldb:ldb_tdb/ldb_cache.c - in this function we don't use LDB return codes
       via  4a33071 s4:lib/util/charset/iconv.c - remove a distinction which can never happen
      from  94dc630 Now we have SeSystemSecurity, remove the source3-only #ifdef.

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


- Log -----------------------------------------------------------------
commit 8044a20d8d84e740ca5c6d76bacaa977d691f3d0
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Thu Oct 21 08:51:46 2010 +0200

    ldb:ldb_modules.c - if we don't find the associated dynamic object then please close the handle
    
    Autobuild-User: Matthias Dieter Wallnöfer <mdw at samba.org>
    Autobuild-Date: Thu Oct 21 07:52:44 UTC 2010 on sn-devel-104

commit 0b8b9aed34b9ad80d36860840e024330ae7cd671
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Thu Oct 21 09:03:31 2010 +0200

    ldb:ldb_tdb/ldb_cache.c - remove a superflous "talloc_free"
    
    Didn't realise that this is already called by "ltdb_attributes_unload".

commit de9b7372334483786c856db9b55ae0f24308f27f
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Thu Oct 21 08:45:06 2010 +0200

    ldb:ldb_tdb/ldb_cache.c - in this function we don't use LDB return codes

commit 4a33071e831b56f85bfd39918227e81b46360e35
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Wed Oct 20 19:55:28 2010 +0200

    s4:lib/util/charset/iconv.c - remove a distinction which can never happen
    
    "ret->cd_direct" is never set before. It is set in the "if" upperwards but
    then the function is terminated with "return".

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

Summary of changes:
 lib/util/charset/iconv.c             |    5 +----
 source4/lib/ldb/common/ldb_modules.c |    1 +
 source4/lib/ldb/ldb_tdb/ldb_cache.c  |    6 ++----
 3 files changed, 4 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/charset/iconv.c b/lib/util/charset/iconv.c
index 2dac333..66a8180 100644
--- a/lib/util/charset/iconv.c
+++ b/lib/util/charset/iconv.c
@@ -159,7 +159,7 @@ static bool is_utf16(const char *name)
 }
 
 int smb_iconv_t_destructor(smb_iconv_t hwd)
-{ 
+{
 #ifdef HAVE_NATIVE_ICONV
 	if (hwd->cd_pull != NULL && hwd->cd_pull != (iconv_t)-1)
 		iconv_close(hwd->cd_pull);
@@ -260,9 +260,6 @@ _PUBLIC_ smb_iconv_t smb_iconv_open_ex(TALLOC_CTX *mem_ctx, const char *tocode,
 	}
 	if (is_utf16(tocode)) {
 		ret->direct = sys_iconv;
-		/* could be set just above - so we need to close iconv */
-		if (ret->cd_direct != NULL && ret->cd_direct != (iconv_t)-1)
-			iconv_close(ret->cd_direct);
 		ret->cd_direct = ret->cd_pull;
 		ret->cd_pull = NULL;
 		return ret;
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c
index ec71c8d..b8f155d 100644
--- a/source4/lib/ldb/common/ldb_modules.c
+++ b/source4/lib/ldb/common/ldb_modules.c
@@ -320,6 +320,7 @@ static void *ldb_dso_load_symbol(struct ldb_context *ldb, const char *name,
 
 	sym = dlsym(handle, symbol);
 	if (sym == NULL) {
+		dlclose(handle);
 		ldb_debug(ldb, LDB_DEBUG_ERROR, "no symbol `%s' found in %s: %s", symbol, path, dlerror());
 		return NULL;
 	}
diff --git a/source4/lib/ldb/ldb_tdb/ldb_cache.c b/source4/lib/ldb/ldb_tdb/ldb_cache.c
index 6b1eb5b..697f742 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_cache.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_cache.c
@@ -120,7 +120,7 @@ static int ltdb_attributes_load(struct ldb_module *module)
 	if (ldb->schema.attribute_handler_override) {
 		/* we skip loading the @ATTRIBUTES record when a module is supplying
 		   its own attribute handling */
-		return LDB_SUCCESS;
+		return 0;
 	}
 
 	dn = ldb_dn_new(module, ldb, LTDB_ATTRIBUTES);
@@ -348,10 +348,8 @@ int ltdb_cache_load(struct ldb_module *module)
 	talloc_free(ltdb->cache->last_attribute.name);
 	memset(&ltdb->cache->last_attribute, 0, sizeof(ltdb->cache->last_attribute));
 
-	ltdb_attributes_unload(module);
-
 	talloc_free(ltdb->cache->indexlist);
-	talloc_free(ltdb->cache->attributes);
+	ltdb_attributes_unload(module); /* calls internally "talloc_free" */
 
 	ltdb->cache->indexlist = ldb_msg_new(ltdb->cache);
 	ltdb->cache->attributes = ldb_msg_new(ltdb->cache);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list