[SCM] Samba Shared Repository - branch v4-1-test updated

Karolin Seeger kseeger at samba.org
Tue Jul 15 07:02:04 MDT 2014


The branch, v4-1-test has been updated
       via  610320e s4:dsdb/repl_meta_data: make sure objectGUID can't be deleted
       via  b532f24 selftest: teardown the environments also on getting SIGPIPE
       via  d485ebd libwbclient: allow only one initial_blob/challenge_blob in wbcCredentialCache()
       via  0390735 s3: libwbclient: Don't break out of loop too soon - find all parameters.
       via  82f4748 s4:dsdb/samldb: don't allow 'userParameters' to be modified over LDAP for now
       via  a29068f dbcheck: Add check and test for various invalid userParameters values
       via  75eaf99 dsdb: Always store and return the userParameters as a array of LE 16-bit values
       via  50b6474 dsdb: Set syntax of userParameters to binary string, not unicode string
       via  30e638f torture4: Make raw.lock.multilock fail after 20 seconds
       via  dfe449a torture4: Adapt comment to code
       via  7eb800d s4: smbtorture: Add multi-lock test. Regression test for bug #10684.
       via  2f118b6 s3: smbd: Locking - re-add pending lock records if we fail to acquire a lock (and the lock hasn't timed out).
       via  01753e8 s3: smbd: Locking - treat lock timeout the same as any other error.
       via  6484211 s3: smbd: Locking - add and use utility function lock_timed_out().
       via  76dd28b s3: smbd: Locking - convert to using utility macro used elsewhere.
       via  b23e9d5 s4:dsdb/extended_dn_in: don't force DSDB_SEARCH_SHOW_RECYCLED
       via  f23869c s4:dsdb/kcc: use SHOW_RECYCLED instead of SHOW_DELETED in when deleting tombstone/deleted objects
       via  498e7cc s4:dsdb/schema_load: make error message more verbose
       via  38c5f5b dbcheck: Ensure dbcheck can operate with --attrs set
       via  e4bf67a kerberos: Remove un-used event context argument from smb_krb5_init_context()
       via  c0091d0 dsdb: Specify no event context to smb_krb5_init_context() in dsdb
       via  4c0595f dsdb: Add DSDB_SEARCH_ONE_ONLY support to dsdb_module_search*()
       via  bdd363a dsdb: Do not permit nested event loops when in a transaction, use a nested event context
       via  5289cb9 dsdb: Rename private_data to rootdse_private_data in rootdse
       via  f377654 dsdb: Add more tests for DN+String and DN+Binary comparisons
       via  f18a67a selftest: Add tests for dbcheck detection and removal of partial objects
       via  ddfbfd7 dsdb: Make it harder to corrupt the database by requiring DBCHECK or RELAX for final object deletion
       via  5572384 build: Exclude source4/selftest/provisions/release-4-1-0rc3 from the tarball
       via  f2c728d dbcheck: Directly call dn.get_rdn_{val,name}() for clarity and consistency
       via  7746ad2 dbchecker: verify and fix broken dn values
       via  8546c70 dbchecker: make the deleted objects container detection more generic
       via  1b4a949 dsdb: Do not refresh the schema using the wrong event context
       via  f72899e dsdb: Do not store a struct ldb_dn in struct schema_data
       via  4730d74 samba-tool dbcheck: handle missing objectClass
       via  87b40d4 dsdb: Improve missing objectClass handling
       via  56caec5 dsdb: Improve errors and checks for missing objectClass values
       via  483d5e3 dsdb: Clarify how the DSDB_REPL_FLAG_PRIORITISE_INCOMING flag works
       via  a2d3f1a dsdb: Do not update notify_uSN until the transaction is genuinely committed to the DB
       via  519d069 dsdb: Further assert that we always have an objectClass and an rDN
       via  ddf9b85 dsdb: Ensure to sort replPropertyMetaData as UNSIGNED, not SIGNED quantities
       via  5ce7f30 s4:samdb: respect SEARCH_FLAG_PRESERVEONDELETE
       via  73e5b13 s4-samldb: Do not allow deletion of objects with RID < 1000
       via  f4f9a65 dsdb: Use dsdb_next_callback() rather than a no-op per-module callback
       via  b5294f2 s4-dsdb: instanceType NC_HEAD is only allowed combined with WRITE for an originating add operation
       via  48b8d0e s4:dsdb/repl: make use of dcerpc_binding_handle_is_connected()
       via  0bd326d s3:smb2_read: let smb2_sendfile_send_data() behave like send_file_readX()
       via  a8adafa net/doc: make clear that net vampire is for NT4 domains only
       via  c0dd653 ldb:build: improve detection of srcdir
       via  dd2a1ea ldb: make the successful ldb_transaction_start() message clearer
       via  4b5ec41 ldb: change version to 1.1.17
       via  94c793d ldb:pyldb: add some more helper functions for LdbDn
       via  d2615ee ldb:pyldb: fix doc string for set_extended_component()
       via  1ac7ee6 ldb:pyldb: add some const to PyObject_FromLdbValue()
       via  0c1511e ldb: Add a env variable to disable RTLD_DEEPBIND.
       via  86508d7 ldb: pass module init errors back to the caller
       via  ad4a09c ldb: Return LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS rather than OPERATIONS_ERROR on EACCES and EPERM
       via  a8c9519 ldb: Fix 1138330 Dereference null return value
       via  90da5f3 lib/ldb fix compiler warnings
       via  7c98a57 lib/ldb fix compiler warnings
       via  3f4d6d2 ldb: use of NULL pointer bugfix
       via  0919ef3 ldb: Fix CID 241329 Array compared against 0
       via  8a618ab ldb: Fix CID 240798 Uninitialized pointer read
       via  b4960c4 ldb:rdn_name: reject 'distinguishedName' depending of the MOD flags
       via  b89ef65 dsdb/tests/ldap: fix test_distinguished_name against w2k8r2
       via  540dd6f s4-openldap: Remove use of talloc_reference in ldb_map_outbound.c
       via  cdd4ef6 Add LDB_MAP_RENDROP option
       via  c257bc6 Fix SEGV from improperly formed SUBSTRING/PRESENCE filter
       via  3d932b0 Cleanup map return codes
       via  1173cd7 ldb: Show the type of failing operation in default error message
       via  06c993e ldb: Do not build libldb-cmdline when using system ldb.
       via  c638eee ldb_map: Fix CID 1034791 Dereference null return value
       via  d990fa2 pyldb: Fix CID 1034792 Dereference null return value
       via  c7a376e ldb: Fix CID 1034793 Dereference null return value
       via  fc8d199 ldb: Fix a const warning
       via  3e51316 pyldb: decrement ref counters on py_results and quiet warnings
       via  b4904f6 provision: capture slightly less generic exceptions during the test for acls
       via  8892da9 pysmbd: improve the return of error codes in the python smbd bindings
       via  a9b2df4 provision: improve error message when connecting to samdb without the correct permissions
       via  1da8bec provision: Fix failures on re-provision incorrectly blamed on posix acl support.
       via  a4c1e9a passdb: Do not routinely clear the global memory returned by get_global_sam_sid()
       via  656e363 samdb: Fix CID 1034910 Dereference before null check
       via  a678cd4 samdb: Fix CID 1034910 Dereference before null check
       via  0b3f7af s4:dsdb/ldb_modules: avoid invalid pointer type warnings
       via  3251430 s4:dsdb fix compiler warnings
       via  d6d69c6 s4-dsdb: Fix a use after free segfault.
       via  7013fff s4:dsdb fix compiler warnings
       via  6b2d4aa s4:dsdb fix compiler warnings
       via  c66913f s4:dsdb/ldb_modules: avoid declaration after code warnings
       via  bbe79b8 s4-rpc_server/drsuapi: Print ldb error showing why we failed to perform the access check
       via  8bf3d4e s4-dsacl: Fixed incorrect handling of privileges in sec_access_check_ds
       via  ee2cf1d dsdb: Return LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS rather than OPERATIONS_ERROR on EACCES and EPERM
       via  7e07e6d dsdb: Do not give an error is metadata.tdb does not yet exist
       via  ccfc87f dsdb: Provide a clearer error when we fail to store the sequence number in metadata.tdb
       via  dbaab08 samdb: Fix CID 1034910 Dereference before null check
       via  f18e5f5 drs-cracksname: fix problems that prevented to pass our torture tests
       via  13a5eca drs-crackname: Fix error code so that we have the same as windows
       via  e7eed8f drs-cracknames: When cracking NT4 names we should just look at netbios for the match
       via  4ffc82e drs-crackname: Fix cracknames for the format UNKNOWN when the data is actually a GUID
       via  29ec8f4 selftest/subunithelper.py: correctly pass testsuite-uxsuccess to end_testsuite()
       via  484d746 selftest/subunithelper.py: correctly handle fail_immediately in end_testsuite of FilterOps
       via  be09c41 selftest/subunithelper.py: correctly handle unexpected success in FilterOps
       via  2354597 script/autobuild: use --force-rebase option
       via  50af515 s4:repl_meta_data: fix array assignment in replmd_process_linked_attribute()
       via  7408da9 torture3: Fix bug 10687
       via  93c1a27 libsmb: Provide a talloc_stackframe() to external users of libsmb_setget.c
       via  5c503dd libsmbclient: Wrap more function calls in talloc_stackframe() to protect against talloc_tos() calls
       via  14a9705 pam_smbpass: Wrap calls in talloc_stackframe() to avoid warnings about leaking memory
       via  14e7f98 smbd: Avoid double-free in get_print_db_byname
       via  c8904fa s3: smbd: Locking, fix off-by one calculation in brl_pending_overlap().
       via  74a8055 smbstatus: Fix an uninitialized variable
       via  a9dcd02 s3: fix missing braces in nfs4_acls.c
       via  79f1129 s3:winbindd - fix bad bugfix for bug #10280 - winbind panic if AD server is down.
       via  f925ebc s3/s4: smbd, rpc, ldap, cldap, kdc services.
       via  2541ab3 samba-tool: add --site parameter to provision command (bug #10674)
       via  f1b969b provision/sambadns: remove redundant site parameter
       via  7e38fcb msg_channel: Fix a 100% CPU loop
       via  406e412 smbd: Fix bug 10593
      from  3390f57 VERSION: Bump version up to 4.1.10.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-1-test


- Log -----------------------------------------------------------------
commit 610320ee67ff1430ebd72bcd187953b6f9127045
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Jul 7 23:51:31 2014 +0200

    s4:dsdb/repl_meta_data: make sure objectGUID can't be deleted
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=9763
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit d64bc6c9af24109e89632db9133070f2ab827c46)
    
    Autobuild-User(v4-1-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-1-test): Tue Jul 15 15:01:25 CEST 2014 on sn-devel-104

commit b532f24b4af8417c30b3087da44d6e386e62261c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 10 14:28:56 2014 +0200

    selftest: teardown the environments also on getting SIGPIPE
    
    make test uses
    
    selftest.pl | subuntu-filter.py ...
    
    FAIL_IMMEDIATELY=1 lets subuntu-filter.py exit,
    which generates SIGPIPE in selftest.pl.
    
    We should handle this just like any other signal
    and teardown all environments.
    
    This should make the teardown process more reliable/verbose.
    
    Pair-Programmed-With: Michael Adam <obnox at samba.org>
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Signed-off-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit b2803950fc439017680069813fc49255a3f0cbbf)
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10696
    backport autobuild/selftest fixes from master

commit d485ebdb56ec6688569b574010b7fef7b50724bd
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 10 05:28:36 2014 +0200

    libwbclient: allow only one initial_blob/challenge_blob in wbcCredentialCache()
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10692
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 0390735f788a31c16b0a2976164cbff856af1d54
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jul 8 16:36:30 2014 -0700

    s3: libwbclient: Don't break out of loop too soon - find all parameters.
    
    Fix bug #10692: wbcCredentialCache fails if challenge_blob is not first
    
    https://bugzilla.samba.org/show_bug.cgi?id=10692
    
    Signed-off-by: Jeremy Allison <jra at samba.org>

commit 82f4748509d8e5949f230b8039d1ed474c18008d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jul 8 16:19:09 2014 +0200

    s4:dsdb/samldb: don't allow 'userParameters' to be modified over LDAP for now
    
    For now it's safer to reject setting 'userParameters' via LDAP,
    as we'll not provide the same behavior as a Windows Server.
    
    If someone requires that feature please report this in the following
    bug reports!
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=8077
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10130
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Wed Jul  9 11:07:51 CEST 2014 on sn-devel-104
    
    (cherry picked from commit 04e9d020c97c2dcd360b1845907f4c396d5671dc)

