[SCM] Samba Shared Repository - branch master updated

Andrew Tridgell tridge at samba.org
Tue Apr 20 00:11:52 MDT 2010


The branch, master has been updated
       via  f1c5239... pytalloc: ensure talloc_ctx is directly after PyObject_HEAD
       via  45be1c7... talloc: there is no ambiguity when freeing a ptr with a null parent
       via  773a8af... tdb: update tdb ABI to use hide_symbols=True
       via  cdaac0a... build: include uninitialised data in the ABI symbols
       via  0e56037... build: quote cross-answer strings
       via  f2bd78c... build: allow "waf --abi-check" to force a re-check of the ABI
      from  538a07a... s4:provisionbackend Print the command we failed to start slapd with

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


- Log -----------------------------------------------------------------
commit f1c523939b88aee0b1ce7375d68b06a0b8cf5d28
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Apr 20 15:33:00 2010 +1000

    pytalloc: ensure talloc_ctx is directly after PyObject_HEAD
    
    the talloc python interface for tp_alloc and tp_dealloc relies on a
    cast to a py_talloc_Object to find the talloc_ctx (see
    py_talloc_dealloc). This means we rely on the talloc_ctx for the
    object being directly after the PyObject_HEAD
    
    This fixes the talloc free with references bug in samba_dnsupdate
    
    The actual problem was the tp_alloc() call in
    PyCredentialCacheContainer_from_ccache_container() which used a cast
    from a py_talloc_Object to a PyCredentialCacheContainerObject. That
    case effectively changed the parent/child relationship between the
    talloc_ctx and the ccc ptr.
    
    This patch changes all the structures that follow this pattern to put
    the TALLOC_CTX directly after the PyObject_HEAD, to ensure that if
    anyone else decides to do a dangerous cast like this that it won't
    cause the same sort of subtle breakage.
    
    Pair-Programmed-With: Rusty Russell <rusty at samba.org>

commit 45be1c7ba4382d85c742a241687bbc6d5a2ebd8c
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Apr 20 15:30:57 2010 +1000

    talloc: there is no ambiguity when freeing a ptr with a null parent
    
    when a ptr has a single reference and a NULL parent, then
    talloc_free(ptr) is not ambiguous, as the caller could not have done a
    talloc_free(NULL) to free the memory
    
    Pair-Programmed-With: Rusty Russell <rusty at samba.org>

commit 773a8afbba27a5e2e48577100f3ca9873b506615
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Apr 20 13:53:35 2010 +1000

    tdb: update tdb ABI to use hide_symbols=True
    
    We now use -fvisibilty=hidden to hide symbols from outside the tdb
    shared library.
    
    This also moved tdb_transaction_recover() into the tdb_private.h
    header, as it should never have been a public API. For that reason we
    are changing the version number. We're only doing a minor version
    increment as it is extremely unlikely that anyone was actually using
    tdb_transaction_recover() as its locking requirements were rather
    unusual.
    
    Pair-Programmed-With: Rusty Russell <rusty at samba.org>

commit cdaac0afc12d155417764baa135bf29067103da4
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Apr 20 13:51:16 2010 +1000

    build: include uninitialised data in the ABI symbols
    
    This is needed for symbols like tdb_null in tdb, which are part
    of the public ABI
    
    Pair-Programmed-With: Rusty Russell <rusty at samba.org>

commit 0e56037129fb9ddca1ace8b18126e56cd587c5a6
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Apr 20 12:51:43 2010 +1000

    build: quote cross-answer strings
    
    This allows for spaces and special characters in cross-answers

commit f2bd78cb2652d3db69d0016b94c4506ada4b61c0
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Apr 20 12:49:50 2010 +1000

    build: allow "waf --abi-check" to force a re-check of the ABI

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

