[SCM] Samba Shared Repository - branch master updated

Rusty Russell rusty at samba.org
Mon Jun 20 04:33:02 MDT 2011

The branch, master has been updated
       via  580fedc tdb_compat: respect TDB_NO_FSYNC environment variable for tdb2.
       via  985e83e tdb2: tie it into build process if --enable-tdb2-breaks-compat
       via  5eecc85 tdb2: create tdb2 versions of various testing TDBs.
       via  957801f tdb2: python wrapper
       via  cd96271 source3/lib/util_tdb.c: operation timeout support for TDB2.
       via  6b3f9ac tdb2: minor changes to SAMBIFY it.
       via  d24ddb0 tdb2: add lib/tdb2 (from CCAN init-1161-g661d41f)
       via  d925b32 tdb_compat: Higher level API fixes.
       via  ca1936f tdb_compat: use tdb_open_compat.
       via  9eaaf1f tdb2: tdb_parse_record() returns negative errors, not -1.
       via  42506c4 source3/winbindd/idmap_tdb.c: tdb2 support for wrong endian.
       via  61867ea tdb_validate: TDB2 support for tdb_validate_child and tdb_backup.
       via  4823262 tdb2: #ifdef out TDB_ERR_NOLOCK and TDB_ERR_LOCK_TIMEOUT.
       via  a4993f6 ldb: replace 'struct TDB_DATA' with 'TDB_DATA'
       via  58f7cda tdb_compat: use tdb_errorstr_compat()
       via  3a8faef tdb_compat: use tdb_firstkey_compat/tdb_nextkey_compat everywhere.
       via  2c71e85 tdb_unlockall/tdb_unlockall_read: ignore return value.
       via  5a7874e tdb_traverse/tdb_traverse_read: check returns for negative, not -1.
       via  9850f25 tdb_chainunlock: ignore return value.
       via  868d77b tdb_chainlock: check returns for 0, not -1.
       via  d625199 tdb_transaction_cancel: ignore return value.
       via  2b1452b tdb_transaction_commit: check returns for 0, not -1.
       via  6bc59d7 tdb_store: check returns for 0, not -1.
       via  1078eb2 tdb_delete: check returns for 0, not -1.
       via  058c4f8 tdb_fetch_compat: use instead of tdb_fetch.
       via  0e4c358 tdb_compat.h: divert every tdb build and includes to tdb_compat
       via  61bf43f lib/tdb_compat: header for tdb1 vs tdb2.
       via  eb8cb4f source3/smdb/files.c: file_name_hash to use Jenkins hash from CCAN.
       via  f72dd0c source3/lib/util.c: str_checksum to use Jenkins hash from CCAN.
       via  20687dc smb_share_modes: don't use tdb_jenkins_hash.
       via  754c677 lib: import ccan modules for tdb2
      from  a8c3d38 s3: Replace shadow_copy2 with a new implementation


- Log -----------------------------------------------------------------
commit 580fedc321d0a7a11454ad633736101050ef13df
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:34 2011 +0930

    tdb_compat: respect TDB_NO_FSYNC environment variable for tdb2.
    I don't think this kind of hack belongs in the tdb2 source, but SAMBA uses
    it to speed testing, so we should respect it: handle it in our compat
    open wrapper.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    Autobuild-User: Rusty Russell <rusty at rustcorp.com.au>
    Autobuild-Date: Mon Jun 20 12:32:08 CEST 2011 on sn-devel-104