commit a29068fea97dc7d7e0469dad27b855ba62a47005
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Jun 17 16:00:57 2014 +1200

    dbcheck: Add check and test for various invalid userParameters values
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=8077
    Change-Id: I6f2f4169856ce78c62e3a7e74b48520cca9cb9ae
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 9bfbff65436a088fab5d564b6c0bb122a76492bc)

commit 75eaf99d06aaa193873d3164615538e78fed6e80
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Jun 17 16:03:22 2014 +1200

    dsdb: Always store and return the userParameters as a array of LE 16-bit values
    
    This is not allowed to be odd length, as otherwise we can not send it over the SAMR transport correctly.
    
    Allocating one byte less memory than required causes malloc() heap corruption
    and then a crash or lockup of the SAMR server.
    
    Andrew Bartlett
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10130
    Change-Id: I5c0c531c1d660141e07f884a4789ebe11c1716f6
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit d7b4d10aba90f4a1acf01d1d5ab62161862f62f7)

commit 50b6474fd1b15450c410262d97af94214d8187be
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Sep 24 10:12:24 2013 -0700

    dsdb: Set syntax of userParameters to binary string, not unicode string
    
    This means we continue to store the values as given on SAMR, assuming
    that the SAMR buffer is little endian.  The syntax for this specific
    object is forced to be a binary blob, so that it is not converted on
    DRSUAPI.
    
    This commit does not fix existing databases, nor pdb_samba_dsdb (used
    by classicupgrade).
    
    Andrew Bartlett
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=8077
    Change-Id: I10bb6aaecc381194e3c0ce6b9163f961acbdcee1
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 1592eaa5c781af83aa64bc4e7211339e1d1eafce)

commit 30e638f23ba38f311a6519349c27453875701ba1
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Jul 3 10:05:55 2014 +0000

    torture4: Make raw.lock.multilock fail after 20 seconds
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Fri Jul  4 00:04:10 CEST 2014 on sn-devel-104
    
    (cherry picked from commit 0c97b7eb5359b95c0d51a3b5524e82e34243d2d1)
    
    The last 7 patches address bug #10684 - SMB1 blocking locks can fail
    notification on unlock, causing client timeout.

commit dfe449aabf453b7baa73a39f6bc710b17e8443b3
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Jul 3 10:05:39 2014 +0000

    torture4: Adapt comment to code
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 4205463ef1815d6e86e1d1f1f57651ca30407469)

commit 7eb800dc5068b46c30efd5993bb1c30df5e5048e
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jul 1 12:05:07 2014 -0700

    s4: smbtorture: Add multi-lock test. Regression test for bug #10684.
    
    Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout.
    
    https://bugzilla.samba.org/show_bug.cgi?id=10684
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <Volker.Lendecke at SerNet.DE>
    (cherry picked from commit 64346a134dac2bd023f7473202ca38d35ffd3c89)

commit 2f118b639cf1eb1579b8554d42b18b31a5b222dd
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Jul 2 20:51:24 2014 -0700

    s3: smbd: Locking - re-add pending lock records if we fail to acquire a lock (and the lock hasn't timed out).
    
    Keep the blocking lock record and the pending lock records consistent
    if we are dealing with multiple blocking lock requests in one SMB1 LockingX
    request.
    
    Ensure we re-add the records under the record lock, to avoid race
    conditions.
    
    Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout.
    
    https://bugzilla.samba.org/show_bug.cgi?id=10684
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <Volker.Lendecke at SerNet.DE>
    (cherry picked from commit 954401f8b2b16b3e2ef9655e8ce94d657becce36)

commit 01753e8409497f8f82dd637a0ad8402da9464d5c
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Jul 2 20:40:49 2014 -0700

    s3: smbd: Locking - treat lock timeout the same as any other error.
    
    Allows the special case in process_blocking_lock_queue()
    that talks back to the client to be removed.
    
    Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout.
    
    https://bugzilla.samba.org/show_bug.cgi?id=10684
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <Volker.Lendecke at SerNet.DE>
    (cherry picked from commit cc9de6eb091159a84228b988c49261c46c301233)

commit 6484211b6815765cf6e1dcb5b884e82c6edc8bae
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Jul 2 20:18:42 2014 -0700

    s3: smbd: Locking - add and use utility function lock_timed_out().
    
    Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout.
    
    https://bugzilla.samba.org/show_bug.cgi?id=10684
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <Volker.Lendecke at SerNet.DE>
    (cherry picked from commit 12be57ef3b2d1b670be7a83f29cd580938030015)

commit 76dd28b48ba0c6618c0df8833c30ab5e81247cd8
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Jul 2 17:25:22 2014 -0700

    s3: smbd: Locking - convert to using utility macro used elsewhere.
    
    Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout.
    
    https://bugzilla.samba.org/show_bug.cgi?id=10684
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <Volker.Lendecke at SerNet.DE>
    (cherry picked from commit 517fa80bd385c6adcfee03ea6b25599013ad88f5)

commit b23e9d5598c16990ec26f7aea3637760255e1633
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Jul 7 12:00:14 2014 +0200

    s4:dsdb/extended_dn_in: don't force DSDB_SEARCH_SHOW_RECYCLED
    
    We should take the controls the caller provided when we search
    for existing objects.
    
    A search with a basedn of '<GUID=....>' should result in LDB_ERR_NO_SUCH_OBJECT
    is the object has isDeleted=TRUE.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10694
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 9e6349f81edb3914d18bc50473d65c0c1f5bc113)

commit f23869c4f263337429af2b20b9120b10c2a747f9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Jul 7 22:53:19 2014 +0200

    s4:dsdb/kcc: use SHOW_RECYCLED instead of SHOW_DELETED in when deleting tombstone/deleted objects
    
    SHOW_RECYCLED implies SHOW_DELETED.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10694
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit fa177273b87d980f81f19acb2f1a9154f8c6bfd9)

commit 498e7cc4c11494a6c1a8b2f979ca76ae56f0717e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 3 16:00:48 2014 +0200

    s4:dsdb/schema_load: make error message more verbose
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 26fa0b97d0270456becb86d93723a3c8e5d58585)

commit 38c5f5b49e1abcdf3e4d9ef2160de3f9069497f1
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Feb 27 15:17:35 2014 +1300

    dbcheck: Ensure dbcheck can operate with --attrs set
    
    This also includes a test to ensure we do not regress on this point.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit f596dc94e1ab839f13e2a9edbcec774635b5c211)

commit e4bf67aed49b16610f517f871576bb644312c9c1
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Apr 17 22:35:33 2014 +1200

    kerberos: Remove un-used event context argument from smb_krb5_init_context()
    
    The event context here was only specified in the server or admin-tool
    context, which does not do network communication, so this only caused
    a talloc_reference() and never any useful result.
    
    The actual network communication code sets an event context directly
    before making the network call.
    
    Andrew Bartlett
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Mon Apr 28 02:24:57 CEST 2014 on sn-devel-104
    
    (cherry picked from commit 086c06e361962e1c118d8eed2316e9df7834ae8b)

commit c0091d0ccf60e368ffe30346ca2cd937186731c6
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Apr 17 21:48:30 2014 +1200

    dsdb: Specify no event context to smb_krb5_init_context() in dsdb
    
    These routines parse principals and generate keys only, no network
    communication is done.
    
    Andrew Bartlett
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 7a26989d4c62f38dcafc2a688b8cbaccc6499480)

commit 4c0595f5c04855e333a59827377db3935c16db80
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Sep 6 15:39:50 2013 +1200

    dsdb: Add DSDB_SEARCH_ONE_ONLY support to dsdb_module_search*()
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit cccc0dee04e2e3aecd82ed4cf887f9e36dd4962d)

commit bdd363a92d136b0c0dbb86d1bf77f7bc48a6b206
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Apr 17 15:39:56 2014 +1200

    dsdb: Do not permit nested event loops when in a transaction, use a nested event context
    
    It is never safe to execute arbitary code inside a transaction - we
    need to get in and get out, not run other events for the rest of the
    server.
    
    This patch avoids that by creating a private event loop during
    transactions, so no unexpected operations fire, and returning the
    original one when we finish it.
    
    If an event fires during an LDB transaction, an unrelated operation
    can occur during the transaction, and if the transaction were to be
    cancelled, there would be a silent rollback (despite the client having
    been indicated success).
    
    Additionally, other processes could be called via IRPC that need to
    operate on the database but are locked out due to the ongoing
    transaction.
    
    Andrew Bartlett
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10582
    Change-Id: I22322fc006e61d7291da17cdf6431416ebb7b30f
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Tue May  6 13:36:20 CEST 2014 on sn-devel-104
    
    (cherry picked from commit 401f555c28aee861385b75c371b5f44cded1d391)

commit 5289cb9f50365832e16a7f9af7626ecbe8e19a50
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Apr 17 15:38:14 2014 +1200

    dsdb: Rename private_data to rootdse_private_data in rootdse
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10582
    
    Change-Id: I349a2be67333ada86c19cd6d2ed283cd5bbeb2aa
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 543c5bf94187473271767ad782439abbfccda00d)

commit f37765469bc17b27e99eebde1ad455fca8810818
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Feb 5 16:22:11 2014 +1300

    dsdb: Add more tests for DN+String and DN+Binary comparisons
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Wed Feb  5 10:41:37 CET 2014 on sn-devel-104
    
    (cherry picked from commit 741e5dca09053d0fc9a6e2a112113f1828a95759)

commit f18a67a840b04146c1f23f902cb2efbed0722b52
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Apr 4 10:40:35 2014 +1300

    selftest: Add tests for dbcheck detection and removal of partial objects
    
    To avoid listing all the provision snapshots, we use a broader blacklist for waf dist
    and a whitelist for dbcheck-oldrelease.sh
    
    Andrew Bartlett
    
    Change-Id: Iab0ff4be0b4287dc128a49302836a6f0f7b39678
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 7c2bf8d2bc5230e4bd98cc5a0f1b8f3cc56a3f77)

commit ddfbfd752b202264f88b398e410592d190f41d00
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Apr 3 14:50:05 2014 +1300

    dsdb: Make it harder to corrupt the database by requiring DBCHECK or RELAX for final object deletion
    
    This kind of deletion can cause us to then replicate back a partial
    object.  We allow dbcheck to directly remove totally corrupt objects
    (missing an objectclass) by specifying both DBCHECK and RELAX, and the
    tombstone sweep after 180 days is done with the RELAX control.
    
    Andrew Bartlett
    
    Change-Id: Ic21f68e507ba9b65e035ca568430e35e2d001c7d
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit b19d80d0a97faffc165f068612f74d4ef8d7e5da)

commit 5572384d450d93176345000ad69b62cc8abcbd3b
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Mar 3 14:26:36 2014 +1300

    build: Exclude source4/selftest/provisions/release-4-1-0rc3 from the tarball
    
    Change-Id: Id4ddaabb91363174d2fbef09e823f53b13912a51
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Fri Mar 21 10:06:04 CET 2014 on sn-devel-104
    
    (cherry picked from commit efad13addca918e18e3df341cc38405a93028940)

commit f2c728d2e7bb6e9f294fc1a5e06a6e00db9ee15d
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Apr 30 09:38:34 2014 +1200

    dbcheck: Directly call dn.get_rdn_{val,name}() for clarity and consistency
    
    When looking for incorrect name values, this improves the previous
    code by avoiding one more manual parse step, and uses less cryptic
    variable names.
    
    Andrew Bartlett
    
    Change-Id: Iff8e571a6359a67bf173f729dc12b8787292b3cb
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
    (cherry picked from commit 393348d11ed781d9f42049d5f996b0bab8b15d58)

commit 7746ad2f360d6580906333ea4060ef0ab731e889
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Mar 13 23:12:39 2014 +0100

    dbchecker: verify and fix broken dn values
    
    With older Samba versions (4.0.x) the following could happen:
    
    - On account was created on DC1
    - It was replicated to DC2
    - The connection between the dcs is offline
    - The account gets modified on DC2
    - The account gets deleted on DC1
    - The connection becomes online again
    - DC1 replicates the modification from DC2,
      this resets the dn to the original value.
      'name' and 'cn' are correct (with '\nDEL${GUID}'),
      but 'dn' is wrong.
    - DC2 replicates the deletion from DC1.
      this doesn't include a changed dn as DC1
      had a bug.
      'name' is correct (with '\nDEL${GUID}'),
      but 'cn' and 'dn' are wrong.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10536
    Change-Id: Ia70a6c12e0ff0d4c2c8100cb1d8f3c6422b65591
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 709ed040ec161e99b3c1f7076eac4a631149f64a)