Summary of changes:
 buildtools/scripts/abi_gen.sh                      |    2 +-
 buildtools/wafsamba/samba_abi.py                   |    3 +
 buildtools/wafsamba/samba_cross.py                 |    2 +-
 .../ABI/{talloc-2.0.2.sigs => talloc-2.0.3.sigs}   |    0 
 lib/talloc/configure.ac                            |    2 +-
 lib/talloc/talloc.c                                |    7 +
 lib/talloc/testsuite.c                             |   33 +++++
 lib/talloc/wscript                                 |    2 +-
 lib/tdb/common/tdb_private.h                       |    2 +-
 lib/tdb/include/tdb.h                              |  129 ++++++++++----------
 lib/tdb/pytdb.c                                    |   10 --
 lib/tdb/tdb.exports                                |    1 -
 lib/tdb/wscript                                    |    3 +-
 source4/auth/credentials/pycredentials.h           |    2 +-
 source4/lib/ldb/pyldb.h                            |   12 +-
 source4/lib/messaging/pymessaging.c                |    4 +-
 source4/libnet/py_net.c                            |    2 +-
 source4/min_versions.m4                            |    2 +-
 18 files changed, 125 insertions(+), 93 deletions(-)
 copy lib/talloc/ABI/{talloc-2.0.2.sigs => talloc-2.0.3.sigs} (100%)


Changeset truncated at 500 lines:

diff --git a/buildtools/scripts/abi_gen.sh b/buildtools/scripts/abi_gen.sh
index ce589c2..e7fec4f 100755
--- a/buildtools/scripts/abi_gen.sh
+++ b/buildtools/scripts/abi_gen.sh
@@ -10,7 +10,7 @@ cat <<EOF
 set height 0
 set width 0
 EOF
-nm $SHAREDLIB | cut -d' ' -f2- | egrep '^[DGTRVW]' | grep -v @ | cut -c3- | sort | while read s; do
+nm $SHAREDLIB | cut -d' ' -f2- | egrep '^[BDGTRVW]' | grep -v @ | cut -c3- | sort | while read s; do
     echo "echo $s: "
     echo p $s
 done
diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py
index e327e76..cdce587 100644
--- a/buildtools/wafsamba/samba_abi.py
+++ b/buildtools/wafsamba/samba_abi.py
@@ -108,6 +108,9 @@ def abi_check_task(self):
 
 t = Task.task_type_from_func('abi_check', abi_check_task, color='BLUE', ext_in='.bin')
 t.quiet = True
+# allow "waf --abi-check" to force re-checking the ABI
+if '--abi-check' in sys.argv:
+    Task.always_run(t)
 
 @after('apply_link')
 @feature('abi_check')
diff --git a/buildtools/wafsamba/samba_cross.py b/buildtools/wafsamba/samba_cross.py
index 7c3e7d2..b20555f 100644
--- a/buildtools/wafsamba/samba_cross.py
+++ b/buildtools/wafsamba/samba_cross.py
@@ -96,7 +96,7 @@ class cross_Popen(Utils.pproc.Popen):
                 global cross_answers_incomplete
                 cross_answers_incomplete = True
             (retcode, retstring) = ans
-            args = ['/bin/sh', '-c', 'echo %s; exit %d' % (retstring, retcode)]
+            args = ['/bin/sh', '-c', "echo '%s'; exit %d" % (retstring, retcode)]
         real_Popen.__init__(*(obj, args), **kw)
 
 
diff --git a/lib/talloc/ABI/talloc-2.0.2.sigs b/lib/talloc/ABI/talloc-2.0.3.sigs
similarity index 100%
copy from lib/talloc/ABI/talloc-2.0.2.sigs
copy to lib/talloc/ABI/talloc-2.0.3.sigs
diff --git a/lib/talloc/configure.ac b/lib/talloc/configure.ac
index d160f08..258910e 100644
--- a/lib/talloc/configure.ac
+++ b/lib/talloc/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ(2.50)
-AC_INIT(talloc, 2.0.2)
+AC_INIT(talloc, 2.0.3)
 AC_CONFIG_SRCDIR([talloc.c])
 AC_SUBST(datarootdir)
 AC_CONFIG_HEADER(config.h)
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index d3b5565..bd364ed 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -1128,6 +1128,13 @@ _PUBLIC_ int _talloc_free(void *ptr, const char *location)
 	if (unlikely(tc->refs != NULL)) {
 		struct talloc_reference_handle *h;
 
+		if (talloc_parent(ptr) == null_context && tc->refs->next == NULL) {
+			/* in this case we do know which parent should
+			   get this pointer, as there is really only
+			   one parent */
+			return talloc_unlink(null_context, ptr);
+		}
+
 		talloc_log("ERROR: talloc_free with references at %s\n",
 			   location);
 
diff --git a/lib/talloc/testsuite.c b/lib/talloc/testsuite.c
index f33805d..5e9b3ec 100644
--- a/lib/talloc/testsuite.c
+++ b/lib/talloc/testsuite.c
@@ -1132,6 +1132,37 @@ static bool test_pool(void)
 	return true;
 }
 