commit 985e83ef520da68a60899f0ad977cb28a77b8cbe
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:34 2011 +0930

    tdb2: tie it into build process if --enable-tdb2-breaks-compat
    This is simplistic.  We need to support making TDB2 a standalone library,
    but for now, we simply built it in-tree.
    Once we have tdb1 compatibility in tdb2, we can rename this option to
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 5eecc854236f0b943aaa89e0c3a46f9fbd208ca9
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:33 2011 +0930

    tdb2: create tdb2 versions of various testing TDBs.
    Soon, TDB2 will handle tdb1 files, but until then, we substitute.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 957801fcb0c81317c84d448f1e04d069216f07ac
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:33 2011 +0930

    tdb2: python wrapper
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit cd962710368b0ea0a4899cc5f70fcdf0d5f751f1
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:33 2011 +0930

    source3/lib/util_tdb.c: operation timeout support for TDB2.
    TDB2 doesn't have (the racy) signal pointer; the new method is to
    override the locking callbacks and do the timeout internally.
    The technique here is to invalidate the struct flock when the timeout
    occurs, so it works even if it happens before we enter the fcntl() call.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 6b3f9ac0f878199ba0ab6855a65fda369e95ae27
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:33 2011 +0930

    tdb2: minor changes to SAMBIFY it.
    This is a bit messy, but it works.  Kept as a separate patch so it's
    easier to merge back and forth with CCAN's tdb2.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit d24ddb0350ddb402bd9d219e129439cdbd77ecfe
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:33 2011 +0930

    tdb2: add lib/tdb2 (from CCAN init-1161-g661d41f)
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit d925b327f4703cc141c0a7f3eec912dba8440880
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:33 2011 +0930

    tdb_compat: Higher level API fixes.
    My previous patches fixed up all direct TDB callers, but there are a
    few utility functions and the db_context functions which are still
    using the old -1 / 0 return codes.
    It's clearer to fix up all the callers of these too, so everywhere is
    consistent: non-zero means an error.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit ca1936fbb26af0ee8d0421ae6a4e07a0f62311d9
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:32 2011 +0930

    tdb_compat: use tdb_open_compat.
    This is a helper for the common case of opening a tdb with a logging
    function, but it doesn't do all the work, since TDB1 and TDB2's log
    functions are different types.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 9eaaf1fc67697a640260169ec26510806105e91f
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:32 2011 +0930

    tdb2: tdb_parse_record() returns negative errors, not -1.
    Fixup callers to tdb_parse_record() to be compatible with tdb2.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 42506c4a3e2da46d8df013e2bc17398b3193b381
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:32 2011 +0930

    source3/winbindd/idmap_tdb.c: tdb2 support for wrong endian.
    TDB has no idea of endian itself, but it knows whether the TDB is the
    same endian as the current machine, so we should use that rather than
    implementing TDB_BIGENDIAN in tdb2.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 61867eaa8458431c452352df021169c100fa9188
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:32 2011 +0930

    tdb_validate: TDB2 support for tdb_validate_child and tdb_backup.
    We don't expose freelist or hash size for TDB2.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 4823262439bc6c1ce9fcce97ed472ad44e85cb77
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:32 2011 +0930

    tdb2: #ifdef out TDB_ERR_NOLOCK and TDB_ERR_LOCK_TIMEOUT.
    These don't exist in tdb2.  The former is used in one weird place in
    tdb1, and the latter not at all.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit a4993f647cfc5b8e0cf4405cc1d8815770837310
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:32 2011 +0930

    ldb: replace 'struct TDB_DATA' with 'TDB_DATA'
    The typedef is TDB2 compatible, the struct isn't.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 58f7cda1bc6b7767c318a038bdb686f4e59e2e64
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:32 2011 +0930

    tdb_compat: use tdb_errorstr_compat()
    Since TDB2 functions return the error directly, tdb_errorstr() taken an
    error code, not the tdb as it does in TDB1.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 3a8faefd6625db45e11c775a77413b35189e2ba9
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:32 2011 +0930

    tdb_compat: use tdb_firstkey_compat/tdb_nextkey_compat everywhere.
    Note that tdb_nextkey_compat frees the old key for us.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 2c71e8596b295e7080eb936db705f452e1d7b9d9
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:32 2011 +0930

    tdb_unlockall/tdb_unlockall_read: ignore return value.
    TDB2 returns void here.  tdb_unlockall will *always* return with the
    database unlocked, but it will complain via the log function if it wasn't
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 5a7874e119acbc80410b2f2c1847371236c22a56
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:31 2011 +0930

    tdb_traverse/tdb_traverse_read: check returns for negative, not -1.
    TDB2 returns a negative error number on failure.  This is compatible
    if we always check for < 0 instead of == -1.
    Also, there's no tdb_traverse_read in TDB2: we don't try to make
    traverse reliable any more, so there are no write locks anyway.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 9850f256337d70401d962bb1f6d5b834a221358d
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:31 2011 +0930

    tdb_chainunlock: ignore return value.
    TDB2 returns void here.  tdb_chainunlock will *always* return with the
    chain unlocked, but it will complain via the log function if it wasn't
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 868d77bc5b38e628f74d5cd03c5f87eb5a666b09
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:31 2011 +0930

    tdb_chainlock: check returns for 0, not -1.
    TDB2 returns a negative error number on failure.  This is compatible
    if we always check for != 0 instead of == -1.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit d6251996fa5b8371c0f7449825b5d1788da95dd0
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:31 2011 +0930

    tdb_transaction_cancel: ignore return value.
    TDB2 returns void here.  tdb_transaction_cancel will *always* return
    with the transaction cancelled, but it will complain via the log
    function if a transaction wasn't in progress.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 2b1452b2fc0573e09fedb7fbd8a5f8d278470b9c
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:31 2011 +0930

    tdb_transaction_commit: check returns for 0, not -1.
    TDB2 returns a negative error number on failure.  This is compatible
    if we always check for != 0 instead of == -1.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 6bc59d77b64d1ecbe5c906ed2fa80a7b8ca5d420
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:31 2011 +0930

    tdb_store: check returns for 0, not -1.
    TDB2 returns a negative error number on failure.  This is compatible
    if we always check for != 0 instead of == -1.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 1078eb21c49d707ddeef2257353f35c10d131b9f
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:31 2011 +0930

    tdb_delete: check returns for 0, not -1.
    TDB2 returns a negative error number on failure.  This is compatible
    if we always check for != 0 instead of == -1.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 058c4f84924c07b88ccaf3d617f3abff797a7cc8
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:31 2011 +0930

    tdb_fetch_compat: use instead of tdb_fetch.
    This is a noop for tdb1.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 0e4c358e2710580d5aeb439d767c87aaf4c0f2f3
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 18:40:25 2011 +0930

    tdb_compat.h: divert every tdb build and includes to tdb_compat
    We change all the headers and wscript files to use tdb_compat; this
    means we have one place to decide whether to use TDB1 or TDB2.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 61bf43f5d17c9ac3fc9a36cab74a81f26ac97ccb
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 16:58:15 2011 +0930

    lib/tdb_compat: header for tdb1 vs tdb2.
    TDB2's API is slightly different from TDB1.  In particular, all functions
    return 0 (TDB_SUCCESS) or a negative error number, rather than -1 or tdb_null
    and storing the error in tdb_error() (though TDB2 does that as well).
    The simplest fix is to replace all the different functions with a wrapper,
    and that is done here.
    Compatibility functions:
    tdb_null: not used as an error return, so not defined by tdb2.
    tdb_fetch_compat: TDB1-style data-returning tdb_fetch.
    tdb_firstkey_compat: TDB1-style data-returning tdb_firstkey
    tdb_nextkey_compat: TDB1-style data-returning tdb_nextkey, with
    	TDB2-style free of old key.
    tdb_errorstr_compat: TDB1-style tdb_errorstr() which takes TDB instead of ecode.
    TDB_CONTEXT: TDB1-style typedef for struct tdb_context.
    tdb_open_compat: Simplified open routine which takes log function, sets
    	TDB_ALLOW_NESTING as Samba expects, and adds TDB_CLEAR_IF_FIRST support.
    Things defined away in TDB2 wrappers:
    tdb_traverse_read: TDB2's tdb_traverse only uses read-locks anyway.
    tdb_reopen/tdb_reopen_all: TDB2 detects this error itself.
    TDB_INCOMPATIBLE_HASH: TDB2 uses the Jenkins hash already.
    TDB_VOLATILE: TDB2 shouldn't have freelist scaling issues.
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit eb8cb4f5486ec8648527e78c110b9167887ee479
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 16:57:15 2011 +0930

    source3/smdb/files.c: file_name_hash to use Jenkins hash from CCAN.
    Rather than tdb's internal one.

commit f72dd0cf0f5f4b9082d022e26b1d4117b3a04d52
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 16:56:15 2011 +0930

    source3/lib/util.c: str_checksum to use Jenkins hash from CCAN.
    Rather than tdb's internal one.