commit 8546c70984453829273d51e7447ce06101be15bf
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Mar 13 23:12:39 2014 +0100

    dbchecker: make the deleted objects container detection more generic
    
    Change-Id: I282ad887c41412e25fdf73476e405f4e88e0b239
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 821d7dc7b33598f72c4518f8975073b058df5960)

commit 1b4a949ac91495efe53976bc99a01df1a879acdf
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed May 14 20:12:03 2014 +1200

    dsdb: Do not refresh the schema using the wrong event context
    
    What we now do is have the refresh function and module be on a
    seperate object to the schema, only referring to the data and
    not excuting on the original ldb and event loop.
    
    That is, we never use another ldb context when calling the
    refresh function, by binding the refresh handler to the
    ldb and not the schema.
    
    Andrew Bartlett
    
    Change-Id: I5c323dda743cf5858badd01147fda6227599bc16
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    (cherry picked from commit 791c38282d681c60eaedb47803b9043991f5950d)

commit f72899ec2bc0ad3f6cd1e3d586235543b51f7cd1
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri May 23 16:06:17 2014 +1200

    dsdb: Do not store a struct ldb_dn in struct schema_data
    
    The issue is that the DN contains a pointer to the ldb it belongs to,
    and if this is not kept around long enough, we might reference memory
    after it is de-allocated.
    
    Andrew Bartlett
    
    Change-Id: I040a6c37a3164b3309f370e32e598dd56b1a1bbb
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    (cherry picked from commit 8327321225251e312ccbd06bbefa5ebf98099f34)

commit 4730d74e38998aaeadbe13682cc6462c3ceb4766
Author: Felix Botner <botner at univention.de>
Date:   Mon Feb 24 14:08:25 2014 +0100

    samba-tool dbcheck: handle missing objectClass
    
    In several cases we have seen objects without the objectClass attribute.
    Here the suggestion for a patch to find such objects in "samba-tool dbcheck"
    with the option to delete them.
    
    (patch improved by Andrew Bartlett to suggest DRS re-replication)
    
    Signed-off-by: Felix Botner <botner at univention.de>
    
    Change-Id: I8eb0d191a2089271a9af5884d6bfbf173a5c85c6
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 5b1d6e722e254522165ec512537a2efa2b979e6f)

commit 87b40d4861719fa4848dd7f71ffd7f5afd2d0516
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Mar 26 12:46:57 2014 +1300

    dsdb: Improve missing objectClass handling
    
    This attempts to permit deletion of objects that have no objectClass
    to allow dbcheck to clean up a corrupt database.  It is not complete,
    the replmd_replPropertyMetaDataCtr1_sort_and_verify() call will still
    fail, but this is as much as is safe to do without a way to replicate
    the original issue.
    
    Andrew Bartlett
    
    Change-Id: If0b6c7f18e8aee587e6b3b4af878a0145f5eac37
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 74a83be540c8fa0dd0f91da25b1f9d7ccc4ec568)

commit 56caec5a068510287dfdc2f975b20581a2810212
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Mar 26 12:48:17 2014 +1300

    dsdb: Improve errors and checks for missing objectClass values
    
    Change-Id: I8c4ac679accc90748d20c9c86986b127c939fa75
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit df2ef57584aab81c75012ec5d878322ff0691608)

commit 483d5e36f13154b8ca6d0bb7ceb9225f5f20d9d4
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Mar 21 16:56:19 2014 +1300

    dsdb: Clarify how the DSDB_REPL_FLAG_PRIORITISE_INCOMING flag works
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Change-Id: Ib9f2f4ba417dbf0ee24b6e7db02d78a9bfe8850c
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit dac1411b9ef9863152932698ce8c4e0a8cc79b1c)

commit a2d3f1a861f2f3d98565dc199be5dc87e2e78648
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Mar 21 16:26:48 2014 +1300

    dsdb: Do not update notify_uSN until the transaction is genuinely committed to the DB
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Change-Id: I734bc75ed348de8f0a5ff92e18e08de2340b8951
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 20a665ae09eb8d5affb88fe409a6130a74bd0aad)

commit 519d069f057ed11880503f80274153d26da6e459
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Feb 28 17:49:12 2014 +1300

    dsdb: Further assert that we always have an objectClass and an rDN
    
    We must have these two elements in a replPropertyMetaData for it to be
    valid.
    
    We may have to relax this for new partition creation, but for now we
    want to find and isolate the database corruption.
    
    The printing of the LDIF is moved above the checks to make it easier
    to diagnoise the failures when further reproduced.
    
    Based initially on a patch originally by Arvid Requate <requate at univention.de>
    
    Andrew Bartlett
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Change-Id: I5f583d89e6d4c5e8e2d9667f336a0e8fd8347b25
    Reviewed-on: https://gerrit.samba.org/164
    Reviewed-by: Kamen Mazdrashki <kamenim at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Mon Mar 17 06:44:17 CET 2014 on sn-devel-104
    
    (cherry picked from commit 9c9df40220234cba973e84b4985d90da1334a1d1)

commit ddf9b85f8c0c53e920a873cec4cb787ce6ea9198
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Feb 28 22:59:06 2014 +1300

    dsdb: Ensure to sort replPropertyMetaData as UNSIGNED, not SIGNED quantities
    
    enum is an int, and therefore signed.  Some attributes have the high bit set.
    
    Andrew Bartlett
    
    Change-Id: I39a5499b7c6bbb763e15977d802cda8c69b94618
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-on: https://gerrit.samba.org/163
    Reviewed-by: Kamen Mazdrashki <kamenim at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Fri Mar 14 10:16:41 CET 2014 on sn-devel-104
    
    (cherry picked from commit 61b978872fe86906611f64430b2608f5e7ea7ad8)

commit 5ce7f304c7784707fce8a68d4d4d7b18aed5dd66
Author: Arvid Requate <requate at univention.de>
Date:   Thu Feb 6 17:50:57 2014 +0100

    s4:samdb: respect SEARCH_FLAG_PRESERVEONDELETE
    
    According to MS-ADTS section 3.1.1.5.5.1.1 the searchFlags must be
    checked.
    
    Signed-off-by: Arvid Requate <requate at univention.de>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    
    Autobuild-User(master): David Disseldorp <ddiss at samba.org>
    Autobuild-Date(master): Thu Feb  6 21:42:22 CET 2014 on sn-devel-104
    
    (cherry picked from commit 98c961eb82194cd0738dbc58e4ae9f81771b409e)

commit 73e5b134cea038abd1245411ab744bfec34e5b49
Author: Nadezhda Ivanova <nivanova at symas.com>
Date:   Mon Oct 14 12:38:10 2013 +0300

    s4-samldb: Do not allow deletion of objects with RID < 1000
    
    According to [MS-SAMR] 3.1.5.7 Delete Pattern we should not allow deletion
    of security objects with RID < 1000. This patch will prevent deletion of
    well-known accounts and groups.
    
    Signed-off-by: Nadezhda Ivanova <nivanova at symas.com>
    Reviewed-by:   Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Nadezhda Ivanova <nivanova at samba.org>
    Autobuild-Date(master): Mon Oct 14 13:31:50 CEST 2013 on sn-devel-104
    
    (cherry picked from commit 13a10d43141c29dad61868b451c0c1dca82360de)

commit f4f9a6528155e337ec99c29faa1f3d4786169c91
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Sep 6 15:46:36 2013 +1200

    dsdb: Use dsdb_next_callback() rather than a no-op per-module callback
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 35e56d2b71b1dcd906baa70509ec50af39504b5a)

commit b5294f2c560c767fd5b2f90418cb9561b827ac21
Author: Nadezhda Ivanova <nivanova at symas.com>
Date:   Tue Oct 29 18:17:27 2013 +0200

    s4-dsdb: instanceType NC_HEAD is only allowed combined with WRITE for an originating add operation
    
    As described in MS-ATDS 3.1.1.5.2.8.
    
    Signed-off-by: Nadezhda Ivanova <nivanova at symas.com>
    Reviewed-by:   Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Nadezhda Ivanova <nivanova at samba.org>
    Autobuild-Date(master): Sun Nov  3 16:17:30 CET 2013 on sn-devel-104
    
    (cherry picked from commit 8a505090215501324f83dda86d146708b687abcc)

commit 48b8d0e48c4590ce843823fcc7700e5693633039
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jan 22 14:14:12 2014 +0100

    s4:dsdb/repl: make use of dcerpc_binding_handle_is_connected()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 0e902b83b4029320cf050a221ad41acdcdc23373)

commit 0bd326d09b669c3789b8b1689e2b568e308ffd2b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 10 21:08:06 2014 +0200

    s3:smb2_read: let smb2_sendfile_send_data() behave like send_file_readX()
    
    We now pass the header to SMB_VFS_SENDFILE(), so we have to handle that also
    in the fallback code.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10706
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Fri Jul 11 22:57:17 CEST 2014 on sn-devel-104
    
    (cherry picked from commit 7c5ea400ad1f280f5c338c31a0a893154340fdb3)

commit a8adafa3e9e76e417046e4ca0e78e4445b592f10
Author: Björn Jacke <bj at sernet.de>
Date:   Fri Jun 13 14:14:41 2014 +0200

    net/doc: make clear that net vampire is for NT4 domains only
    
    https://bugzilla.samba.org/show_bug.cgi?id=3263
    
    Signed-off-by: Bjoern Jacke <bj at sernet.de>

commit c0dd653e97451f32be745454736f0e1ae9846c08
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jun 20 18:08:53 2014 +0200

    ldb:build: improve detection of srcdir
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 09b991b79b28c9a88742e06021bb15997aba8988)
    
    The last 28 patches address bug #10693 - backport ldb-1.1.17 + changes from
    master.

commit dd2a1ea00e82c8c894eb8fa8339760affb3b09f8
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Apr 17 09:33:26 2014 +1200

    ldb: make the successful ldb_transaction_start() message clearer
    
    Change-Id: I00d0705484c3b53f55c4a8ec2953e92329b7408e
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Sat May  3 10:20:52 CEST 2014 on sn-devel-104
    
    (cherry picked from commit d7c22d56d3f8be9b8293dd481fb450e3cf2343d3)

commit 4b5ec41f94a7f11421d58c893cf87fab9d80be63
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Apr 29 09:37:54 2014 +0200

    ldb: change version to 1.1.17
    
    This adds some pyldb methods for ldb.Dn.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 7f03a94ffa3752ccdb28cc50033b4e2a26e2b3f2)

commit 94c793d537b1622961ec177edffc6deb105e9d19
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Apr 29 09:35:31 2014 +0200

    ldb:pyldb: add some more helper functions for LdbDn
    
    This adds [g|s]et_component[|_name|_value]() and get_rdn_[name|value]().
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 771d7b8c0df9240a9638dbf06a9f04431767bbb8)

commit d2615ee6168ecb6b76e503a0a83053dbef6cc3c9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Apr 29 09:34:48 2014 +0200

    ldb:pyldb: fix doc string for set_extended_component()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 094c39107c0abf4951e6f7012ac06b08cae1ea04)

commit 1ac7ee60fb1361623bfdeadc53b2e5130d0c04a9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Apr 29 09:32:45 2014 +0200

    ldb:pyldb: add some const to PyObject_FromLdbValue()
    
    PyString_FromStringAndSize() makes a copy of the value...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit aae9da9803dd551364bc3c096e06601bb1c9ed50)

commit 0c1511e670369bb88d48ac72828d46e2b30dfbbd
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Mar 4 13:50:41 2014 +0100

    ldb: Add a env variable to disable RTLD_DEEPBIND.
    
    We need a way to disable this in order to allow the
    ldb_*ldap modules to work with a preloaded socket wrapper.
    
    The only known user is the bind_dlz module,
    but symbol versioniong might be enough...
    
    So in future we may remove this completely
    or at least invert the default behavior.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 11e87cdbb694cf542f3b7633326005abd49e43f1)

commit 86508d7a463b346121e8d53dbca4201d70ce1d2c
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Feb 5 15:19:41 2014 +1300

    ldb: pass module init errors back to the caller
    
    This makes provision errors clearer in Samba, as we can now get
    permission denied errors presented from LDB modules.
    
    Andrew Bartlett
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
    (cherry picked from commit e76bbef8b796441985550c553db1ab48d6495709)