+
+static bool test_free_ref_null_context(void)
+{
+	void *p1, *p2, *p3;
+	int ret;
+
+	talloc_disable_null_tracking();
+	p1 = talloc_new(NULL);
+	p2 = talloc_new(NULL);
+
+	p3 = talloc_reference(p2, p1);
+	torture_assert("reference", p3 == p1, "failed: reference on null");
+
+	ret = talloc_free(p1);
+	torture_assert("ref free with null parent", ret == 0, "failed: free with null parent");
+	talloc_free(p2);
+
+	talloc_enable_null_tracking_no_autofree();
+	p1 = talloc_new(NULL);
+	p2 = talloc_new(NULL);
+
+	p3 = talloc_reference(p2, p1);
+	torture_assert("reference", p3 == p1, "failed: reference on null");
+
+	ret = talloc_free(p1);
+	torture_assert("ref free with null tracked parent", ret == 0, "failed: free with null parent");
+	talloc_free(p2);
+
+	return true;
+}
+
 static void test_reset(void)
 {
 	talloc_set_log_fn(test_log_stdout);
@@ -1185,6 +1216,8 @@ bool torture_local_talloc(struct torture_context *tctx)
 	ret &= test_talloc_free_in_destructor();
 	test_reset();
 	ret &= test_pool();
+	test_reset();
+	ret &= test_free_ref_null_context();
 
 	if (ret) {
 		test_reset();
diff --git a/lib/talloc/wscript b/lib/talloc/wscript
index e6da2da..3a87506 100644
--- a/lib/talloc/wscript
+++ b/lib/talloc/wscript
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 APPNAME = 'talloc'
-VERSION = '2.0.2'
+VERSION = '2.0.3'
 
 
 blddir = 'bin'
diff --git a/lib/tdb/common/tdb_private.h b/lib/tdb/common/tdb_private.h
index b23b76a..e216713 100644
--- a/lib/tdb/common/tdb_private.h
+++ b/lib/tdb/common/tdb_private.h
@@ -267,4 +267,4 @@ int tdb_expand(struct tdb_context *tdb, tdb_off_t size);
 int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off,
 		      struct tdb_record *rec);
 
-
+int tdb_transaction_recover(struct tdb_context *tdb);
diff --git a/lib/tdb/include/tdb.h b/lib/tdb/include/tdb.h
index c84a398..050f398 100644
--- a/lib/tdb/include/tdb.h
+++ b/lib/tdb/include/tdb.h
@@ -90,85 +90,84 @@ struct tdb_logging_context {
         void *log_private;
 };
 
-struct tdb_context *tdb_open(const char *name, int hash_size, int tdb_flags,
+_PUBLIC_ struct tdb_context *tdb_open(const char *name, int hash_size, int tdb_flags,
 		      int open_flags, mode_t mode);
-struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
+_PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
 			 int open_flags, mode_t mode,
 			 const struct tdb_logging_context *log_ctx,
 			 tdb_hash_func hash_fn);
-void tdb_set_max_dead(struct tdb_context *tdb, int max_dead);
-
-int tdb_reopen(struct tdb_context *tdb);
-int tdb_reopen_all(int parent_longlived);
-void tdb_set_logging_function(struct tdb_context *tdb, const struct tdb_logging_context *log_ctx);
-enum TDB_ERROR tdb_error(struct tdb_context *tdb);
-const char *tdb_errorstr(struct tdb_context *tdb);
-TDB_DATA tdb_fetch(struct tdb_context *tdb, TDB_DATA key);
-int tdb_parse_record(struct tdb_context *tdb, TDB_DATA key,
-		     int (*parser)(TDB_DATA key, TDB_DATA data,
-				   void *private_data),
-		     void *private_data);
-int tdb_delete(struct tdb_context *tdb, TDB_DATA key);
-int tdb_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf, int flag);
-int tdb_append(struct tdb_context *tdb, TDB_DATA key, TDB_DATA new_dbuf);
-int tdb_close(struct tdb_context *tdb);
-TDB_DATA tdb_firstkey(struct tdb_context *tdb);
-TDB_DATA tdb_nextkey(struct tdb_context *tdb, TDB_DATA key);
-int tdb_traverse(struct tdb_context *tdb, tdb_traverse_func fn, void *);
-int tdb_traverse_read(struct tdb_context *tdb, tdb_traverse_func fn, void *);
-int tdb_exists(struct tdb_context *tdb, TDB_DATA key);
-int tdb_lockall(struct tdb_context *tdb);
-int tdb_lockall_nonblock(struct tdb_context *tdb);
-int tdb_unlockall(struct tdb_context *tdb);
-int tdb_lockall_read(struct tdb_context *tdb);
-int tdb_lockall_read_nonblock(struct tdb_context *tdb);
-int tdb_unlockall_read(struct tdb_context *tdb);
-int tdb_lockall_mark(struct tdb_context *tdb);
-int tdb_lockall_unmark(struct tdb_context *tdb);
-const char *tdb_name(struct tdb_context *tdb);
-int tdb_fd(struct tdb_context *tdb);
-tdb_log_func tdb_log_fn(struct tdb_context *tdb);
-void *tdb_get_logging_private(struct tdb_context *tdb);
-int tdb_transaction_start(struct tdb_context *tdb);
-int tdb_transaction_start_nonblock(struct tdb_context *tdb);
-int tdb_transaction_prepare_commit(struct tdb_context *tdb);
-int tdb_transaction_commit(struct tdb_context *tdb);
-int tdb_transaction_cancel(struct tdb_context *tdb);
-int tdb_transaction_recover(struct tdb_context *tdb);
-int tdb_get_seqnum(struct tdb_context *tdb);
-int tdb_hash_size(struct tdb_context *tdb);
-size_t tdb_map_size(struct tdb_context *tdb);
-int tdb_get_flags(struct tdb_context *tdb);
-void tdb_add_flags(struct tdb_context *tdb, unsigned flag);
-void tdb_remove_flags(struct tdb_context *tdb, unsigned flag);
-void tdb_enable_seqnum(struct tdb_context *tdb);
-void tdb_increment_seqnum_nonblock(struct tdb_context *tdb);
-int tdb_check(struct tdb_context *tdb,
+_PUBLIC_ void tdb_set_max_dead(struct tdb_context *tdb, int max_dead);
+
+_PUBLIC_ int tdb_reopen(struct tdb_context *tdb);
+_PUBLIC_ int tdb_reopen_all(int parent_longlived);
+_PUBLIC_ void tdb_set_logging_function(struct tdb_context *tdb, const struct tdb_logging_context *log_ctx);
+_PUBLIC_ enum TDB_ERROR tdb_error(struct tdb_context *tdb);
+_PUBLIC_ const char *tdb_errorstr(struct tdb_context *tdb);
+_PUBLIC_ TDB_DATA tdb_fetch(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_parse_record(struct tdb_context *tdb, TDB_DATA key,
+			      int (*parser)(TDB_DATA key, TDB_DATA data,
+					    void *private_data),
+			      void *private_data);
+_PUBLIC_ int tdb_delete(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf, int flag);
+_PUBLIC_ int tdb_append(struct tdb_context *tdb, TDB_DATA key, TDB_DATA new_dbuf);
+_PUBLIC_ int tdb_close(struct tdb_context *tdb);
+_PUBLIC_ TDB_DATA tdb_firstkey(struct tdb_context *tdb);
+_PUBLIC_ TDB_DATA tdb_nextkey(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_traverse(struct tdb_context *tdb, tdb_traverse_func fn, void *);
+_PUBLIC_ int tdb_traverse_read(struct tdb_context *tdb, tdb_traverse_func fn, void *);
+_PUBLIC_ int tdb_exists(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_lockall(struct tdb_context *tdb);
+_PUBLIC_ int tdb_lockall_nonblock(struct tdb_context *tdb);
+_PUBLIC_ int tdb_unlockall(struct tdb_context *tdb);
+_PUBLIC_ int tdb_lockall_read(struct tdb_context *tdb);
+_PUBLIC_ int tdb_lockall_read_nonblock(struct tdb_context *tdb);
+_PUBLIC_ int tdb_unlockall_read(struct tdb_context *tdb);
+_PUBLIC_ int tdb_lockall_mark(struct tdb_context *tdb);
+_PUBLIC_ int tdb_lockall_unmark(struct tdb_context *tdb);
+_PUBLIC_ const char *tdb_name(struct tdb_context *tdb);
+_PUBLIC_ int tdb_fd(struct tdb_context *tdb);
+_PUBLIC_ tdb_log_func tdb_log_fn(struct tdb_context *tdb);
+_PUBLIC_ void *tdb_get_logging_private(struct tdb_context *tdb);
+_PUBLIC_ int tdb_transaction_start(struct tdb_context *tdb);
+_PUBLIC_ int tdb_transaction_start_nonblock(struct tdb_context *tdb);
+_PUBLIC_ int tdb_transaction_prepare_commit(struct tdb_context *tdb);
+_PUBLIC_ int tdb_transaction_commit(struct tdb_context *tdb);
+_PUBLIC_ int tdb_transaction_cancel(struct tdb_context *tdb);
+_PUBLIC_ int tdb_get_seqnum(struct tdb_context *tdb);
+_PUBLIC_ int tdb_hash_size(struct tdb_context *tdb);
+_PUBLIC_ size_t tdb_map_size(struct tdb_context *tdb);
+_PUBLIC_ int tdb_get_flags(struct tdb_context *tdb);
+_PUBLIC_ void tdb_add_flags(struct tdb_context *tdb, unsigned flag);
+_PUBLIC_ void tdb_remove_flags(struct tdb_context *tdb, unsigned flag);
+_PUBLIC_ void tdb_enable_seqnum(struct tdb_context *tdb);
+_PUBLIC_ void tdb_increment_seqnum_nonblock(struct tdb_context *tdb);
+_PUBLIC_ int tdb_check(struct tdb_context *tdb,
 	      int (*check) (TDB_DATA key, TDB_DATA data, void *private_data),
 	      void *private_data);
 
 /* Low level locking functions: use with care */
-int tdb_chainlock(struct tdb_context *tdb, TDB_DATA key);
-int tdb_chainlock_nonblock(struct tdb_context *tdb, TDB_DATA key);
-int tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key);
-int tdb_chainlock_read(struct tdb_context *tdb, TDB_DATA key);
-int tdb_chainunlock_read(struct tdb_context *tdb, TDB_DATA key);
-int tdb_chainlock_mark(struct tdb_context *tdb, TDB_DATA key);
-int tdb_chainlock_unmark(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_chainlock(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_chainlock_nonblock(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_chainlock_read(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_chainunlock_read(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_chainlock_mark(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_chainlock_unmark(struct tdb_context *tdb, TDB_DATA key);
 
-void tdb_setalarm_sigptr(struct tdb_context *tdb, volatile sig_atomic_t *sigptr);
+_PUBLIC_ void tdb_setalarm_sigptr(struct tdb_context *tdb, volatile sig_atomic_t *sigptr);
 
 /* wipe and repack */
-int tdb_wipe_all(struct tdb_context *tdb);
-int tdb_repack(struct tdb_context *tdb);
+_PUBLIC_ int tdb_wipe_all(struct tdb_context *tdb);
+_PUBLIC_ int tdb_repack(struct tdb_context *tdb);
 
 /* Debug functions. Not used in production. */
-void tdb_dump_all(struct tdb_context *tdb);
-int tdb_printfreelist(struct tdb_context *tdb);
-int tdb_validate_freelist(struct tdb_context *tdb, int *pnum_entries);
-int tdb_freelist_size(struct tdb_context *tdb);
+_PUBLIC_ void tdb_dump_all(struct tdb_context *tdb);
+_PUBLIC_ int tdb_printfreelist(struct tdb_context *tdb);
+_PUBLIC_ int tdb_validate_freelist(struct tdb_context *tdb, int *pnum_entries);
+_PUBLIC_ int tdb_freelist_size(struct tdb_context *tdb);
 
-extern TDB_DATA tdb_null;
+_PUBLIC_ extern TDB_DATA tdb_null;
 
 #ifdef  __cplusplus
 }
diff --git a/lib/tdb/pytdb.c b/lib/tdb/pytdb.c
index 202dca1..7a9205b 100644
--- a/lib/tdb/pytdb.c
+++ b/lib/tdb/pytdb.c
@@ -112,13 +112,6 @@ static PyObject *obj_transaction_commit(PyTdbObject *self)
 	Py_RETURN_NONE;
 }
 
-static PyObject *obj_transaction_recover(PyTdbObject *self)
-{
-	int ret = tdb_transaction_recover(self->ctx);
-	PyErr_TDB_ERROR_IS_ERR_RAISE(ret, self->ctx);
-	Py_RETURN_NONE;
-}
-
 static PyObject *obj_transaction_start(PyTdbObject *self)
 {
 	int ret = tdb_transaction_start(self->ctx);
@@ -325,9 +318,6 @@ static PyMethodDef tdb_object_methods[] = {
 	{ "transaction_commit", (PyCFunction)obj_transaction_commit, METH_NOARGS,
 		"S.transaction_commit() -> None\n"
 		"Commit the currently active transaction." },
-	{ "transaction_recover", (PyCFunction)obj_transaction_recover, METH_NOARGS,
-		"S.transaction_recover() -> None\n"
-		"Recover the currently active transaction." },
 	{ "transaction_start", (PyCFunction)obj_transaction_start, METH_NOARGS,
 		"S.transaction_start() -> None\n"
 		"Start a new transaction." },
diff --git a/lib/tdb/tdb.exports b/lib/tdb/tdb.exports
index df97eb5..73b8fd6 100644
--- a/lib/tdb/tdb.exports
+++ b/lib/tdb/tdb.exports
@@ -51,7 +51,6 @@
            tdb_transaction_cancel;
            tdb_transaction_commit;
            tdb_transaction_prepare_commit;
-           tdb_transaction_recover;
            tdb_transaction_start;
            tdb_transaction_start_nonblock;
            tdb_traverse;
diff --git a/lib/tdb/wscript b/lib/tdb/wscript
index 9b637cd..899fe79 100644
--- a/lib/tdb/wscript
+++ b/lib/tdb/wscript
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 APPNAME = 'tdb'
-VERSION = '1.2.1'
+VERSION = '1.2.2'
 
 blddir = 'bin'
 
@@ -68,6 +68,7 @@ def build(bld):
                           includes='include',
                           abi_file='ABI/tdb-%s.sigs' % VERSION,
                           abi_match='tdb_*',
+                          hide_symbols=True,
                           vnum=VERSION)
 
     bld.SAMBA_BINARY('tdbtorture',
diff --git a/source4/auth/credentials/pycredentials.h b/source4/auth/credentials/pycredentials.h
index 6d03ca1..09deb05 100644
--- a/source4/auth/credentials/pycredentials.h
+++ b/source4/auth/credentials/pycredentials.h
@@ -26,8 +26,8 @@ PyAPI_DATA(PyTypeObject) PyCredentials;
 PyAPI_DATA(PyTypeObject) PyCredentialCacheContainer;
 typedef struct {
 	PyObject_HEAD
-	struct ccache_container *ccc;
 	TALLOC_CTX *mem_ctx;
+	struct ccache_container *ccc;
 } PyCredentialCacheContainerObject;
 #define PyCredentials_Check(py_obj) PyObject_TypeCheck(py_obj, &PyCredentials)
 #define PyCredentials_AsCliCredentials(py_obj) py_talloc_get_type(py_obj, struct cli_credentials)
diff --git a/source4/lib/ldb/pyldb.h b/source4/lib/ldb/pyldb.h
index 289159c..545011e 100644
--- a/source4/lib/ldb/pyldb.h
+++ b/source4/lib/ldb/pyldb.h
@@ -31,8 +31,8 @@
 
 typedef struct {
 	PyObject_HEAD
-	struct ldb_context *ldb_ctx;
 	TALLOC_CTX *mem_ctx;
+	struct ldb_context *ldb_ctx;
 } PyLdbObject;
 
 #define PyLdb_AsLdbContext(pyobj) ((PyLdbObject *)pyobj)->ldb_ctx
@@ -40,8 +40,8 @@ typedef struct {
 
 typedef struct {
 	PyObject_HEAD
-	struct ldb_dn *dn;
 	TALLOC_CTX *mem_ctx;
+	struct ldb_dn *dn;
 } PyLdbDnObject;
 
 PyObject *PyLdbDn_FromDn(struct ldb_dn *);
@@ -51,16 +51,16 @@ bool PyObject_AsDn(TALLOC_CTX *mem_ctx, PyObject *object, struct ldb_context *ld
 
 typedef struct {
 	PyObject_HEAD
-	struct ldb_message *msg;
 	TALLOC_CTX *mem_ctx;
+	struct ldb_message *msg;
 } PyLdbMessageObject;
 #define PyLdbMessage_Check(ob) PyObject_TypeCheck(ob, &PyLdbMessage)
 #define PyLdbMessage_AsMessage(pyobj) ((PyLdbMessageObject *)pyobj)->msg
 
 typedef struct {
 	PyObject_HEAD
-	struct ldb_module *mod;
 	TALLOC_CTX *mem_ctx;
+	struct ldb_module *mod;
 } PyLdbModuleObject;
 PyObject *PyLdbMessage_FromMessage(struct ldb_message *message);
 PyObject *PyLdbModule_FromModule(struct ldb_module *mod);
@@ -68,8 +68,8 @@ PyObject *PyLdbModule_FromModule(struct ldb_module *mod);
 
 typedef struct {
 	PyObject_HEAD	
-	struct ldb_message_element *el;
 	TALLOC_CTX *mem_ctx;
+	struct ldb_message_element *el;
 } PyLdbMessageElementObject;
 struct ldb_message_element *PyObject_AsMessageElement(TALLOC_CTX *mem_ctx, PyObject *obj, int flags, const char *name);
 PyObject *PyLdbMessageElement_FromMessageElement(struct ldb_message_element *, TALLOC_CTX *mem_ctx);
@@ -78,8 +78,8 @@ PyObject *PyLdbMessageElement_FromMessageElement(struct ldb_message_element *, T
 
 typedef struct {
 	PyObject_HEAD
-	struct ldb_parse_tree *tree;
 	TALLOC_CTX *mem_ctx;
+	struct ldb_parse_tree *tree;
 } PyLdbTreeObject;
 PyObject *PyLdbTree_FromTree(struct ldb_parse_tree *);
 #define PyLdbTree_AsTree(pyobj) ((PyLdbTreeObject *)pyobj)->tree
diff --git a/source4/lib/messaging/pymessaging.c b/source4/lib/messaging/pymessaging.c
index 35e0093..cea3acc 100644
--- a/source4/lib/messaging/pymessaging.c
+++ b/source4/lib/messaging/pymessaging.c
@@ -303,10 +303,10 @@ PyTypeObject messaging_Type = {
 */
 typedef struct {
 	PyObject_HEAD
+	TALLOC_CTX *mem_ctx;
 	const char *server_name;
 	struct server_id *dest_ids;
 	struct messaging_context *msg_ctx;
-	TALLOC_CTX *mem_ctx;
 } irpc_ClientConnectionObject;
 
 /*
@@ -382,10 +382,10 @@ PyObject *py_irpc_connect(PyTypeObject *self, PyObject *args, PyObject *kwargs)
 
 typedef struct {
 	PyObject_HEAD
+	TALLOC_CTX *mem_ctx;
 	struct irpc_request **reqs;
 	int count;
 	int current;
-	TALLOC_CTX *mem_ctx;
 	py_data_unpack_fn unpack_fn;
 } irpc_ResultObject;
 
diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c
index 6bd4c0c..cdf8aeb 100644
--- a/source4/libnet/py_net.c
+++ b/source4/libnet/py_net.c
@@ -29,8 +29,8 @@
 
 typedef struct {
 	PyObject_HEAD
-	struct libnet_context *libnet_ctx;
 	TALLOC_CTX *mem_ctx;
+	struct libnet_context *libnet_ctx;
 	struct tevent_context *ev;
 } py_net_Object;
 
diff --git a/source4/min_versions.m4 b/source4/min_versions.m4
index 82e7eb4..b310133 100644
--- a/source4/min_versions.m4
+++ b/source4/min_versions.m4
@@ -1,6 +1,6 @@
 # Minimum and exact required versions for various libraries 
 # if we use the ones installed in the system.
 define(TDB_MIN_VERSION,1.2.1)
-define(TALLOC_MIN_VERSION,2.0.2)
+define(TALLOC_MIN_VERSION,2.0.3)
 define(LDB_REQUIRED_VERSION,0.9.10)
 define(TEVENT_REQUIRED_VERSION,0.9.9)


-- 
Samba Shared Repository


More information about the samba-cvs mailing list