commit 20687dcd7b66635f851f09c51f967e17203c8ab0
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 16:55:15 2011 +0930

    smb_share_modes: don't use tdb_jenkins_hash.
    It's a nice hash, but this usage has nothing to do with TDB.  So use the
    Jenkins hash directly from CCAN instead (it's the same one).
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 754c677b0bbf3ea6c7d2a73c93848f1b0d68c91e
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Jun 20 16:54:15 2011 +0930

    lib: import ccan modules for tdb2
    Imported from git://git.ozlabs.org/~ccan/ccan init-1161-g661d41f
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>


Summary of changes:
 buildtools/wafsamba/samba3.py                      |   10 +-
 lib/ccan/array_size/LICENSE                        |  508 +++
 lib/ccan/array_size/_info                          |   46 +
 lib/ccan/array_size/array_size.h                   |   25 +
 .../array_size/test/compile_fail-function-param.c  |   24 +
 lib/ccan/array_size/test/compile_fail.c            |   14 +
 lib/ccan/array_size/test/run.c                     |   33 +
 lib/ccan/asearch/LICENSE                           |  508 +++
 lib/ccan/asearch/_info                             |   58 +
 lib/ccan/asearch/asearch.h                         |   37 +
 .../asearch/test/compile_fail-return-value-const.c |   25 +
 lib/ccan/asearch/test/compile_fail-return-value.c  |   22 +
 lib/ccan/asearch/test/run-strings.c                |   22 +
 lib/ccan/asearch/test/run.c                        |   40 +
 lib/ccan/build_assert/LICENSE                      |  508 +++
 lib/ccan/build_assert/_info                        |   49 +
 lib/ccan/build_assert/build_assert.h               |   39 +
 lib/ccan/build_assert/test/compile_fail-expr.c     |   10 +
 lib/ccan/build_assert/test/compile_fail.c          |    9 +
 lib/ccan/build_assert/test/compile_ok.c            |    7 +
 .../build_assert/test/run-BUILD_ASSERT_OR_ZERO.c   |    9 +
 lib/ccan/build_assert/test/run-EXPR_BUILD_ASSERT.c |    9 +
 lib/ccan/cast/LICENSE                              |  165 +
 lib/ccan/cast/_info                                |   84 +
 lib/ccan/cast/cast.h                               |  129 +
 lib/ccan/cast/test/compile_fail-cast_const.c       |   29 +
 lib/ccan/cast/test/compile_fail-cast_const2.c      |   29 +
 lib/ccan/cast/test/compile_fail-cast_const3.c      |   29 +
 .../cast/test/compile_fail-cast_signed-const.c     |   22 +
 .../cast/test/compile_fail-cast_signed-sizesame.c  |   29 +
 lib/ccan/cast/test/compile_fail-cast_signed.c      |   17 +
 lib/ccan/cast/test/compile_fail-cast_static-2.c    |   23 +
 lib/ccan/cast/test/compile_fail-cast_static-3.c    |   21 +
 lib/ccan/cast/test/compile_fail-cast_static.c      |   17 +
 lib/ccan/cast/test/compile_ok-cast_void.c          |   12 +
 lib/ccan/compiler/LICENSE                          |  165 +
 lib/ccan/compiler/_info                            |   64 +
 lib/ccan/compiler/compiler.h                       |  216 +
 lib/ccan/compiler/test/compile_fail-printf.c       |   22 +
 lib/ccan/compiler/test/run-is_compile_constant.c   |   15 +
 lib/ccan/endian/LICENSE                            |  508 +++
 lib/ccan/endian/_info                              |   53 +
 lib/ccan/endian/endian.h                           |  226 +
 lib/ccan/endian/test/run.c                         |  106 +
 lib/ccan/hash/_info                                |   31 +
 lib/ccan/hash/hash.c                               |  925 ++++
 lib/ccan/hash/hash.h                               |  312 ++
 lib/ccan/hash/test/api-hash_stable.c               |  300 ++
 lib/ccan/hash/test/run.c                           |  149 +
 lib/ccan/htable/LICENSE                            |  339 ++
 lib/ccan/htable/_info                              |  115 +
 lib/ccan/htable/htable.c                           |  290 ++
 lib/ccan/htable/htable.h                           |  138 +
 lib/ccan/htable/htable_type.h                      |   97 +
 lib/ccan/htable/test/run-type.c                    |  176 +
 lib/ccan/htable/test/run.c                         |  176 +
 lib/ccan/htable/tools/Makefile                     |    5 +
 lib/ccan/htable/tools/speed.c                      |  377 ++
 lib/ccan/ilog/LICENSE                              |  508 +++
 lib/ccan/ilog/_info                                |   47 +
 lib/ccan/ilog/ilog.c                               |  139 +
 lib/ccan/ilog/ilog.h                               |  150 +
 lib/ccan/ilog/test/run-out-of-line.c               |   65 +
 lib/ccan/ilog/test/run.c                           |   60 +
 lib/ccan/libccan.m4                                |  315 ++
 lib/ccan/likely/LICENSE                            |  508 +++
 lib/ccan/likely/_info                              |   45 +
 lib/ccan/likely/likely.c                           |  141 +
 lib/ccan/likely/likely.h                           |  105 +
 lib/ccan/likely/test/run-debug.c                   |   87 +
 lib/ccan/likely/test/run.c                         |   30 +
 lib/ccan/str/LICENSE                               |  508 +++
 lib/ccan/str/_info                                 |   52 +
 lib/ccan/str/debug.c                               |  104 +
 lib/ccan/str/str.c                                 |   12 +
 lib/ccan/str/str.h                                 |  200 +
 lib/ccan/str/str_debug.h                           |   29 +
 lib/ccan/str/test/compile_fail-isalnum.c           |   22 +
 lib/ccan/str/test/compile_fail-isalpha.c           |   22 +
 lib/ccan/str/test/compile_fail-isascii.c           |   22 +
 lib/ccan/str/test/compile_fail-isblank.c           |   26 +
 lib/ccan/str/test/compile_fail-iscntrl.c           |   22 +
 lib/ccan/str/test/compile_fail-isdigit.c           |   22 +
 lib/ccan/str/test/compile_fail-islower.c           |   22 +
 lib/ccan/str/test/compile_fail-isprint.c           |   22 +
 lib/ccan/str/test/compile_fail-ispunct.c           |   22 +
 lib/ccan/str/test/compile_fail-isspace.c           |   22 +
 lib/ccan/str/test/compile_fail-isupper.c           |   22 +
 lib/ccan/str/test/compile_fail-isxdigit.c          |   22 +
 lib/ccan/str/test/compile_fail-strchr.c            |   18 +
 lib/ccan/str/test/compile_fail-strrchr.c           |   18 +
 lib/ccan/str/test/compile_fail-strstr.c            |   18 +
 lib/ccan/str/test/debug.c                          |    5 +
 lib/ccan/str/test/run.c                            |  105 +
 lib/ccan/tally/LICENSE                             |  165 +
 lib/ccan/tally/_info                               |   58 +
 lib/ccan/tally/tally.c                             |  490 ++
 lib/ccan/tally/tally.h                             |  103 +
 lib/ccan/tally/test/run-bucket_of.c                |   71 +
 lib/ccan/tally/test/run-divlu64.c                  |   31 +
 lib/ccan/tally/test/run-histogram.c                |  108 +
 lib/ccan/tally/test/run-mean.c                     |   29 +
 lib/ccan/tally/test/run-median.c                   |   45 +
 lib/ccan/tally/test/run-min-max.c                  |   20 +
 lib/ccan/tally/test/run-mode.c                     |   45 +
 lib/ccan/tally/test/run-renormalize.c              |   25 +
 lib/ccan/tally/test/run-total.c                    |   56 +
 lib/ccan/typesafe_cb/LICENSE                       |  508 +++
 lib/ccan/typesafe_cb/_info                         |  151 +
 .../typesafe_cb/test/compile_fail-cast_if_any.c    |   42 +
 .../test/compile_fail-cast_if_type-promotable.c    |   23 +
 .../typesafe_cb/test/compile_fail-cast_if_type.c   |   25 +
 .../test/compile_fail-typesafe_cb-int.c            |   27 +
 .../typesafe_cb/test/compile_fail-typesafe_cb.c    |   34 +
 .../test/compile_fail-typesafe_cb_cast-multi.c     |   43 +
 .../test/compile_fail-typesafe_cb_cast.c           |   25 +
 .../test/compile_fail-typesafe_cb_exact.c          |   33 +
 .../test/compile_fail-typesafe_cb_postargs.c       |   27 +
 .../test/compile_fail-typesafe_cb_preargs.c        |   28 +
 lib/ccan/typesafe_cb/test/compile_ok-cast_if_any.c |   41 +
 .../typesafe_cb/test/compile_ok-typesafe_cb-NULL.c |   17 +
 .../test/compile_ok-typesafe_cb-const.c            |   50 +
 .../test/compile_ok-typesafe_cb-undefined.c        |   49 +
 .../typesafe_cb/test/compile_ok-typesafe_cb-vars.c |   52 +
 .../test/compile_ok-typesafe_cb-volatile.c         |   47 +
 .../typesafe_cb/test/compile_ok-typesafe_cb_cast.c |   41 +
 .../test/compile_ok-typesafe_cb_def-const.c        |   46 +
 lib/ccan/typesafe_cb/test/run.c                    |  109 +
 lib/ccan/typesafe_cb/typesafe_cb.h                 |  133 +
 lib/ccan/wscript                                   |  120 +
 lib/tdb/python/tests/simple.py                     |   63 +-
 lib/tdb/tools/tdbrestore.c                         |    2 +-
 lib/tdb/tools/tdbtool.c                            |    6 +-
 lib/tdb2/LICENSE                                   |  165 +
 lib/tdb2/TODO                                      |    4 +
 lib/tdb2/_info                                     |   91 +
 lib/tdb2/check.c                                   |  835 ++++
 lib/tdb2/doc/TDB1_porting.txt                      |   44 +
 lib/tdb2/doc/design-1.3.txt                        | 1049 +++++
 lib/tdb2/doc/design.lyx                            | 2689 +++++++++++
 lib/tdb2/doc/design.lyx,v                          | 4679 ++++++++++++++++++++
 lib/tdb2/doc/design.pdf                            |  Bin 0 -> 240440 bytes
 lib/tdb2/doc/design.txt                            | 1258 ++++++
 lib/tdb2/free.c                                    |  968 ++++
 lib/tdb2/hash.c                                    |  881 ++++
 lib/tdb2/io.c                                      |  615 +++
 lib/tdb2/lock.c                                    |  875 ++++
 lib/tdb2/open.c                                    |  661 +++
 lib/tdb2/private.h                                 |  624 +++
 lib/tdb2/pytdb.c                                   |  586 +++
 lib/tdb2/summary.c                                 |  282 ++
 lib/tdb2/tdb.c                                     |  486 ++
 lib/tdb2/tdb2.h                                    |  848 ++++
 lib/tdb2/test/external-agent.c                     |  250 ++
 lib/tdb2/test/external-agent.h                     |   43 +
 lib/tdb2/test/failtest_helper.c                    |  117 +
 lib/tdb2/test/failtest_helper.h                    |   17 +
 lib/tdb2/test/layout.c                             |  348 ++
 lib/tdb2/test/layout.h                             |   68 +
 lib/tdb2/test/lock-tracking.c                      |  147 +
 lib/tdb2/test/lock-tracking.h                      |   25 +
 lib/tdb2/test/logging.c                            |   24 +
 lib/tdb2/test/logging.h                            |   15 +
 lib/tdb2/test/run-001-encode.c                     |   48 +
 lib/tdb2/test/run-001-fls.c                        |   40 +
 lib/tdb2/test/run-01-new_database.c                |   42 +
 lib/tdb2/test/run-02-expand.c                      |   80 +
 lib/tdb2/test/run-03-coalesce.c                    |  170 +
 lib/tdb2/test/run-04-basichash.c                   |  267 ++
 lib/tdb2/test/run-05-readonly-open.c               |   88 +
 lib/tdb2/test/run-10-simple-store.c                |   76 +
 lib/tdb2/test/run-11-simple-fetch.c                |   76 +
 lib/tdb2/test/run-12-store.c                       |   58 +
 lib/tdb2/test/run-13-delete.c                      |  207 +
 lib/tdb2/test/run-14-exists.c                      |   57 +
 lib/tdb2/test/run-15-append.c                      |  135 +
 lib/tdb2/test/run-16-wipe_all.c                    |   50 +
 lib/tdb2/test/run-20-growhash.c                    |  144 +
 lib/tdb2/test/run-21-parse_record.c                |   70 +
 lib/tdb2/test/run-25-hashoverload.c                |  121 +
 lib/tdb2/test/run-30-exhaust-before-expand.c       |   79 +
 lib/tdb2/test/run-50-multiple-freelists.c          |   71 +
 lib/tdb2/test/run-55-transaction.c                 |   75 +
 lib/tdb2/test/run-56-open-during-transaction.c     |  175 +
 lib/tdb2/test/run-57-die-during-transaction.c      |  275 ++
 lib/tdb2/test/run-64-bit-tdb.c                     |   80 +
 lib/tdb2/test/run-80-tdb_fd.c                      |   35 +
 lib/tdb2/test/run-81-seqnum.c                      |   71 +
 lib/tdb2/test/run-82-lockattr.c                    |  263 ++
 lib/tdb2/test/run-83-openhook.c                    |   98 +
 lib/tdb2/test/run-90-get-set-attributes.c          |  165 +
 lib/tdb2/test/run-91-get-stats.c                   |   59 +
 lib/tdb2/test/run-add-remove-flags.c               |   93 +
 lib/tdb2/test/run-check-callback.c                 |   90 +
 lib/tdb2/test/run-expand-in-transaction.c          |   45 +
 lib/tdb2/test/run-features.c                       |   70 +
 lib/tdb2/test/run-firstkey-nextkey.c               |  162 +
 lib/tdb2/test/run-fork-test.c                      |  180 +
 lib/tdb2/test/run-lockall.c                        |   80 +
 lib/tdb2/test/run-locktimeout.c                    |  192 +
 lib/tdb2/test/run-missing-entries.c                |   48 +
 lib/tdb2/test/run-open-multiple-times.c            |   84 +
 lib/tdb2/test/run-record-expand.c                  |   53 +
 lib/tdb2/test/run-remap-in-read_traverse.c         |   65 +
 lib/tdb2/test/run-seed.c                           |   67 +
 lib/tdb2/test/run-simple-delete.c                  |   42 +
 lib/tdb2/test/run-summary.c                        |   60 +
 lib/tdb2/test/run-tdb_errorstr.c                   |   59 +
 lib/tdb2/test/run-traverse.c                       |  211 +
 lib/tdb2/tools/Makefile                            |   16 +
 lib/tdb2/tools/growtdb-bench.c                     |  112 +
 lib/tdb2/tools/mktdb2.c                            |   29 +
 lib/tdb2/tools/speed.c                             |  440 ++
 lib/tdb2/tools/tdb2dump.c                          |  115 +
 lib/tdb2/tools/tdb2restore.c                       |  227 +
 lib/tdb2/tools/tdb2tool.c                          |  798 ++++
 lib/tdb2/tools/tdb2torture.c                       |  494 +++
 lib/tdb2/transaction.c                             | 1308 ++++++
 lib/tdb2/traverse.c                                |   99 +
 lib/tdb2/wscript                                   |   99 +
 lib/tdb_compat/tdb_compat.c                        |  102 +
 lib/tdb_compat/tdb_compat.h                        |  136 +
 lib/tdb_compat/wscript                             |   27 +
 lib/util/tdb_wrap.c                                |   35 +-
 lib/util/tdb_wrap.h                                |    2 +-
 lib/util/util_tdb.c                                |   30 +-
 lib/util/util_tdb.h                                |   16 +-
 lib/util/wscript_build                             |    4 +-
 libcli/auth/schannel_state_tdb.c                   |    4 +-
 selftest/target/Samba3.pm                          |    6 +-
 selftest/wscript                                   |    3 +
 source3/Makefile.in                                |    3 +-
 source3/configure.in                               |    3 +
 source3/groupdb/mapping.c                          |    2 +-
 source3/groupdb/mapping_tdb.c                      |    2 +-
 source3/include/ctdbd_conn.h                       |    2 +-
 source3/include/dbwrap.h                           |    2 +-
 source3/include/printing.h                         |    6 +-
 source3/include/util_tdb.h                         |    2 +-
 source3/lib/dbwrap_ctdb.c                          |   15 +-
 source3/lib/dbwrap_tdb.c                           |    8 +-
 source3/lib/dbwrap_util.c                          |    6 +-
 source3/lib/eventlog/eventlog.c                    |   10 +-
 source3/lib/eventlog/eventlog.h                    |    2 +-
 source3/lib/gencache.c                             |   59 +-
 source3/lib/messages_local.c                       |    6 +-
 source3/lib/server_mutex.c                         |    2 +-
 source3/lib/serverid.c                             |    2 +-
 source3/lib/tdb_validate.c                         |   16 +-
 source3/lib/tdb_validate.h                         |    2 +-
 source3/lib/util.c                                 |    8 +-
 source3/lib/util_tdb.c                             |  133 +-
 source3/libsmb/samlogon_cache.c                    |    2 +-
 source3/libsmb/smb_share_modes.c                   |   47 +-
 source3/locking/brlock.c                           |    2 +-
 source3/locking/locking.c                          |    2 +-
 source3/modules/nfs4_acls.c                        |    2 +-
 source3/modules/vfs_acl_tdb.c                      |    2 +-
 source3/modules/vfs_xattr_tdb.c                    |    2 +-
 source3/nmbd/nmbd_winsserver.c                     |    2 +-
 source3/passdb/login_cache.c                       |    4 +-
 source3/printing/notify.c                          |    2 +-
 source3/printing/nt_printing_migrate.c             |    8 +-
 source3/printing/nt_printing_tdb.c                 |   26 +-
 source3/printing/printing.c                        |   54 +-
 source3/printing/printing_db.c                     |    2 +-
 source3/printing/tests/vlp.c                       |    5 +-
 source3/registry/reg_backend_db.c                  |    2 +-
 source3/registry/reg_perfcount.c                   |   16 +-
 source3/rpc_server/srvsvc/srv_srvsvc_nt.c          |    2 +-
 source3/selftest/ktest-secrets.tdb2                |  Bin 0 -> 14592 bytes
 source3/smbd/connection.c                          |    2 +-
 source3/smbd/files.c                               |    5 +-
 source3/smbd/globals.c                             |    2 +-
 source3/smbd/mangle_hash.c                         |    5 +
 source3/smbd/notify_internal.c                     |    2 +-
 source3/smbd/proto.h                               |    5 +
 source3/smbd/session.c                             |    2 +-
 source3/smbd/statcache.c                           |    4 +-
 source3/torture/mangle_test.c                      |    2 +-
 source3/torture/torture.c                          |    8 +-
 source3/utils/net_g_lock.c                         |    2 +-
 source3/utils/net_idmap_check.c                    |    4 +-
 source3/utils/net_printing.c                       |   16 +-
 source3/utils/net_serverid.c                       |    4 +-
 source3/utils/status.c                             |    2 +-
 source3/winbindd/idmap_tdb.c                       |   18 +-
 source3/winbindd/winbindd_cache.c                  |   20 +-
 source3/wscript                                    |    9 +-
 source3/wscript_build                              |   84 +-
 source4/cluster/local.c                            |    2 +-
 source4/lib/ldb-samba/ldb_wrap.c                   |    2 +-
 source4/lib/ldb-samba/wscript_build                |    2 +-
 source4/lib/ldb/ldb_tdb/ldb_index.c                |   12 +-
 source4/lib/ldb/ldb_tdb/ldb_pack.c                 |    4 +-
 source4/lib/ldb/ldb_tdb/ldb_search.c               |    7 +-
 source4/lib/ldb/ldb_tdb/ldb_tdb.c                  |   19 +-
 source4/lib/ldb/ldb_tdb/ldb_tdb.h                  |    8 +-
 source4/lib/ldb/ldb_tdb/ldb_tdb_wrap.c             |   76 +-
 source4/lib/ldb/wscript                            |   17 +-
 source4/lib/messaging/messaging.c                  |    2 +-
 source4/ntvfs/common/brlock.c                      |    2 +-
 source4/ntvfs/common/brlock_tdb.c                  |   14 +-
 source4/ntvfs/common/notify.c                      |    2 +-
 source4/ntvfs/common/opendb_tdb.c                  |    4 +-
 source4/ntvfs/posix/python/pyxattr_tdb.c           |    2 +-
 source4/ntvfs/posix/vfs_posix.c                    |    2 +-
 source4/ntvfs/posix/xattr_tdb.c                    |    8 +-
 source4/scripting/python/samba/samba3.py           |    7 +-
 source4/torture/basic/mangle_test.c                |    4 +-
 source4/torture/local/dbspeed.c                    |    6 +-
 testdata/samba3/account_policy.tdb2                |  Bin 0 -> 12192 bytes
 testdata/samba3/group_mapping.tdb2                 |  Bin 0 -> 14592 bytes
 testdata/samba3/passdb.tdb2                        |  Bin 0 -> 11392 bytes
 testdata/samba3/registry.tdb2                      |  Bin 0 -> 15392 bytes
 testdata/samba3/secrets.tdb2                       |  Bin 0 -> 17792 bytes
 testdata/samba3/share_info.tdb2                    |  Bin 0 -> 11392 bytes
 testdata/samba3/winbindd_idmap.tdb2                |  Bin 0 -> 15392 bytes
 testsuite/printing/psec.c                          |    4 +-
 wscript                                            |    1 +
 wscript_build                                      |    3 +-
 321 files changed, 41981 insertions(+), 418 deletions(-)
 create mode 100644 lib/ccan/array_size/LICENSE
 create mode 100644 lib/ccan/array_size/_info
 create mode 100644 lib/ccan/array_size/array_size.h
 create mode 100644 lib/ccan/array_size/test/compile_fail-function-param.c
 create mode 100644 lib/ccan/array_size/test/compile_fail.c
 create mode 100644 lib/ccan/array_size/test/run.c
 create mode 100644 lib/ccan/asearch/LICENSE
 create mode 100644 lib/ccan/asearch/_info
 create mode 100644 lib/ccan/asearch/asearch.h
 create mode 100644 lib/ccan/asearch/test/compile_fail-return-value-const.c
 create mode 100644 lib/ccan/asearch/test/compile_fail-return-value.c
 create mode 100644 lib/ccan/asearch/test/run-strings.c
 create mode 100644 lib/ccan/asearch/test/run.c
 create mode 100644 lib/ccan/build_assert/LICENSE
 create mode 100644 lib/ccan/build_assert/_info
 create mode 100644 lib/ccan/build_assert/build_assert.h
 create mode 100644 lib/ccan/build_assert/test/compile_fail-expr.c
 create mode 100644 lib/ccan/build_assert/test/compile_fail.c
 create mode 100644 lib/ccan/build_assert/test/compile_ok.c
 create mode 100644 lib/ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c
 create mode 100644 lib/ccan/build_assert/test/run-EXPR_BUILD_ASSERT.c
 create mode 100644 lib/ccan/cast/LICENSE
 create mode 100644 lib/ccan/cast/_info
 create mode 100644 lib/ccan/cast/cast.h
 create mode 100644 lib/ccan/cast/test/compile_fail-cast_const.c
 create mode 100644 lib/ccan/cast/test/compile_fail-cast_const2.c
 create mode 100644 lib/ccan/cast/test/compile_fail-cast_const3.c
 create mode 100644 lib/ccan/cast/test/compile_fail-cast_signed-const.c
 create mode 100644 lib/ccan/cast/test/compile_fail-cast_signed-sizesame.c
 create mode 100644 lib/ccan/cast/test/compile_fail-cast_signed.c
 create mode 100644 lib/ccan/cast/test/compile_fail-cast_static-2.c
 create mode 100644 lib/ccan/cast/test/compile_fail-cast_static-3.c
 create mode 100644 lib/ccan/cast/test/compile_fail-cast_static.c
 create mode 100644 lib/ccan/cast/test/compile_ok-cast_void.c
 create mode 100644 lib/ccan/compiler/LICENSE
 create mode 100644 lib/ccan/compiler/_info
 create mode 100644 lib/ccan/compiler/compiler.h
 create mode 100644 lib/ccan/compiler/test/compile_fail-printf.c
 create mode 100644 lib/ccan/compiler/test/run-is_compile_constant.c
 create mode 100644 lib/ccan/endian/LICENSE
 create mode 100644 lib/ccan/endian/_info
 create mode 100644 lib/ccan/endian/endian.h
 create mode 100644 lib/ccan/endian/test/run.c
 create mode 100644 lib/ccan/hash/_info
 create mode 100644 lib/ccan/hash/hash.c
 create mode 100644 lib/ccan/hash/hash.h
 create mode 100644 lib/ccan/hash/test/api-hash_stable.c
 create mode 100644 lib/ccan/hash/test/run.c
 create mode 100644 lib/ccan/htable/LICENSE
 create mode 100644 lib/ccan/htable/_info
 create mode 100644 lib/ccan/htable/htable.c
 create mode 100644 lib/ccan/htable/htable.h
 create mode 100644 lib/ccan/htable/htable_type.h
 create mode 100644 lib/ccan/htable/test/run-type.c
 create mode 100644 lib/ccan/htable/test/run.c
 create mode 100644 lib/ccan/htable/tools/Makefile
 create mode 100644 lib/ccan/htable/tools/speed.c
 create mode 100644 lib/ccan/ilog/LICENSE
 create mode 100644 lib/ccan/ilog/_info
 create mode 100644 lib/ccan/ilog/ilog.c
 create mode 100644 lib/ccan/ilog/ilog.h
 create mode 100644 lib/ccan/ilog/test/run-out-of-line.c
 create mode 100644 lib/ccan/ilog/test/run.c
 create mode 100644 lib/ccan/libccan.m4
 create mode 100644 lib/ccan/likely/LICENSE
 create mode 100644 lib/ccan/likely/_info
 create mode 100644 lib/ccan/likely/likely.c
 create mode 100644 lib/ccan/likely/likely.h
 create mode 100644 lib/ccan/likely/test/run-debug.c
 create mode 100644 lib/ccan/likely/test/run.c
 create mode 100644 lib/ccan/str/LICENSE
 create mode 100644 lib/ccan/str/_info
 create mode 100644 lib/ccan/str/debug.c
 create mode 100644 lib/ccan/str/str.c
 create mode 100644 lib/ccan/str/str.h
 create mode 100644 lib/ccan/str/str_debug.h
 create mode 100644 lib/ccan/str/test/compile_fail-isalnum.c
 create mode 100644 lib/ccan/str/test/compile_fail-isalpha.c
 create mode 100644 lib/ccan/str/test/compile_fail-isascii.c
 create mode 100644 lib/ccan/str/test/compile_fail-isblank.c
 create mode 100644 lib/ccan/str/test/compile_fail-iscntrl.c
 create mode 100644 lib/ccan/str/test/compile_fail-isdigit.c
 create mode 100644 lib/ccan/str/test/compile_fail-islower.c
 create mode 100644 lib/ccan/str/test/compile_fail-isprint.c
 create mode 100644 lib/ccan/str/test/compile_fail-ispunct.c
 create mode 100644 lib/ccan/str/test/compile_fail-isspace.c
 create mode 100644 lib/ccan/str/test/compile_fail-isupper.c
 create mode 100644 lib/ccan/str/test/compile_fail-isxdigit.c
 create mode 100644 lib/ccan/str/test/compile_fail-strchr.c
 create mode 100644 lib/ccan/str/test/compile_fail-strrchr.c
 create mode 100644 lib/ccan/str/test/compile_fail-strstr.c
 create mode 100644 lib/ccan/str/test/debug.c
 create mode 100644 lib/ccan/str/test/run.c
 create mode 100644 lib/ccan/tally/LICENSE
 create mode 100644 lib/ccan/tally/_info
 create mode 100644 lib/ccan/tally/tally.c
 create mode 100644 lib/ccan/tally/tally.h
 create mode 100644 lib/ccan/tally/test/run-bucket_of.c
 create mode 100644 lib/ccan/tally/test/run-divlu64.c
 create mode 100644 lib/ccan/tally/test/run-histogram.c
 create mode 100644 lib/ccan/tally/test/run-mean.c
 create mode 100644 lib/ccan/tally/test/run-median.c
 create mode 100644 lib/ccan/tally/test/run-min-max.c
 create mode 100644 lib/ccan/tally/test/run-mode.c
 create mode 100644 lib/ccan/tally/test/run-renormalize.c
 create mode 100644 lib/ccan/tally/test/run-total.c
 create mode 100644 lib/ccan/typesafe_cb/LICENSE
 create mode 100644 lib/ccan/typesafe_cb/_info
 create mode 100644 lib/ccan/typesafe_cb/test/compile_fail-cast_if_any.c
 create mode 100644 lib/ccan/typesafe_cb/test/compile_fail-cast_if_type-promotable.c
 create mode 100644 lib/ccan/typesafe_cb/test/compile_fail-cast_if_type.c
 create mode 100644 lib/ccan/typesafe_cb/test/compile_fail-typesafe_cb-int.c
 create mode 100644 lib/ccan/typesafe_cb/test/compile_fail-typesafe_cb.c
 create mode 100644 lib/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast-multi.c
 create mode 100644 lib/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast.c
 create mode 100644 lib/ccan/typesafe_cb/test/compile_fail-typesafe_cb_exact.c
 create mode 100644 lib/ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c
 create mode 100644 lib/ccan/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c
 create mode 100644 lib/ccan/typesafe_cb/test/compile_ok-cast_if_any.c
 create mode 100644 lib/ccan/typesafe_cb/test/compile_ok-typesafe_cb-NULL.c
 create mode 100644 lib/ccan/typesafe_cb/test/compile_ok-typesafe_cb-const.c
 create mode 100644 lib/ccan/typesafe_cb/test/compile_ok-typesafe_cb-undefined.c
 create mode 100644 lib/ccan/typesafe_cb/test/compile_ok-typesafe_cb-vars.c
 create mode 100644 lib/ccan/typesafe_cb/test/compile_ok-typesafe_cb-volatile.c
 create mode 100644 lib/ccan/typesafe_cb/test/compile_ok-typesafe_cb_cast.c
 create mode 100644 lib/ccan/typesafe_cb/test/compile_ok-typesafe_cb_def-const.c
 create mode 100644 lib/ccan/typesafe_cb/test/run.c
 create mode 100644 lib/ccan/typesafe_cb/typesafe_cb.h
 create mode 100644 lib/ccan/wscript
 create mode 100644 lib/tdb2/LICENSE
 create mode 100644 lib/tdb2/TODO
 create mode 100644 lib/tdb2/_info
 create mode 100644 lib/tdb2/check.c
 create mode 100644 lib/tdb2/doc/TDB1_porting.txt
 create mode 100644 lib/tdb2/doc/design-1.3.txt
 create mode 100644 lib/tdb2/doc/design.lyx
 create mode 100644 lib/tdb2/doc/design.lyx,v
 create mode 100644 lib/tdb2/doc/design.pdf
 create mode 100644 lib/tdb2/doc/design.txt
 create mode 100644 lib/tdb2/free.c
 create mode 100644 lib/tdb2/hash.c
 create mode 100644 lib/tdb2/io.c
 create mode 100644 lib/tdb2/lock.c
 create mode 100644 lib/tdb2/open.c
 create mode 100644 lib/tdb2/private.h
 create mode 100644 lib/tdb2/pytdb.c
 create mode 100644 lib/tdb2/summary.c
 create mode 100644 lib/tdb2/tdb.c
 create mode 100644 lib/tdb2/tdb2.h
 create mode 100644 lib/tdb2/test/external-agent.c
 create mode 100644 lib/tdb2/test/external-agent.h
 create mode 100644 lib/tdb2/test/failtest_helper.c
 create mode 100644 lib/tdb2/test/failtest_helper.h
 create mode 100644 lib/tdb2/test/layout.c
 create mode 100644 lib/tdb2/test/layout.h
 create mode 100644 lib/tdb2/test/lock-tracking.c
 create mode 100644 lib/tdb2/test/lock-tracking.h
 create mode 100644 lib/tdb2/test/logging.c
 create mode 100644 lib/tdb2/test/logging.h
 create mode 100644 lib/tdb2/test/run-001-encode.c
 create mode 100644 lib/tdb2/test/run-001-fls.c
 create mode 100644 lib/tdb2/test/run-01-new_database.c
 create mode 100644 lib/tdb2/test/run-02-expand.c
 create mode 100644 lib/tdb2/test/run-03-coalesce.c
 create mode 100644 lib/tdb2/test/run-04-basichash.c
 create mode 100644 lib/tdb2/test/run-05-readonly-open.c
 create mode 100644 lib/tdb2/test/run-10-simple-store.c
 create mode 100644 lib/tdb2/test/run-11-simple-fetch.c
 create mode 100644 lib/tdb2/test/run-12-store.c
 create mode 100644 lib/tdb2/test/run-13-delete.c
 create mode 100644 lib/tdb2/test/run-14-exists.c
 create mode 100644 lib/tdb2/test/run-15-append.c
 create mode 100644 lib/tdb2/test/run-16-wipe_all.c
 create mode 100644 lib/tdb2/test/run-20-growhash.c
 create mode 100644 lib/tdb2/test/run-21-parse_record.c
 create mode 100644 lib/tdb2/test/run-25-hashoverload.c
 create mode 100644 lib/tdb2/test/run-30-exhaust-before-expand.c
 create mode 100644 lib/tdb2/test/run-50-multiple-freelists.c
 create mode 100644 lib/tdb2/test/run-55-transaction.c
 create mode 100644 lib/tdb2/test/run-56-open-during-transaction.c
 create mode 100644 lib/tdb2/test/run-57-die-during-transaction.c
 create mode 100644 lib/tdb2/test/run-64-bit-tdb.c
 create mode 100644 lib/tdb2/test/run-80-tdb_fd.c
 create mode 100644 lib/tdb2/test/run-81-seqnum.c
 create mode 100644 lib/tdb2/test/run-82-lockattr.c
 create mode 100644 lib/tdb2/test/run-83-openhook.c
 create mode 100644 lib/tdb2/test/run-90-get-set-attributes.c
 create mode 100644 lib/tdb2/test/run-91-get-stats.c
 create mode 100644 lib/tdb2/test/run-add-remove-flags.c
 create mode 100644 lib/tdb2/test/run-check-callback.c
 create mode 100644 lib/tdb2/test/run-expand-in-transaction.c
 create mode 100644 lib/tdb2/test/run-features.c
 create mode 100644 lib/tdb2/test/run-firstkey-nextkey.c
 create mode 100644 lib/tdb2/test/run-fork-test.c
 create mode 100644 lib/tdb2/test/run-lockall.c
 create mode 100644 lib/tdb2/test/run-locktimeout.c
 create mode 100644 lib/tdb2/test/run-missing-entries.c
 create mode 100644 lib/tdb2/test/run-open-multiple-times.c
 create mode 100644 lib/tdb2/test/run-record-expand.c
 create mode 100644 lib/tdb2/test/run-remap-in-read_traverse.c
 create mode 100644 lib/tdb2/test/run-seed.c
 create mode 100644 lib/tdb2/test/run-simple-delete.c
 create mode 100644 lib/tdb2/test/run-summary.c
 create mode 100644 lib/tdb2/test/run-tdb_errorstr.c
 create mode 100644 lib/tdb2/test/run-traverse.c
 create mode 100644 lib/tdb2/tools/Makefile
 create mode 100644 lib/tdb2/tools/growtdb-bench.c
 create mode 100644 lib/tdb2/tools/mktdb2.c
 create mode 100644 lib/tdb2/tools/speed.c
 create mode 100644 lib/tdb2/tools/tdb2dump.c
 create mode 100644 lib/tdb2/tools/tdb2restore.c
 create mode 100644 lib/tdb2/tools/tdb2tool.c
 create mode 100644 lib/tdb2/tools/tdb2torture.c
 create mode 100644 lib/tdb2/transaction.c
 create mode 100644 lib/tdb2/traverse.c
 create mode 100644 lib/tdb2/wscript
 create mode 100644 lib/tdb_compat/tdb_compat.c
 create mode 100644 lib/tdb_compat/tdb_compat.h
 create mode 100644 lib/tdb_compat/wscript
 create mode 100644 source3/selftest/ktest-secrets.tdb2
 create mode 100644 testdata/samba3/account_policy.tdb2
 create mode 100644 testdata/samba3/group_mapping.tdb2
 create mode 100644 testdata/samba3/passdb.tdb2
 create mode 100644 testdata/samba3/registry.tdb2
 create mode 100644 testdata/samba3/secrets.tdb2
 create mode 100644 testdata/samba3/share_info.tdb2
 create mode 100644 testdata/samba3/winbindd_idmap.tdb2

Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba3.py b/buildtools/wafsamba/samba3.py
index e44e28b..c11e7d8 100644
--- a/buildtools/wafsamba/samba3.py
+++ b/buildtools/wafsamba/samba3.py
@@ -51,14 +51,18 @@ def s3_fix_kwargs(bld, kwargs):
     s3reldir = os_path_relpath(s3dir, bld.curdir)
     # the extra_includes list is relative to the source3 directory
-    extra_includes = [ '.', 'include', 'lib' ]
+    extra_includes = [ '.', 'include', 'lib', '../lib/tdb_compat' ]
     if bld.env.use_intree_heimdal:
         extra_includes += [ '../source4/heimdal/lib/com_err',
                             '../source4/heimdal_build' ]
-    if not bld.CONFIG_SET('USING_SYSTEM_TDB'):
-        extra_includes += [ '../lib/tdb/include' ]
+    if bld.CONFIG_SET('BUILD_TDB2'):
+        if not bld.CONFIG_SET('USING_SYSTEM_TDB2'):
+            extra_includes += [ '../lib/tdb2' ]
+    else:
+        if not bld.CONFIG_SET('USING_SYSTEM_TDB'):
+            extra_includes += [ '../lib/tdb/include' ]
         extra_includes += [ '../lib/tevent' ]
diff --git a/lib/ccan/array_size/LICENSE b/lib/ccan/array_size/LICENSE
new file mode 100644
index 0000000..5522aa5
--- /dev/null
+++ b/lib/ccan/array_size/LICENSE
@@ -0,0 +1,508 @@
+                       Version 2.1, February 1999
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+	51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+                            Preamble
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes a de-facto standard.  To achieve this, non-free programs must
+be allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation and installation of the library.
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+    a) The modified work must itself be a software library.
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+    c) Accompany the work with a written offer, valid for at least
+    three years, to give the same user the materials specified in
+    Subsection 6a, above, for a charge no more than the cost of
+    performing this distribution.
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+                            NO WARRANTY
+                     END OF TERMS AND CONDITIONS
+           How to Apply These Terms to Your New Libraries
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms

Samba Shared Repository

More information about the samba-cvs mailing list