commit ad4a09cf767537b06d880a2249cb7e392dd84fe7
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Feb 5 14:52:28 2014 +1300

    ldb: Return LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS rather than OPERATIONS_ERROR on EACCES and EPERM
    
    This makes provision errors clearer in Samba.
    
    Andrew Bartlett
    
    Reviewed-by: Garming Sam <garming at catalyst.net.nz>
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
    (cherry picked from commit 673d41503c6e391337df1b86e49108d58f1af6bd)

commit a8c95195109ce330ef491948b6dbeb35cdc33154
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Dec 15 21:23:59 2013 +0100

    ldb: Fix 1138330 Dereference null return value
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit e8b0726411213acb133a25c14ab42020e4a8de68)

commit 90da5f38feb35f013c5b782a606d3fdec3d092f6
Author: Christian Ambach <ambi at samba.org>
Date:   Tue Dec 10 17:46:30 2013 +0100

    lib/ldb fix compiler warnings
    
    about potentially uninitialized variables
    
    Signed-off-by: Christian Ambach <ambi at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 35b4ba0193d783d85283b07f520f0af8dc2c1260)

commit 7c98a57d505ed3ded6cf84059266a23d6d7d83e8
Author: Christian Ambach <ambi at samba.org>
Date:   Tue Dec 10 17:45:58 2013 +0100

    lib/ldb fix compiler warnings
    
    about potentially uninitialized variables
    
    Signed-off-by: Christian Ambach <ambi at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 9784ed9fb75022fcd7eaef24108ed8c6acf7f86f)

commit 3f4d6d2a5a697a37060ade9f6981c420264c9dbd
Author: Pavel Reichl <pavel.reichl at redhat.com>
Date:   Tue Dec 3 14:37:20 2013 +0000

    ldb: use of NULL pointer bugfix
    
    Autobuild-User(master): Simo Sorce <idra at samba.org>
    Autobuild-Date(master): Tue Dec  3 21:13:53 CET 2013 on sn-devel-104
    
    (cherry picked from commit 4b637c367fdda832e95208f49e8893b0a0cac4b4)

commit 0919ef32b47b485330cd0f63bd17af9b43299664
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Nov 9 21:29:24 2013 +0100

    ldb: Fix CID 241329 Array compared against 0
    
    u.generate.remote_names is an array, not a pointer
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ira Cooper <ira at samba.org>
    (cherry picked from commit d2731ad5aae9f1fb8c1c6a65a61ef787e993b248)

commit 8a618aba795b5858ee57ecf79a368cdbda8c60cf
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Oct 20 17:29:29 2013 +0200

    ldb: Fix CID 240798 Uninitialized pointer read
    
    Not called right now, because nobody tries multiple sort attributes. But if
    someone did, build_response would have looked at the uninitialized controls.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Oct 22 03:28:20 CEST 2013 on sn-devel-104
    
    (cherry picked from commit 4e06c61b41fdde21fafaeee3c4fb3366744de9d9)

commit b4960c4338c7332deb3b62a0e0e98d011ade5f88
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 25 01:30:23 2013 +0200

    ldb:rdn_name: reject 'distinguishedName' depending of the MOD flags
    
    This is what Windows 2008 R2 returns:
    
    LDB_MOD_ADD     => LDB_ERR_UNWILLING_TO_PERFORM
    LDB_MOD_REPLACE => LDB_ERR_CONSTRAINT_VIOLATION
    LDB_MOD_DEL     => LDB_ERR_UNWILLING_TO_PERFORM
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit d2ff474766ebb104309bf1e801c54ce0f8ea0a64)

commit b89ef6595ef600aa64bf7a60cf4b6f6de0edf6f9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Sep 23 03:39:58 2013 +0200

    dsdb/tests/ldap: fix test_distinguished_name against w2k8r2
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit da7ef12b43f355fa6ff92af98645c80c85699d78)

commit 540dd6fa50aafa672c94085ab7b0dc85b38061b8
Author: Nadezhda Ivanova <nivanova at symas.com>
Date:   Wed Sep 18 15:31:24 2013 -0700

    s4-openldap: Remove use of talloc_reference in ldb_map_outbound.c
    
    Instead of referencing the values array of the element to the new element, copy them, to
    avoid use of talloc_reference and remove a warning of talloc_steal with reference.
    The issue is only relevant when openldap backend is used.
    
    Signed-off-by: Nadezhda Ivanova <nivanova at symas.com>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 75705776929d87f1a694582261c07d1724574370)

commit cdd4ef63198b1b75e37a1ed6cc83275d5790ec64
Author: Howard Chu <hyc at symas.com>
Date:   Wed Sep 18 16:50:34 2013 -0700

    Add LDB_MAP_RENDROP option
    
    Like LDB_MAP_RENAME, but drop the attribute if it occurs in an Add request.
    Used for distinguishedName attribute, is read-only and generated but for
    some bizarre reason AD allows it in an Add request.
    
    Signed-off-by: Howard Chu <hyc at symas.com>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Nadezhda Ivanova <nivanova at symas.com>
    (cherry picked from commit 93f3aba5e083976a791b982b2064b619800ce110)

commit c257bc6ccd156d84be907304a065e496c38fedb7
Author: Howard Chu <hyc at symas.com>
Date:   Tue Sep 17 22:14:20 2013 -0700

    Fix SEGV from improperly formed SUBSTRING/PRESENCE filter
    
    Signed-off-by: Howard Chu <hyc at symas.com>
    Reviewed-by: Simo Sorce <idra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    
    Autobuild-User(master): Michael Adam <obnox at samba.org>
    Autobuild-Date(master): Thu Sep 19 01:42:43 CEST 2013 on sn-devel-104
    
    (cherry picked from commit d9bf88dc749cdbc34f70345b156b0117ecf2932b)

commit 3d932b0742390079e3a0b6230714a2e3d07485f3
Author: Howard Chu <hyc at symas.com>
Date:   Mon Sep 16 19:02:26 2013 -0700

    Cleanup map return codes
    
    -1 was never a valid LDB return code, just use OPERATIONS_ERROR
    
    Signed-off-by: Howard Chu <hyc at symas.com>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Nadezhda Ivanova <nivanova at samba.org>
    Autobuild-Date(master): Tue Sep 17 07:51:45 CEST 2013 on sn-devel-104
    
    (cherry picked from commit 6ed5b1c159867466e54a54a10adcc6c49a0a7837)

commit 1173cd70976bc2d389785b09763323f1b2356d9f
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Sep 6 15:37:30 2013 +1200

    ldb: Show the type of failing operation in default error message
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 347b2c65a4b8c219cfdae3306fdc3d793980cbed)

commit 06c993eda6237bbb4df0e553abd7fbca6ba26559
Author: Jeroen Dekkers <jeroen at dekkers.ch>
Date:   Mon Sep 9 00:42:39 2013 +0200

    ldb: Do not build libldb-cmdline when using system ldb.
    
    Cleanup leftover include and linking of libldb-cmdline in
    oLschema2ldif. Do not build libldb-cmdline anymore when using the
    system ldb, oLschema2ldif was the only reason for building
    libldb-cmdline.
    
    Signed-off-by: Jeroen Dekkers <jeroen at dekkers.ch>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Tue Sep 10 12:52:26 CEST 2013 on sn-devel-104
    
    (cherry picked from commit 0af09f0179c024099e0776d3794f4b3d7fb3f6f6)

commit c638eeed45081de2194771fd9dfc449cd188ea41
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 18 19:54:31 2013 +0000

    ldb_map: Fix CID 1034791 Dereference null return value
    
    Add NULL checks
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit cb598ddab6935820975042a8a307c75dba9d7e31)

commit d990fa237975aea7b9c7882799993f626da8d418
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 18 19:51:49 2013 +0000

    pyldb: Fix CID 1034792 Dereference null return value
    
    Add a NULL check
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit cbb5c1ce39640ffd01aeed6d87a57940e344792c)

commit c7a376edf427833fb35a51aeb8e14d4b2673d3d7
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 18 19:49:24 2013 +0000

    ldb: Fix CID 1034793 Dereference null return value
    
    Add a proper NULL check
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 15bd82550dab7a4709e92d639ee563dbc4780366)

commit fc8d19900c7af1bb26c285dcd85a08b4fea45d8e
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Aug 16 12:56:04 2013 +0000

    ldb: Fix a const warning
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Simo Sorce <idra at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Sun Aug 18 10:26:27 CEST 2013 on sn-devel-104
    
    (cherry picked from commit 06273504586733ac548ddadad6c7bc757d2d5e25)

commit 3e51316b6de549a4fbded1a6dd8301deaba4b062
Author: Matthieu Patou <mat at matws.net>
Date:   Wed Dec 26 21:36:50 2012 -0800

    pyldb: decrement ref counters on py_results and quiet warnings
    
    Signed-off-by: Matthieu Patou <mat at matws.net>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
    
    Autobuild-User(master): Matthieu Patou <mat at samba.org>
    Autobuild-Date(master): Tue Aug  6 00:32:46 CEST 2013 on sn-devel-104
    
    (cherry picked from commit 0602009b999142187d74b74be13de8c7f64c7b24)

commit b4904f606b025782712cb021fadbcb8d1ba4f808
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Wed Feb 5 15:40:59 2014 +1300

    provision: capture slightly less generic exceptions during the test for acls
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
    (cherry picked from commit f279a297a4a94c5cbc049c9b2cde14b02960a76f)
    
    The last 4 patches address bug #10703 - backport provision fixes from master.

commit 8892da9f4e4b3e15a78c3d9b55de508b7ed8cc68
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Wed Feb 5 15:31:22 2014 +1300

    pysmbd: improve the return of error codes in the python smbd bindings
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
    (cherry picked from commit ad773cc01435e65fa5d8e84758b0642069e96c40)

commit a9b2df4b2af058cea5ae767a08e1343f049a74ec
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Wed Feb 5 15:29:18 2014 +1300

    provision: improve error message when connecting to samdb without the correct permissions
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
    (cherry picked from commit b27543aa729ca893270831d5c4fc74ea7ac6d407)

commit 1da8bec6923bd1da6a119222531325fc0d8e7d83
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Wed Nov 27 15:26:14 2013 +1300

    provision: Fix failures on re-provision incorrectly blamed on posix acl support.
    
    By doing the test later, there is an actual sam.ldb file that can be connected to.
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
    (cherry picked from commit a89060a0217f8740798d1dac4466222301a4d81b)

commit a4c1e9ad257342717a7eb5d1b3fbc6a4fcc82c0e
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue May 13 17:47:03 2014 +1200

    passdb: Do not routinely clear the global memory returned by get_global_sam_sid()
    
    This avoids use-after-free errors and tdb database churn.
    
    Andrew Bartlett
    
    Change-Id: If7ab2e24556d9dffc7ad22c0489d665dd75a0cab
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Kamen Mazdrashki <kamenim at samba.org>
    (cherry picked from commit cda32d4e47aa3efb040eb60f1a0332ea8dd58417)
    
    The last 9 patches address bug #10701 - backport dsdb related crash fixes and
    build fixes.

commit 656e363578971189d3350b51e7e669ec58207cb0
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 18 19:37:56 2013 +0000

    samdb: Fix CID 1034910 Dereference before null check
    
    strncmp("tdb://", secrets_ldb, 6) dereferences secrets_ldb. Check for
    NULL before that.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 35330aa2c8b255d74e94bc9dd742e621953c21f9)

commit a678cd4450153129184c83ae49a92d4f26d4baf7
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 18 19:37:56 2013 +0000

    samdb: Fix CID 1034910 Dereference before null check
    
    strncmp("tdb://", sam_name, 6) dereferences sam_name. Check for
    NULL before that.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 8c4e6f0cba164c91661a654e2ccc13c265a06953)

commit 0b3f7af30bf389c0f7297d8cf6ef84753c399211
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Feb 27 09:29:36 2014 +0100

    s4:dsdb/ldb_modules: avoid invalid pointer type warnings
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit ee06cbce30ccdb057ffc5b3da2d7fb1010a13837)

commit 32514303b86ab030c0bea13788ae30f64d115935
Author: Christian Ambach <ambi at samba.org>
Date:   Tue Dec 10 17:52:29 2013 +0100

    s4:dsdb fix compiler warnings
    
    about potentially uninitialized variables
    
    Signed-off-by: Christian Ambach <ambi at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 2bd15d1b830b177ea234aa29ff696379abbcd683)

commit d6d69c678c8f53b9ebc36d1ae1fbb962f9ca0855
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Nov 12 14:09:56 2013 +0100

    s4-dsdb: Fix a use after free segfault.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    
    Autobuild-User(master): David Disseldorp <ddiss at samba.org>
    Autobuild-Date(master): Tue Nov 12 19:22:28 CET 2013 on sn-devel-104
    
    (cherry picked from commit 744abc882284bfde41b087bc06e13160b915f371)

commit 7013fff476245ec0c97777443496da5ec1c02311
Author: Christian Ambach <ambi at samba.org>
Date:   Tue Dec 10 17:52:29 2013 +0100

    s4:dsdb fix compiler warnings
    
    about potentially uninitialized variables
    
    Signed-off-by: Christian Ambach <ambi at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit e5cb10f59122acc56a465c19885fe74a39985700)

commit 6b2d4aa613a53458b2f4c697b2b37d1be2000e5a
Author: Christian Ambach <ambi at samba.org>
Date:   Tue Dec 10 17:53:15 2013 +0100

    s4:dsdb fix compiler warnings
    
    about potentially uninitialized variables
    
    Signed-off-by: Christian Ambach <ambi at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 9c2951a9ca8228c714a1c1c834392077d050b569)

commit c66913f93754c7c0f8ea44520361f42b967015b7
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Feb 27 09:29:36 2014 +0100

    s4:dsdb/ldb_modules: avoid declaration after code warnings
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit de773f3785d8fedba605437fbd434a49b9d18b0e)

commit bbe79b8ae18e8f0e90096ec90a14fb81df64d392
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Sep 9 09:57:27 2013 +1200

    s4-rpc_server/drsuapi: Print ldb error showing why we failed to perform the access check
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit f75dc8f4a54581ed207e7caa2e52211ea24e3554)
    
    The lat 6 patches address bug #10700 - backport access check related fixes from
    master.

commit 8bf3d4e21dbe4e81121399fcaba06ce115dd2987
Author: Nadezhda Ivanova <nivanova at symas.com>
Date:   Tue Oct 15 02:06:38 2013 +0300

    s4-dsacl: Fixed incorrect handling of privileges in sec_access_check_ds
    
    Restore and backup privileges are not relevant to ldap
    access checks, and the TakeOwnership privilege should
    grant write_owner right
    
    Signed-off-by: Nadezhda Ivanova <nivanova at symas.com>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit daefca2a1aaa9f4e0ca2f17ef4c9a71412c081ea)

commit ee2cf1d4d7353644a3e551f7b12390c1568e5df3
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Feb 5 14:53:26 2014 +1300

    dsdb: Return LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS rather than OPERATIONS_ERROR on EACCES and EPERM
    
    This makes provision errors clearer in Samba.
    
    Andrew Bartlett
    
    Reviewed-by: Garming Sam <garming at catalyst.net.nz>
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
    (cherry picked from commit 262c3de3f880bb08b1220d1e755bb31365dab49b)

commit 7e07e6d99562d93f1062b53cfdfa95686f464572
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri May 23 16:41:33 2014 +1200

    dsdb: Do not give an error is metadata.tdb does not yet exist
    
    Change-Id: I88ee188c776364fd66da388ce01fc9288aa2ded0
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    (cherry picked from commit 822b4927288231b7a90579af9792608a0bdef706)

commit ccfc87f0edd4faa1e2836ccde2187626eddf6a8e
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Sep 25 17:09:58 2013 -0700

    dsdb: Provide a clearer error when we fail to store the sequence number in metadata.tdb
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 6da2dcd17ee46d339d7d80df3dccd456703e7fe2)

commit dbaab08080e242162fda99fa232e262284eb5914
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 18 19:37:56 2013 +0000

    samdb: Fix CID 1034910 Dereference before null check
    
    strncmp("tdb://", sam_name, 6) dereferences sam_name. Check for
    NULL before that.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 6417d9e0355f840ca4cf3b740ad5aabfc534d834)

commit f18e5f56715b817cc9eb70159c367f4a3ad54b1c
Author: Matthieu Patou <mat at matws.net>
Date:   Sun Jun 30 20:44:22 2013 -0700

    drs-cracksname: fix problems that prevented to pass our torture tests
    
    Some of the problems where also reported by Microsoft testing tools
    
    Signed-off-by: Matthieu Patou <mat at matws.net>
    Reviewed-by: Andrew Bartlett <abarlett at samba.org>
    (cherry picked from commit 7fe4630bad232c09e29739beedda2e2fb63747ed)
    
    The last 4 patches address bug #10698 - backport drs-crackname fixes from
    master.

commit 13a5ecafe46e1c08aad35998ff1bc6f28c191efd
Author: Matthieu Patou <mat at matws.net>
Date:   Sun Jun 30 02:04:20 2013 -0700

    drs-crackname: Fix error code so that we have the same as windows
    
    Signed-off-by: Matthieu Patou <mat at matws.net>
    Reviewed-by: Andrew Bartlett <abarlett at samba.org>
    (cherry picked from commit 029e80da9d1ab5096cd0981110b588245f8fd50d)

commit e7eed8fb5b70995f0703e462e02bb4fffbc7ceed
Author: Matthieu Patou <mat at matws.net>
Date:   Sun Jun 30 02:03:02 2013 -0700

    drs-cracknames: When cracking NT4 names we should just look at netbios for the match
    
    Looking at dnsRoot will yield a result for domain.tld\username when it
    shouldn't work.
    
    Signed-off-by: Matthieu Patou <mat at matws.net>
    Reviewed-by: Andrew Bartlett <abarlett at samba.org>
    (cherry picked from commit 552b4f3e022dca594e1dada7979fe351eee8cf9b)

commit 4ffc82e98da4763fc68eec1633b18ccf97d04aeb
Author: Matthieu Patou <mat at matws.net>
Date:   Sat Jun 29 16:02:32 2013 -0700

    drs-crackname: Fix cracknames for the format UNKNOWN when the data is actually a GUID
    
    The cannonical crackname expect a "/" or it returns
    DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR, when doing UNKNOWN format it's not
    an error to not have a "/" in the name to crack it's just a sign the
    name is not a cannonical one.
    
    Signed-off-by: Matthieu Patou <mat at matws.net>
    Reviewed-by: Andrew Bartlett <abarlett at samba.org>
    (cherry picked from commit aa17a2c01dbab2e522a8ccccaed7943963bab5b9)

commit 29ec8f4821c1dac41312c62e30823f6e00aeb3c4
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Mar 12 15:12:42 2014 +0100

    selftest/subunithelper.py: correctly pass testsuite-uxsuccess to end_testsuite()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Thu Mar 13 23:49:36 CET 2014 on sn-devel-104
    
    (cherry picked from commit 3632c59e250396b3974bccf7ad74cbe5c84fdba3)
    
    The last 4 patches address bug #10696 - backport autobuild/selftest fixes from
    master.

commit 484d746011be8c39e7a4827f555f3141e1ef5ea5
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Mar 12 15:12:42 2014 +0100

    selftest/subunithelper.py: correctly handle fail_immediately in end_testsuite of FilterOps
    
    This way --fail-immediately also works if a command segfaults.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit fee156f5b9235b5f766cb773433ddb7d0ccd98a1)

commit be09c41307b94c5a7c5cfc08d618a01b63598fbf
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Mar 12 15:12:42 2014 +0100

    selftest/subunithelper.py: correctly handle unexpected success in FilterOps
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 14246953b2e91578e5f51faedfdf31926a5b1950)

commit 2354597e4ec683800399137450932219663bf6d6
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Feb 17 09:15:30 2014 +0100

    script/autobuild: use --force-rebase option
    
    This makes sure the current user will be the committer.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit ab9f02193188af8e482052ee6b55c30aac2c8340)

commit 50af515fb023dfca5a2b11ea2e19b08c962d833d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Apr 3 16:03:19 2014 +0200

    s4:repl_meta_data: fix array assignment in replmd_process_linked_attribute()
    
    Change-Id: I10357236108f68ab749ba0e1f07558302c573887
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 5b22222421c77c8c379c828c5da7e6c8c38cfb88)
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10294
    Failed to Join Domain - uncaught exception - attribute 'isRecycled'

commit 7408da9f5c7c9c39ff689133d596a3a5092972d2
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jul 2 14:27:52 2014 +0000

    torture3: Fix bug 10687
    
    'RW2' smbtorture test fails when -N <numprocs> is set to 2 due to the invalid
    status check in the second client.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>

commit 93c1a27fe2e64647521c4a5dbd115b77bfc8328c
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Mar 31 10:19:58 2014 +1300

    libsmb: Provide a talloc_stackframe() to external users of libsmb_setget.c
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit bc5bd4010e8fedf19047ed6f7a793cd373f9f14f)
    
    The last 3 patches address bug #8449 (simple use case results in "no talloc
    stackframe around, leaking memory" error).

commit 5c503dd2198122e51854102e91ea61dd8bb24148
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Apr 1 17:03:34 2014 +1300

    libsmbclient: Wrap more function calls in talloc_stackframe() to protect against talloc_tos() calls
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=8449
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Wed Apr  2 02:36:08 CEST 2014 on sn-devel-104
    
    (cherry picked from commit 014342746f5af1aaaf1c2f8b44098c3a944e4f0a)

commit 14a9705c78ffa733ec9ab9b6330cc36b32a77661
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Apr 1 17:01:26 2014 +1300

    pam_smbpass: Wrap calls in talloc_stackframe() to avoid warnings about leaking memory
    
    Any code in source3 is permitted to use talloc_tos() at any point, so we must protect all the library interfaces
    against memory leaks this way.
    
    Andrew Bartlett
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 8f3a516acb8c95cd6d88bf80abd495ac0cafaae3)

commit 14e7f9888bf29fdb5ee56f79e71890d697aa1b20
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Jul 8 14:30:54 2014 +0200

    smbd: Avoid double-free in get_print_db_byname
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10699

commit c8904fa46ad29e3e6023477a9c9dfe730b628c19
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jul 1 13:30:50 2014 -0700

    s3: smbd: Locking, fix off-by one calculation in brl_pending_overlap().
    
    Consider:
    
    lock = start=110,size=10
    pend_lock = 100, size=10
    
    Should not overlap. However,
    
    (lock->start <= pend_lock->start + pend_lock->size)
         110             100                10
    
    is true, so it returns true (overlap).
    
    lock->start <= pend_lock->start + pend_lock->size
    
    should be:
    
    lock->start < pend_lock->start + pend_lock->size
    
    https://bugzilla.samba.org/show_bug.cgi?id=10685
    
    Signed-off-by: Jeremy Allison <jra at samba.org>

commit 74a80557f6d9b7a85656ec701ab70eb091fe2e11
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jun 29 08:56:03 2014 +0000

    smbstatus: Fix an uninitialized variable
    
    We only print valid share mode entries, stale ones don't count. In
    traverse, let the callback decide about staleness.
    
    https://bugzilla.samba.org/show_bug.cgi?id=10680
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 9f2e90754bcb7bf5f7159d07f0bc5fe754e71bf5)

commit a9dcd0201eba2f744bf4fdd5d5720cc5c11b66ab
Author: Abhidnya Joshi <achirmul at in.ibm.com>
Date:   Mon Aug 26 12:31:49 2013 +0530

    s3: fix missing braces in nfs4_acls.c
    
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Simo Sorce <idra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Wed Aug 28 20:25:56 CEST 2013 on sn-devel-104
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10688
    (missing braces in nfs4_acls.c)

commit 79f112942a80a0f873539cce69e14b31f6ca225a
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jul 1 20:27:11 2014 -0700

    s3:winbindd - fix bad bugfix for bug #10280 - winbind panic if AD server is down.
    
    Previous bug fix reversed the sense of the test for out of memory.
    
    https://bugzilla.samba.org/show_bug.cgi?id=10280
    
    Signed-off-by: Jeremy Allison <jra at samba.org>

commit f925ebcacc53ec62f2c235c38b0acca9e800e533
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Jun 5 12:32:30 2014 -0700

    s3/s4: smbd, rpc, ldap, cldap, kdc services.
    
    Allow us to start if we bind to *either* :: or 0.0.0.0.
    
    Allows us to cope with systems configured as only IPv4
    or only IPv6.
    
    Bug #10653 - Samba won't start on a machine configured with only IPv4.
    
    https://bugzilla.samba.org/show_bug.cgi?id=10653
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-By: Amitay Isaacs <amitay at gmail.com>
    Reviewed-By: Alexander Bokovoy <ab at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Sat Jun  7 01:01:44 CEST 2014 on sn-devel-104
    
    (cherry picked from commit 463311422ca1caad2e228deb630e9d12e212fae1)

commit 2541ab32a316d784fb600c7c70c239430582b947
Author: Björn Baumbach <bb at sernet.de>
Date:   Mon May 26 16:17:50 2014 +0200

    samba-tool: add --site parameter to provision command (bug #10674)
    
    This new parameter offers the option to specify a default initial site name.
    Otherwise it will be "Default-First-Site-Name".
    
    Signed-off-by: Björn Baumbach <bb at sernet.de>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Kamen Mazdrashki <kamenim at samba.org>
    (cherry picked from commit 4ca1d69d7daa8f4f92d44cd505aa0983f2ab56bf)

commit f1b969b334b55ae58667af4586aab5247dba5a1a
Author: Björn Baumbach <bb at sernet.de>
Date:   Tue Jun 10 15:35:47 2014 +0200

    provision/sambadns: remove redundant site parameter
    
    The sitename is already included in "names" parameter.
    
    Part of fix for bug #10674
    
    Signed-off-by: Björn Baumbach <bb at sernet.de>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Kamen Mazdrashki <kamenim at samba.org>
    (cherry picked from commit 4ebd7250ef18811e58d812670e96e61836e4770b)
    
    Conflicts:
    	python/samba/provision/__init__.py
    	python/samba/provision/sambadns.py

commit 7e38fcb93e699cd55f000ae019671283c3464723
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Jun 10 14:21:07 2014 +0000

    msg_channel: Fix a 100% CPU loop
    
    In a ctdb setup, msg_read_got_ctdb did not set channel->pending_req to
    NULL. In smbXsrv_session_close_loop in any error condition this leads to
    a 100% loop. smbXsrv_session_close_loop continously retries, but because
    close_channel->pending_req is != NULL, msg_read_send will always return
    EBUSY, making smbXsrv_session_close_loop retry infinitely.
    
    This patch makes sure that msg_read_got_ctdb correctly NULLs out pending_req.
    
    msg_channel.c does not exist in master anymore, so this patch is 4.1 only.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10663
    100% smbd cpu loop in ctdb setups

commit 406e412ab681ba08ffdc182e999fb73a63abbbde
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Jun 20 13:39:36 2014 +0000

    smbd: Fix bug 10593
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10593
    PANIC: assert failed at ../source3/smbd/open.c(1582): ret

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

Summary of changes:
 auth/credentials/credentials_krb5.c                |    2 +-
 docs-xml/manpages/net.8.xml                        |    2 +
 lib/ldb/ABI/{ldb-1.1.14.sigs => ldb-1.1.17.sigs}   |    0
 ...ldb-util-1.1.10.sigs => pyldb-util-1.1.17.sigs} |    0
 lib/ldb/common/ldb.c                               |   25 +-
 lib/ldb/common/ldb_dn.c                            |    4 +-
 lib/ldb/common/ldb_modules.c                       |   52 +-
 lib/ldb/ldb_map/ldb_map.c                          |   16 +-
 lib/ldb/ldb_map/ldb_map.h                          |    3 +-
 lib/ldb/ldb_map/ldb_map_inbound.c                  |   21 +-
 lib/ldb/ldb_map/ldb_map_outbound.c                 |   64 +-
 lib/ldb/ldb_map/ldb_map_private.h                  |    2 +-
 lib/ldb/ldb_tdb/ldb_tdb.c                          |    7 +-
 lib/ldb/modules/rdn_name.c                         |   10 +-
 lib/ldb/modules/sort.c                             |    2 +-
 lib/ldb/pyldb.c                                    |  124 +-
 lib/ldb/tools/ldbtest.c                            |    4 +
 lib/ldb/wscript                                    |   12 +-
 libcli/security/access_check.c                     |   12 +-
 nsswitch/libwbclient/wbc_pam.c                     |   30 +-
 python/samba/dbchecker.py                          |  222 +-
 python/samba/netcmd/domain.py                      |    5 +-
 python/samba/provision/__init__.py                 |   61 +-
 python/samba/provision/sambadns.py                 |    5 +-
 python/samba/tests/samba3sam.py                    |   12 +-
 script/autobuild.py                                |    4 +-
 selftest/selftest.pl                               |   25 +-
 selftest/subunithelper.py                          |   25 +-
 selftest/tests.py                                  |    1 +
 source3/lib/msg_channel.c                          |   12 +
 source3/libsmb/libsmb_context.c                    |   17 +
 source3/libsmb/libsmb_setget.c                     |   17 +-
 source3/locking/brlock.c                           |    2 +-
 source3/locking/share_mode_lock.c                  |    1 +
 source3/modules/nfs4_acls.c                        |    3 +-
 source3/pam_smbpass/pam_smb_acct.c                 |    9 +
 source3/pam_smbpass/pam_smb_auth.c                 |    7 +
 source3/pam_smbpass/pam_smb_passwd.c               |   16 +-
 source3/passdb/machine_account_secrets.c           |   10 +-
 source3/passdb/pdb_samba_dsdb.c                    |   77 +-
 source3/printing/printing_db.c                     |    4 +-
 source3/smbd/blocking.c                            |  195 +-
 source3/smbd/pysmbd.c                              |   58 +-
 source3/smbd/server.c                              |   16 +-
 source3/smbd/smb2_create.c                         |    9 +-
 source3/smbd/smb2_read.c                           |   69 +-
 source3/torture/torture.c                          |    2 +-
 source3/winbindd/winbindd_cache.c                  |    4 +-
 source4/auth/gensec/gensec_gssapi.c                |    1 -
 source4/auth/kerberos/krb5_init_context.c          |   12 -
 source4/auth/kerberos/krb5_init_context.h          |    2 +-
 source4/cldap_server/cldap_server.c                |    8 +-
 source4/dns_server/dlz_bind9.c                     |    2 +-
 source4/dns_server/dns_server.c                    |    9 +-
 source4/dsdb/common/tests/dsdb_dn.c                |   14 +
 source4/dsdb/common/util.c                         |   59 +-
 source4/dsdb/kcc/kcc_deleted.c                     |    2 +-
 source4/dsdb/repl/drepl_out_helpers.c              |   52 +-
 source4/dsdb/repl/replicated_objects.c             |   14 +-
 source4/dsdb/samdb/cracknames.c                    |   38 +-
 source4/dsdb/samdb/ldb_modules/descriptor.c        |    2 +-
 source4/dsdb/samdb/ldb_modules/dirsync.c           |    7 +-
 source4/dsdb/samdb/ldb_modules/extended_dn_in.c    |   37 +-
 source4/dsdb/samdb/ldb_modules/instancetype.c      |    3 +-
 source4/dsdb/samdb/ldb_modules/objectclass.c       |   54 +-
 source4/dsdb/samdb/ldb_modules/operational.c       |    2 +-
 .../dsdb/samdb/ldb_modules/partition_metadata.c    |   34 +-
 source4/dsdb/samdb/ldb_modules/password_hash.c     |    1 -
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c    |  267 +-
 source4/dsdb/samdb/ldb_modules/rootdse.c           |  110 +-
 source4/dsdb/samdb/ldb_modules/samldb.c            |   29 +-
 source4/dsdb/samdb/ldb_modules/schema_data.c       |   16 +-
 source4/dsdb/samdb/ldb_modules/schema_load.c       |  207 +-
 source4/dsdb/samdb/ldb_modules/secrets_tdb_sync.c  |    6 +-
 source4/dsdb/samdb/ldb_modules/simple_ldap_map.c   |    2 +-
 source4/dsdb/samdb/ldb_modules/update_keytab.c     |   11 +-
 source4/dsdb/samdb/ldb_modules/util.c              |   13 +
 source4/dsdb/samdb/samdb.c                         |    7 -
 source4/dsdb/samdb/samdb.h                         |    1 +
 source4/dsdb/schema/schema.h                       |   10 +-
 source4/dsdb/schema/schema_init.c                  |   10 -
 source4/dsdb/schema/schema_set.c                   |   98 +-
 source4/dsdb/schema/schema_syntax.c                |   11 +
 source4/dsdb/tests/python/acl.py                   |   26 +
 source4/dsdb/tests/python/ldap.py                  |   27 +-
 source4/dsdb/tests/python/sam.py                   |   37 +-
 source4/kdc/kdc.c                                  |   14 +-
 source4/ldap_server/ldap_server.c                  |    8 +-
 source4/libnet/libnet_export_keytab.c              |    2 +-
 source4/libnet/libnet_vampire.c                    |    5 -
 source4/rpc_server/dcerpc_server.c                 |    8 +-
 source4/rpc_server/drsuapi/drsutil.c               |    2 +-
 source4/rpc_server/lsa/dcesrv_lsa.c                |    1 -
 source4/rpc_server/samr/dcesrv_samr.c              |   17 +-
 .../etc/smb.conf.template                          |   16 +
 .../private/dns_update_list                        |    0
 .../private/hklm.ldb.dump                          |   80 +
 .../private/idmap.ldb.dump                         |   48 +
 .../release-4-1-6-partial-object/private/krb5.conf |    4 +
 .../private/named.conf.update                      |    7 +
 .../private/privilege.ldb.dump                     |  156 +
 .../private/randseed.tdb.dump                      |    0
 ...NFIGURATION,DC=SAMBA,DC=EXAMPLE,DC=COM.ldb.dump |29104 +++++++++++++
 ...NFIGURATION,DC=SAMBA,DC=EXAMPLE,DC=COM.ldb.dump |43468 ++++++++++++++++++++
 ...AINDNSZONES,DC=SAMBA,DC=EXAMPLE,DC=COM.ldb.dump |  928 +
 ...ESTDNSZONES,DC=SAMBA,DC=EXAMPLE,DC=COM.ldb.dump |  488 +
 .../sam.ldb.d/DC=SAMBA,DC=EXAMPLE,DC=COM.ldb.dump  | 6036 +++
 .../private/sam.ldb.d/metadata.tdb.dump            |    4 +
 .../private/sam.ldb.dump                           |   40 +
 .../private/schannel_store.tdb.dump                |    0
 .../private/secrets.keytab                         |  Bin 0 -> 1222 bytes
 .../private/secrets.ldb.dump                       |   44 +
 .../private/secrets.tdb.dump                       |   16 +
 .../private/share.ldb.dump                         |   32 +
 .../private/smbd.tmp/msg/names.tdb.dump            |   52 +
 .../private/spn_update_list                        |    0
 .../private/tls/admincert.pem                      |   17 +
 .../private/tls/admincertupn.pem                   |   17 +
 .../private/tls/adminkey.pem                       |   15 +
 .../private/tls/ca.pem                             |   14 +
 .../private/tls/cert.pem                           |   15 +
 .../private/tls/dhparms.pem                        |    5 +
 .../private/tls/kdc.pem                            |   17 +
 .../private/tls/key.pem                            |   15 +
 .../private/wins_config.ldb.dump                   |    8 +
 source4/torture/auth/pac.c                         |    3 +-
 source4/torture/raw/lock.c                         |   97 +
 source4/utils/oLschema2ldif.c                      |    1 -
 source4/utils/wscript_build                        |    2 +-
 testdata/samba3/samba3.ldif                        |    4 +-
 testprogs/blackbox/dbcheck-oldrelease.sh           |  158 +-
 testprogs/blackbox/dbcheck.sh                      |    5 +
 wscript                                            |    2 +-
 133 files changed, 82791 insertions(+), 705 deletions(-)
 copy lib/ldb/ABI/{ldb-1.1.14.sigs => ldb-1.1.17.sigs} (100%)
 copy lib/ldb/ABI/{pyldb-util-1.1.10.sigs => pyldb-util-1.1.17.sigs} (100%)
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/etc/smb.conf.template
 copy source4/selftest/provisions/{release-4-0-0 => release-4-1-6-partial-object}/private/dns_update_list (100%)
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/hklm.ldb.dump
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/idmap.ldb.dump
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/krb5.conf
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/named.conf.update
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/privilege.ldb.dump
 copy source4/selftest/provisions/{release-4-1-0rc3 => release-4-1-6-partial-object}/private/randseed.tdb.dump (100%)
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/sam.ldb.d/CN=CONFIGURATION,DC=SAMBA,DC=EXAMPLE,DC=COM.ldb.dump
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/sam.ldb.d/CN=SCHEMA,CN=CONFIGURATION,DC=SAMBA,DC=EXAMPLE,DC=COM.ldb.dump
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/sam.ldb.d/DC=DOMAINDNSZONES,DC=SAMBA,DC=EXAMPLE,DC=COM.ldb.dump
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/sam.ldb.d/DC=FORESTDNSZONES,DC=SAMBA,DC=EXAMPLE,DC=COM.ldb.dump
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/sam.ldb.d/DC=SAMBA,DC=EXAMPLE,DC=COM.ldb.dump
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/sam.ldb.d/metadata.tdb.dump
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/sam.ldb.dump
 copy source4/selftest/provisions/{release-4-1-0rc3 => release-4-1-6-partial-object}/private/schannel_store.tdb.dump (100%)
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/secrets.keytab
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/secrets.ldb.dump
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/secrets.tdb.dump
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/share.ldb.dump
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/smbd.tmp/msg/names.tdb.dump
 copy source4/selftest/provisions/{release-4-0-0 => release-4-1-6-partial-object}/private/spn_update_list (100%)
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/tls/admincert.pem
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/tls/admincertupn.pem
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/tls/adminkey.pem
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/tls/ca.pem
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/tls/cert.pem
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/tls/dhparms.pem
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/tls/kdc.pem
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/tls/key.pem
 create mode 100644 source4/selftest/provisions/release-4-1-6-partial-object/private/wins_config.ldb.dump


Changeset truncated at 500 lines:

diff --git a/auth/credentials/credentials_krb5.c b/auth/credentials/credentials_krb5.c
index cc51f56..ec6a695 100644
--- a/auth/credentials/credentials_krb5.c
+++ b/auth/credentials/credentials_krb5.c
@@ -48,7 +48,7 @@ _PUBLIC_ int cli_credentials_get_krb5_context(struct cli_credentials *cred,
 		return 0;
 	}
 
-	ret = smb_krb5_init_context(cred, NULL, lp_ctx,
+	ret = smb_krb5_init_context(cred, lp_ctx,
 				    &cred->smb_krb5_context);
 	if (ret) {
 		cred->smb_krb5_context = NULL;
diff --git a/docs-xml/manpages/net.8.xml b/docs-xml/manpages/net.8.xml
index 5417054..e2e1b8f 100644
--- a/docs-xml/manpages/net.8.xml
+++ b/docs-xml/manpages/net.8.xml
@@ -1229,6 +1229,8 @@ to run this against the PDC, from a Samba machine joined as a BDC. </para>
 
 <para>Export users, aliases and groups from remote server to 
 local server.  You need to run this against the PDC, from a Samba machine joined as a BDC. 
+This vampire command cannot be used against an Active Directory, only
+against an NT4 Domain Controller.
 </para>
 </refsect2>
 
diff --git a/lib/ldb/ABI/ldb-1.1.14.sigs b/lib/ldb/ABI/ldb-1.1.17.sigs
similarity index 100%
copy from lib/ldb/ABI/ldb-1.1.14.sigs
copy to lib/ldb/ABI/ldb-1.1.17.sigs
diff --git a/lib/ldb/ABI/pyldb-util-1.1.10.sigs b/lib/ldb/ABI/pyldb-util-1.1.17.sigs
similarity index 100%
copy from lib/ldb/ABI/pyldb-util-1.1.10.sigs
copy to lib/ldb/ABI/pyldb-util-1.1.17.sigs
diff --git a/lib/ldb/common/ldb.c b/lib/ldb/common/ldb.c
index 3dc6d87..c49513c 100644
--- a/lib/ldb/common/ldb.c
+++ b/lib/ldb/common/ldb.c
@@ -112,6 +112,10 @@ struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx)
 	 * having to provide their own private one explicitly */
 	if (ev_ctx == NULL) {
 		ev_ctx = tevent_context_init(ldb);
+		if (ev_ctx == NULL) {
+			talloc_free(ldb);
+			return NULL;
+		}
 		tevent_set_debug(ev_ctx, ldb_tevent_debug, ldb);
 		tevent_loop_allow_nesting(ev_ctx);
 	}
@@ -253,11 +257,12 @@ int ldb_connect(struct ldb_context *ldb, const char *url,
 		return ret;
 	}
 
-	if (ldb_load_modules(ldb, options) != LDB_SUCCESS) {
+	ret = ldb_load_modules(ldb, options);
+	if (ret != LDB_SUCCESS) {
 		ldb_debug(ldb, LDB_DEBUG_FATAL,
 			  "Unable to load modules for %s: %s",
 			  url, ldb_errstring(ldb));
-		return LDB_ERR_OTHER;
+		return ret;
 	}
 
 	/* set the default base dn */
@@ -366,10 +371,14 @@ int ldb_transaction_start(struct ldb_context *ldb)
 				ldb_strerror(status),
 				status);
 		}
-	}
-	if ((module && module->ldb->flags & LDB_FLG_ENABLE_TRACING)) { 
-		ldb_debug(module->ldb, LDB_DEBUG_TRACE, "start ldb transaction error: %s", 
-			  ldb_errstring(module->ldb));				
+		if ((module && module->ldb->flags & LDB_FLG_ENABLE_TRACING)) {
+			ldb_debug(module->ldb, LDB_DEBUG_TRACE, "start ldb transaction error: %s",
+				  ldb_errstring(module->ldb));
+		}
+	} else {
+		if ((module && module->ldb->flags & LDB_FLG_ENABLE_TRACING)) {
+			ldb_debug(module->ldb, LDB_DEBUG_TRACE, "start ldb transaction success");
+		}
 	}
 	return status;
 }
@@ -572,8 +581,8 @@ int ldb_wait(struct ldb_handle *handle, enum ldb_wait_type type)
 	struct tevent_context *ev;
 	int ret;
 
-	if (!handle) {
-		return ldb_error(handle->ldb, LDB_ERR_UNAVAILABLE, NULL);
+	if (handle == NULL) {
+		return LDB_ERR_UNAVAILABLE;
 	}
 
 	if (handle->state == LDB_ASYNC_DONE) {
diff --git a/lib/ldb/common/ldb_dn.c b/lib/ldb/common/ldb_dn.c
index 14596f6..6b6f90c 100644
--- a/lib/ldb/common/ldb_dn.c
+++ b/lib/ldb/common/ldb_dn.c
@@ -287,7 +287,7 @@ char *ldb_dn_escape_value(TALLOC_CTX *mem_ctx, struct ldb_val value)
 */
 static bool ldb_dn_explode(struct ldb_dn *dn)
 {
-	char *p, *ex_name, *ex_value, *data, *d, *dt, *t;
+	char *p, *ex_name = NULL, *ex_value = NULL, *data, *d, *dt, *t;
 	bool trim = true;
 	bool in_extended = true;
 	bool in_ex_name = false;
@@ -298,7 +298,7 @@ static bool ldb_dn_explode(struct ldb_dn *dn)
 	bool is_oid = false;
 	bool escape = false;
 	unsigned int x;
-	size_t l;
+	size_t l = 0;
 	int ret;
 	char *parse_dn;
 	bool is_index;
diff --git a/lib/ldb/common/ldb_modules.c b/lib/ldb/common/ldb_modules.c
index 4403656..05a8d8a 100644
--- a/lib/ldb/common/ldb_modules.c
+++ b/lib/ldb/common/ldb_modules.c
@@ -554,8 +554,33 @@ int ldb_next_request(struct ldb_module *module, struct ldb_request *request)
 		return ret;
 	}
 	if (!ldb_errstring(module->ldb)) {
+		const char *op;
+		switch (request->operation) {
+		case LDB_SEARCH:
+			op = "LDB_SEARCH";
+			break;
+		case LDB_ADD:
+			op = "LDB_ADD";
+			break;
+		case LDB_MODIFY:
+			op = "LDB_MODIFY";
+			break;
+		case LDB_DELETE:
+			op = "LDB_DELETE";
+			break;
+		case LDB_RENAME:
+			op = "LDB_RENAME";
+			break;
+		case LDB_EXTENDED:
+			op = "LDB_EXTENDED";
+			break;
+		default:
+			op = "request";
+			break;
+		}
+
 		/* Set a default error string, to place the blame somewhere */
-		ldb_asprintf_errstring(module->ldb, "error in module %s: %s (%d)", module->ops->name, ldb_strerror(ret), ret);
+		ldb_asprintf_errstring(module->ldb, "error in module %s: %s during %s (%d)", module->ops->name, ldb_strerror(ret), op, ret);
 	}
 
 	if (!(request->handle->flags & LDB_HANDLE_FLAG_DONE_CALLED)) {
@@ -876,6 +901,7 @@ static int ldb_modules_load_path(const char *path, const char *version)
 	} *loaded;
 	struct loaded *le;
 	int dlopen_flags;
+	bool deepbind_enabled = (getenv("LDB_MODULES_DISABLE_DEEPBIND") == NULL);
 
 	ret = stat(path, &st);
 	if (ret != 0) {
@@ -909,13 +935,25 @@ static int ldb_modules_load_path(const char *path, const char *version)
 
 	dlopen_flags = RTLD_NOW;
 #ifdef RTLD_DEEPBIND
-	/* use deepbind if possible, to avoid issues with different
-	   system library varients, for example ldb modules may be linked
-	   against Heimdal while the application may use MIT kerberos
-
-	   See the dlopen manpage for details
+	/*
+	 * use deepbind if possible, to avoid issues with different
+	 * system library varients, for example ldb modules may be linked
+	 * against Heimdal while the application may use MIT kerberos.
+	 *
+	 * See the dlopen manpage for details.
+	 *
+	 * One typical user is the bind_dlz module of Samba,
+	 * but symbol versioniong might be enough...
+	 *
+	 * We need a way to disable this in order to allow the
+	 * ldb_*ldap modules to work with a preloaded socket wrapper.
+	 *
+	 * So in future we may remove this completely
+	 * or at least invert the default behavior.
 	*/
-	dlopen_flags |= RTLD_DEEPBIND;
+	if (deepbind_enabled) {
+		dlopen_flags |= RTLD_DEEPBIND;
+	}
 #endif
 
 	handle = dlopen(path, dlopen_flags);
diff --git a/lib/ldb/ldb_map/ldb_map.c b/lib/ldb/ldb_map/ldb_map.c
index d35e5c6..66b0059 100644
--- a/lib/ldb/ldb_map/ldb_map.c
+++ b/lib/ldb/ldb_map/ldb_map.c
@@ -223,12 +223,18 @@ int ldb_next_remote_request(struct ldb_module *module, struct ldb_request *reque
 
 	case LDB_ADD:
 		msg = ldb_msg_copy_shallow(request, request->op.add.message);
+		if (msg == NULL) {
+			return LDB_ERR_OPERATIONS_ERROR;
+		}
 		msg->dn = ldb_dn_rebase_remote(msg, data, msg->dn);
 		request->op.add.message = msg;
 		break;
 
 	case LDB_MODIFY:
 		msg = ldb_msg_copy_shallow(request, request->op.mod.message);
+		if (msg == NULL) {
+			return LDB_ERR_OPERATIONS_ERROR;
+		}
 		msg->dn = ldb_dn_rebase_remote(msg, data, msg->dn);
 		request->op.mod.message = msg;
 		break;
@@ -326,6 +332,7 @@ const struct ldb_map_attribute *map_attr_find_remote(const struct ldb_map_contex
 			break;
 
 		case LDB_MAP_RENAME:
+		case LDB_MAP_RENDROP:
 		case LDB_MAP_CONVERT:
 			if (ldb_attr_cmp(map->u.rename.remote_name, name) == 0) {
 				return map;
@@ -333,7 +340,7 @@ const struct ldb_map_attribute *map_attr_find_remote(const struct ldb_map_contex
 			break;
 
 		case LDB_MAP_GENERATE:
-			for (j = 0; map->u.generate.remote_names && map->u.generate.remote_names[j]; j++) {
+			for (j = 0; map->u.generate.remote_names[j]; j++) {
 				if (ldb_attr_cmp(map->u.generate.remote_names[j], name) == 0) {
 					return map;
 				}
@@ -377,6 +384,7 @@ const char *map_attr_map_local(void *mem_ctx, const struct ldb_map_attribute *ma
 		return talloc_strdup(mem_ctx, attr);
 
 	case LDB_MAP_RENAME:
+	case LDB_MAP_RENDROP:
 	case LDB_MAP_CONVERT:
 		return talloc_strdup(mem_ctx, map->u.rename.remote_name);
 
@@ -518,6 +526,7 @@ struct ldb_dn *ldb_dn_map_local(struct ldb_module *module, void *mem_ctx, struct
 			/* fall through */
 		case LDB_MAP_KEEP:
 		case LDB_MAP_RENAME:
+		case LDB_MAP_RENDROP:
 			name = map_attr_map_local(newdn, map, ldb_dn_get_component_name(dn, i));
 			if (name == NULL) goto failed;
 
@@ -593,6 +602,7 @@ struct ldb_dn *ldb_dn_map_remote(struct ldb_module *module, void *mem_ctx, struc
 			/* fall through */
 		case LDB_MAP_KEEP:
 		case LDB_MAP_RENAME:
+		case LDB_MAP_RENDROP:
 			name = map_attr_map_remote(newdn, map, ldb_dn_get_component_name(dn, i));
 			if (name == NULL) goto failed;
 
@@ -869,9 +879,9 @@ static int map_objectclass_convert_operator(struct ldb_module *module, void *mem
  * ============================== */
 
 /* Build a request to search a record by its DN. */
-struct ldb_request *map_search_base_req(struct map_context *ac, struct ldb_dn *dn, const char * const *attrs, const struct ldb_parse_tree *tree, void *context, ldb_map_callback_t callback)
+struct ldb_request *map_search_base_req(struct map_context *ac, struct ldb_dn *dn, const char * const *attrs, struct ldb_parse_tree *tree, void *context, ldb_map_callback_t callback)
 {
-	const struct ldb_parse_tree *search_tree;
+	struct ldb_parse_tree *search_tree;
 	struct ldb_context *ldb;
 	struct ldb_request *req;
 	int ret;
diff --git a/lib/ldb/ldb_map/ldb_map.h b/lib/ldb/ldb_map/ldb_map.h
index 5db3e02..46ef3cc 100644
--- a/lib/ldb/ldb_map/ldb_map.h
+++ b/lib/ldb/ldb_map/ldb_map.h
@@ -63,9 +63,10 @@ struct ldb_map_attribute {
 		LDB_MAP_KEEP,   /* Keep as is. Same name locally and remotely. */
 		LDB_MAP_RENAME, /* Simply rename the attribute. Name changes, data is the same */
 		LDB_MAP_CONVERT, /* Rename + convert data */
-		LDB_MAP_GENERATE /* Use generate function for generating new name/data.
+		LDB_MAP_GENERATE, /* Use generate function for generating new name/data.
 						Used for generating attributes based on 
 						multiple remote attributes. */
+		LDB_MAP_RENDROP /* Rename the attribute. Strip from Add requests. */
 	} type;
 	
 	/* if set, will be called for search expressions that contain this attribute */
diff --git a/lib/ldb/ldb_map/ldb_map_inbound.c b/lib/ldb/ldb_map/ldb_map_inbound.c
index 38dd5ac..461e681 100644
--- a/lib/ldb/ldb_map/ldb_map_inbound.c
+++ b/lib/ldb/ldb_map/ldb_map_inbound.c
@@ -65,7 +65,7 @@ static struct ldb_message_element *ldb_msg_el_map_local(struct ldb_module *modul
 
 /* Add a message element either to a local or to a remote message,
  * depending on whether it goes into the local or remote partition. */
-static int ldb_msg_el_partition(struct ldb_module *module, struct ldb_message *local, struct ldb_message *remote, const struct ldb_message *msg, const char *attr_name, /* const char * const names[], */ const struct ldb_message_element *old)
+static int ldb_msg_el_partition(struct ldb_module *module, enum ldb_request_type optype, struct ldb_message *local, struct ldb_message *remote, const struct ldb_message *msg, const char *attr_name, /* const char * const names[], */ const struct ldb_message_element *old)
 {
 	const struct ldb_map_context *data = map_get_context(module);
 	const struct ldb_map_attribute *map = map_attr_find_local(data, attr_name);
@@ -81,6 +81,13 @@ static int ldb_msg_el_partition(struct ldb_module *module, struct ldb_message *l
 	}
 
 	switch (map->type) {
+	case LDB_MAP_RENDROP:
+		if (optype != LDB_ADD) {
+			/* do the same as LDB_MAP_RENAME */
+			el = ldb_msg_el_map_local(module, remote, map, old);
+			break;
+		}
+		/* fall through */
 	case LDB_MAP_IGNORE:
 		goto local;
 
@@ -157,7 +164,7 @@ static bool ldb_msg_check_remote(struct ldb_module *module, const struct ldb_mes
 
 /* Split message elements that stay in the local partition from those
  * that are mapped into the remote partition. */
-static int ldb_msg_partition(struct ldb_module *module, struct ldb_message *local, struct ldb_message *remote, const struct ldb_message *msg)
+static int ldb_msg_partition(struct ldb_module *module, enum ldb_request_type optype, struct ldb_message *local, struct ldb_message *remote, const struct ldb_message *msg)
 {
 	/* const char * const names[]; */
 	struct ldb_context *ldb;
@@ -175,7 +182,7 @@ static int ldb_msg_partition(struct ldb_module *module, struct ldb_message *loca
 			continue;
 		}
 
-		ret = ldb_msg_el_partition(module, local, remote, msg, msg->elements[i].name, &msg->elements[i]);
+		ret = ldb_msg_el_partition(module, optype, local, remote, msg, msg->elements[i].name, &msg->elements[i]);
 		if (ret) {
 			return ret;
 		}
@@ -408,7 +415,7 @@ int ldb_map_add(struct ldb_module *module, struct ldb_request *req)
 	remote_msg->dn = ldb_dn_map_local(ac->module, remote_msg, msg->dn);
 
 	/* Split local from remote message */
-	ldb_msg_partition(module, ac->local_msg, remote_msg, msg);
+	ldb_msg_partition(module, req->operation, ac->local_msg, remote_msg, msg);
 
 	/* Prepare the remote operation */
 	ret = ldb_build_add_req(&ac->remote_req, ldb,
@@ -469,7 +476,7 @@ static int map_add_do_local(struct map_context *ac)
 int ldb_map_modify(struct ldb_module *module, struct ldb_request *req)
 {
 	const struct ldb_message *msg = req->op.mod.message;
-	struct ldb_request *search_req;
+	struct ldb_request *search_req = NULL;
 	struct ldb_message *remote_msg;
 	struct ldb_context *ldb;
 	struct map_context *ac;
@@ -518,7 +525,7 @@ int ldb_map_modify(struct ldb_module *module, struct ldb_request *req)
 	remote_msg->dn = ldb_dn_map_local(ac->module, remote_msg, msg->dn);
 
 	/* Split local from remote message */
-	ldb_msg_partition(module, ac->local_msg, remote_msg, msg);
+	ldb_msg_partition(module, req->operation, ac->local_msg, remote_msg, msg);
 
 	/* Prepare the remote operation */
 	ret = ldb_build_mod_req(&ac->remote_req, ldb,
@@ -692,7 +699,7 @@ static int map_delete_do_local(struct map_context *ac)
 /* Rename a record. */
 int ldb_map_rename(struct ldb_module *module, struct ldb_request *req)
 {
-	struct ldb_request *search_req;
+	struct ldb_request *search_req = NULL;
 	struct ldb_context *ldb;
 	struct map_context *ac;
 	int ret;
diff --git a/lib/ldb/ldb_map/ldb_map_outbound.c b/lib/ldb/ldb_map/ldb_map_outbound.c
index 2c517a6..1ee2dfe 100644
--- a/lib/ldb/ldb_map/ldb_map_outbound.c
+++ b/lib/ldb/ldb_map/ldb_map_outbound.c
@@ -134,6 +134,7 @@ static const char **map_attrs_collect_remote(struct ldb_module *module, void *me
 			goto named;
 
 		case LDB_MAP_RENAME:
+		case LDB_MAP_RENDROP:
 		case LDB_MAP_CONVERT:
 			name = map->u.rename.remote_name;
 			goto named;
@@ -189,26 +190,30 @@ static int map_attrs_partition(struct ldb_module *module, void *mem_ctx, const c
 static int ldb_msg_replace(struct ldb_message *msg, const struct ldb_message_element *el)
 {
 	struct ldb_message_element *old;
-
+	int j;
 	old = ldb_msg_find_element(msg, el->name);
 
 	/* no local result, add as new element */
 	if (old == NULL) {
 		if (ldb_msg_add_empty(msg, el->name, 0, &old) != 0) {
-			return -1;
+			return LDB_ERR_OPERATIONS_ERROR;
 		}
-		talloc_free(discard_const_p(char, old->name));
+	}
+	else {
+		talloc_free(old->values);
 	}
 
-	/* copy new element */
-	*old = *el;
-
-	/* and make sure we reference the contents */
-	if (!talloc_reference(msg->elements, el->name)) {
-		return -1;
+	old->values = talloc_array(msg->elements, struct ldb_val, el->num_values);
+	old->num_values = el->num_values;
+	if (old->values == NULL) {
+		return LDB_ERR_OPERATIONS_ERROR;
 	}
-	if (!talloc_reference(msg->elements, el->values)) {
-		return -1;
+	/* copy the values into the element */
+	for (j=0;j<el->num_values;j++) {
+		old->values[j] = ldb_val_dup(old->values, &el->values[j]);
+		if (old->values[j].data == NULL && el->values[j].length != 0) {
+			return LDB_ERR_OPERATIONS_ERROR;
+		}
 	}
 
 	return 0;
@@ -241,7 +246,7 @@ static struct ldb_message_element *ldb_msg_el_map_remote(struct ldb_module *modu
 
 	for (i = 0; data->attribute_maps[i].local_name; i++) {
 		struct ldb_map_attribute *am = &data->attribute_maps[i];
-		if ((am->type == LDB_MAP_RENAME &&
+		if (((am->type == LDB_MAP_RENAME || am->type == LDB_MAP_RENDROP) &&
 			!strcmp(am->u.rename.remote_name, attr_name))
 		    || (am->type == LDB_MAP_CONVERT &&
 			!strcmp(am->u.convert.remote_name, attr_name))) {
@@ -306,6 +311,7 @@ static int ldb_msg_el_merge(struct ldb_module *module, struct ldb_message *local
 		remote_name = attr_name;
 		break;
 	case LDB_MAP_RENAME:
+	case LDB_MAP_RENDROP:
 		remote_name = map->u.rename.remote_name;
 		break;
 	case LDB_MAP_GENERATE:
@@ -327,6 +333,7 @@ static int ldb_msg_el_merge(struct ldb_module *module, struct ldb_message *local
 		/* fall through */
 	case LDB_MAP_KEEP:
 	case LDB_MAP_RENAME:
+	case LDB_MAP_RENDROP:
 		old = ldb_msg_find_element(remote, remote_name);
 		if (old) {
 			el = ldb_msg_el_map_remote(module, local, map, attr_name, old);
@@ -480,7 +487,7 @@ static int map_reply_remote(struct map_context *ac, struct ldb_reply *ares)
 	msg = ldb_msg_new(ares);
 	if (msg == NULL) {
 		map_oom(ac->module);
-		return -1;
+		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
 	/* Merge remote message into new message */
@@ -494,7 +501,7 @@ static int map_reply_remote(struct map_context *ac, struct ldb_reply *ares)
 	dn = ldb_dn_map_rebase_remote(ac->module, msg, ares->message->dn);
 	if (dn == NULL) {
 		talloc_free(msg);
-		return -1;
+		return LDB_ERR_OPERATIONS_ERROR;
 	}
 	msg->dn = dn;
 
@@ -581,7 +588,7 @@ static int map_subtree_select_local_not(struct ldb_module *module, void *mem_ctx
 	*new = talloc_memdup(mem_ctx, tree, sizeof(struct ldb_parse_tree));
 	if (*new == NULL) {
 		map_oom(module);
-		return -1;
+		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
 	/* Generate new subtree */
@@ -613,7 +620,7 @@ static int map_subtree_select_local_list(struct ldb_module *module, void *mem_ct
 	*new = talloc_memdup(mem_ctx, tree, sizeof(struct ldb_parse_tree));
 	if (*new == NULL) {
 		map_oom(module);
-		return -1;
+		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
 	/* Prepare list of subtrees */
@@ -622,7 +629,7 @@ static int map_subtree_select_local_list(struct ldb_module *module, void *mem_ct
 	if ((*new)->u.list.elements == NULL) {
 		map_oom(module);
 		talloc_free(*new);
-		return -1;
+		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
 	/* Generate new list of subtrees */
@@ -662,7 +669,7 @@ static int map_subtree_select_local_simple(struct ldb_module *module, void *mem_
 	*new = talloc_memdup(mem_ctx, tree, sizeof(struct ldb_parse_tree));
 	if (*new == NULL) {
 		map_oom(module);
-		return -1;
+		return LDB_ERR_OPERATIONS_ERROR;
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list