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

Karolin Seeger kseeger at samba.org
Thu Aug 8 11:17:03 UTC 2019


The branch, v4-10-test has been updated
       via  bf28f9d7bef tests/drs_no_dns: Check dbcheck and ldapcmp pass
       via  bf70fc09852 tests: Add samba_upgradedns to the list of possible cmds
       via  1d2c7ee7061 netcmd: Allow drs replicate --local to create partitions
       via  9dac4d85ad0 join: Use a specific attribute order for the DsAddEntry nTDSDSA object
       via  f839423bdab ctdb-config: depend on /etc/ctdb/nodes file
       via  b0ebe62fe51 vfs_catia: pass stat info to synthetic_smb_fname()
       via  376bed3a0e6 samba-tool: add 'import samba.drs_utils' to fsmo.py
       via  7788b9f3039 samba-tool: use only one LDAP modify for dns partition fsmo role transfer
       via  4d7ce477eb0 s4:torture:fsmo.py: remove unused 'net_cmd' variable
       via  cfce211fff1 samba-tool: fix replication after dns partition fsmo role transfer
       via  65c4f412509 s4:torture:fsmo.py: test role transfers of dns partitions
       via  b2849a889f3 dnsp.idl: fix payload for DSPROPERTY_ZONE_DELETED_FROM_HOSTNAME
       via  d2087e4b480 dnsp.idl: fix the dnsp_dns_addr_array definition
       via  e7dfe3f7f77 dnsp.idl: fix dnsp_ip4_array definition
       via  7dbde4521fe s4:torture: add local.ndr.dnsp tests
       via  bbe41dc7806 dbcheck: fallback to the default tombstoneLifetime of 180 days
       via  c51d810ee99 third_party: Update waf to version 2.0.17
       via  1dcb5dc3844 lib/util: set current_msg_{level,class} also during a DEBUGADD[C]() call
       via  823d57094b9 lib/util: remove unused prototypes in debug.h
       via  fdec94ba7c4 lib/util: fix call to dbghdrclass() for DEBUGC()
      from  b56e010af12 s4/libnet: Fix joining a Windows pre-2008R2 DC

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-10-test


- Log -----------------------------------------------------------------
commit bf28f9d7bef49d91ebe86a59b70da5add025def5
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Wed Jul 24 14:53:33 2019 +1200

    tests/drs_no_dns: Check dbcheck and ldapcmp pass
    
    When joining a DC without DNS partitions, make sure that the alternate
    flow of creating them afterwards results in a database with everything
    that is necessary.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14051
    RN: Allow a DC join without DNS partitions, to add them later
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 35c54007e6183829d9d85a24b3bd95f469739ad3)
    
    Autobuild-User(v4-10-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-10-test): Thu Aug  8 11:15:54 UTC 2019 on sn-devel-144

commit bf70fc0985259ce3ea97f1b2bcc48b9518a24e41
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Wed Jul 24 15:13:43 2019 +1200

    tests: Add samba_upgradedns to the list of possible cmds
    
    This will be used to test the replication scenario with no DNS partitions
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14051
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 7d2875bd70cf727730be8dc705bfd01eacaaaa6f)

commit 1d2c7ee7061461940a2952b6855db85a21afa494
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Wed Jul 24 15:18:40 2019 +1200

    netcmd: Allow drs replicate --local to create partitions
    
    Currently, neither the offline (--local) or online (normal replica sync)
    methods allow partition creation post-join. This overrides the Python
    default to not create the DB, which allows TDB + MDB to work.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14051
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit d90ccce59754bc833027c06683afac25f7a8d474)

commit 9dac4d85ad0dc52f5b08f048c529f386a0b436c8
Author: Tim Beale <timbeale at catalyst.net.nz>
Date:   Wed Jul 24 11:00:01 2019 +1200

    join: Use a specific attribute order for the DsAddEntry nTDSDSA object
    
    Joining a Windows domain can throw an error if the HasMasterNCs
    attribute occurs before msDS-HasMasterNCs. This patch changes the
    attribute order so that msDS-HasMasterNCs is always first.
    
    Previously on python2, the dictionary hash order was arbitrary but
    constant. By luck, msDS-HasMasterNCs was always before HasMasterNCs, so
    we never noticed any problem. With python3, the dictionary hash order
    now changes everytime you run the command, so the order is
    unpredictable.
    
    To enforce a order, we can change to use an OrderedDict, which will
    return the keys in the order they're added.
    
    I've asked Microsoft to clarify the protocol requirement here WRT
    attribute order. However, in the meantime we may as well fix the problem
    for users.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14046
    RN: When trying to join a Windows domain (with functional level 2008R2)
    as an AD domain controller, the 'samba-tool domain join' command could
    throw a python exception: 'RuntimeError ("DsAddEntry failed")'. When
    this problem occurred, you would also see the message "DsAddEntry failed
    with status WERR_ACCESS_DENIED info (8363, 'WERR_DS_NO_CROSSREF_FOR_NC')"
    in the command output. This issue has now been resolved. Note that this
    problem would only occur on Samba v4.10 when using the Python3 packages.
    
    Signed-off-by: Tim Beale <timbeale at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Wed Jul 24 04:18:21 UTC 2019 on sn-devel-184
    
    (cherry picked from commit 256684c7a86301d26d6cf7298fb70e647bf45cf5)

commit f839423bdab6133720c7a26c4a2300a828c74c14
Author: Rafael David Tinoco <rafaeldtinoco at ubuntu.com>
Date:   Thu Jun 27 20:12:25 2019 +0000

    ctdb-config: depend on /etc/ctdb/nodes file
    
    CTDB should start as a disabled unit (systemd) in most of the
    distributions and, when trying to enable it for the first time, user
    should get an unconfigured, or similar, error.
    
    Depending on /etc/ctdb/nodes file will give a clear direction to final
    user on what is needed in order to get cluster up and running. It should
    work like previous ENABLED=NO variables in SySV like initialization
    scripts.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14017
    RN: ctdb.service should only start if /etc/ctdb/nodes is not empty
    Signed-off-by: Rafael David Tinoco <rafaeldtinoco at ubuntu.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit c5803507df7def388edcd5b6cbfee30cd217b536)

commit b0ebe62fe51e42c6a78a16af68f2aec0424d5b7a
Author: Ralph Boehme <slow at samba.org>
Date:   Thu Jun 27 12:50:37 2019 +0200

    vfs_catia: pass stat info to synthetic_smb_fname()
    
    This doesn't cause visible damage in vanilla Samba, but would affect downstream
    consumers that add additional fields to struct smb_filename.
    
    For the same reason there's no test.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14015
    RN: Ensure vfs_catia passes stat info to stacked VFS modules
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit ae6dd4853e3e651f6e56ce735bcb0a2264857385)

commit 376bed3a0e6e37af3a23e15283fc560a84e9fe6a
Author: Björn Baumbach <bb at sernet.de>
Date:   Tue May 28 14:52:36 2019 +0200

    samba-tool: add 'import samba.drs_utils' to fsmo.py
    
    On some systems we're seeing this:
    
     ERROR(<type 'exceptions.AttributeError'>): uncaught exception - 'module' object has no attribute 'drs_utils'
       File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 185, in _run
         return self.run(*args, **kwargs)
       File "/usr/lib/python2.7/dist-packages/samba/netcmd/fsmo.py", line 533, in run
         transfer_dns_role(self.outf, sambaopts, credopts, role, samdb)
       File "/usr/lib/python2.7/dist-packages/samba/netcmd/fsmo.py", line 136, in transfer_dns_role
         except samba.drs_utils.drsException as e:
    
    E.g. it happens on debian stretch (9.9) with python 2.7.13 (on 4.10.4)
    
    While it doesn't happen on ubuntu 18.04 with python 2.7.15rc1 or
    with python 3.6.7.
    
    There were also some reports on the mailing lists, see:
    https://lists.samba.org/archive/samba-technical/2019-May/133624.html
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13973
    
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
    
    Signed-off-by: Björn Baumbach <bbaumbach at samba.org>
    Signed-off-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): Thu May 30 08:27:24 UTC 2019 on sn-devel-184
    
    (cherry picked from commit 320a5c5425e6ced18b1a9bf19b4f361ee16821ed)

commit 7788b9f30395df499396510300429f76e0a431db
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue May 28 14:54:19 2019 +0200

    samba-tool: use only one LDAP modify for dns partition fsmo role transfer
    
    We should not risk that we end with no role owner.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13973
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 6a2e3a15585086bcceb18283216978a2fcb30da3)

commit 4d7ce477eb0c7d47faf81b910c2b88f6779cb744
Author: Björn Baumbach <bb at sernet.de>
Date:   Tue May 28 14:57:15 2019 +0200

    s4:torture:fsmo.py: remove unused 'net_cmd' variable
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13973
    
    Signed-off-by: Björn Baumbach <bbaumbach at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 0fbb013bef886e425602fdbbef14a4029719818f)

commit cfce211fff116a104d3a4fbd9198cd5470f07ef3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue May 28 14:53:09 2019 +0200

    samba-tool: fix replication after dns partition fsmo role transfer
    
    The new role owner need to replicate from the old role owner.
    
    Before we told the old role owner to replicate from itself.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13973
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 4793f8ed584a4e6d8a26b06b691ec636e77d8f2a)

commit 65c4f4125095262fbea3c973e32b3cb58ac9bf3b
Author: Björn Baumbach <bb at sernet.de>
Date:   Fri May 24 15:46:17 2019 +0200

    s4:torture:fsmo.py: test role transfers of dns partitions
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13973
    
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
    
    Signed-off-by: Björn Baumbach <bbaumbach at samba.org>
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 5e000a8487d788dd196980b77ec7299c8be74abf)

commit b2849a889f3ec3907e67ea6a4f87435528123588
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri May 24 18:36:48 2019 +0200

    dnsp.idl: fix payload for DSPROPERTY_ZONE_DELETED_FROM_HOSTNAME
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13969
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Garming Sam <garming at catalyst.net.nz>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Fri Jun 21 11:02:21 UTC 2019 on sn-devel-184
    
    (cherry picked from commit aa2a3d95098231f48d7c308881bf66418164111e)

commit d2087e4b4806940ef398d97133a3842a40951810
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Apr 30 14:21:22 2019 +0200

    dnsp.idl: fix the dnsp_dns_addr_array definition
    
    The endian changes are needed in order to get the following result
    from the blobs Windows generated (see the torture test):
    
      AddrArray: ARRAY(3)
          AddrArray: struct dnsp_dns_addr
              family                   : 0x0002 (2)
              port                     : 0x0035 (53)
              ipv4                     : 172.31.99.33
              ipv6                     : 0000:0000:0000:0000:0000:0000:0000:0000
    
    [MS-DNSP] states that the port is supposed to be ignored, but it's still
    good to decode it as port '53' (0x0035) instead of '13568' (0x3500).
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13969
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Garming Sam <garming at catalyst.net.nz>
    (cherry picked from commit 6fc7cc15048673d109042d7b40684ed63eb4ff9e)

commit e7dfe3f7f77d42991dd32095dced1ac821ddeab0
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Apr 30 10:07:51 2019 +0200

    dnsp.idl: fix dnsp_ip4_array definition
    
    In future we should use ipv4address, but that would result in a much
    larger change.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13969
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Garming Sam <garming at catalyst.net.nz>
    (cherry picked from commit 6d958af0b4cb6fd45cfda0298243859b3b043c6f)

commit 7dbde4521fe6dd7f9b958bb4a2cb1f340bdbfcaa
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri May 24 17:39:17 2019 +0200

    s4:torture: add local.ndr.dnsp tests
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13969
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Garming Sam <garming at catalyst.net.nz>
    (cherry picked from commit 9a0c3a475f29138c0c49e0d22cf52ab45178d16b)

commit bbe41dc7806faab7f61363be4524800c1372dca2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Apr 29 11:59:50 2019 +0200

    dbcheck: fallback to the default tombstoneLifetime of 180 days
    
    If a domain was provisioned by Windows 2000 this value is missing in the
    database.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13967
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Tue May 28 08:32:10 UTC 2019 on sn-devel-184
    
    (cherry picked from commit 2ef79a4c1d695a3e498b142810a1317d85b9b6da)

commit c51d810ee99fd971f007e2262ff945bd835c7ae8
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Jun 3 10:40:55 2019 +0200

    third_party: Update waf to version 2.0.17
    
    This fixes building Samba, libtalloc, libtevent, libtdb and libldb with
    Python 3.8.
    
         wget https://waf.io/waf-2.0.17.tar.bz2
         tar -xf waf-2.0.17.tar.bz2
         git rm third_party/waf/waflib/ -r
         mkdir third_party/waf -p
         rsync -a waf-2.0.17/waflib/ third_party/waf/waflib/
         git add third_party/waf/waflib/
    
    (Then update version number in buildtools/bin/waf and
    buildtools/wafsamba/wafsamba.py)
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13960
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit aabdcc91513e242c4f191e1bbbb70c890416d213)

commit 1dcb5dc3844b65cee056f552a0565abf210942dd
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Apr 26 13:40:58 2019 +0200

    lib/util: set current_msg_{level,class} also during a DEBUGADD[C]() call
    
    In some situations we use DEBUGADDC() in order to print out content
    without a related debug header line.
    
    This is important with the new per class logfile with:
    
     log level = 1 dsdb_json_audit:10@/var/log/samba/log.dsdb_json_audit
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13915
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    (cherry picked from commit 0da12ff93d213ac742eeb865bfa5697ca8a2280a)

commit 823d57094b992d4287487932c72d308f4d94d6a3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Apr 26 13:32:43 2019 +0200

    lib/util: remove unused prototypes in debug.h
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13915
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    (cherry picked from commit d98a971247450d494c581c5454e6c270ad1b6880)

commit fdec94ba7c4da37d3ee7d1507cd41ed83e31291a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Apr 26 13:21:15 2019 +0200

    lib/util: fix call to dbghdrclass() for DEBUGC()
    
    dbghdrclass() sets the global 'current_msg_class' and for that
    DEBUGC() should pass the given dbgc_class instead of the per file
    DBGC_CLASS.
    
    This is important with the new per class logfile with:
    
     log level = 1 dsdb_audit:10@/var/log/samba/log.dsdb_audit
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13915
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    (cherry picked from commit bb0ffbf38cb1955c9e400003add680eabcf706a6)

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

Summary of changes:
 buildtools/bin/waf                                 |   2 +-
 buildtools/wafsamba/wafsamba.py                    |   2 +-
 ctdb/config/ctdb.service                           |   1 +
 lib/util/debug.c                                   |  17 +-
 lib/util/debug.h                                   |  11 +-
 librpc/idl/dnsp.idl                                |   9 +-
 python/samba/dbchecker.py                          |   5 +-
 python/samba/join.py                               |  23 +-
 python/samba/netcmd/drs.py                         |   4 +-
 python/samba/netcmd/fsmo.py                        |  27 +-
 python/samba/tests/__init__.py                     |   1 +
 source3/modules/vfs_catia.c                        |  42 +--
 source4/dns_server/dnsserver_common.c              |   2 +-
 .../tests/rpc_dns_server_dnsutils_test.c           |  44 +--
 source4/selftest/tests.py                          |   7 +
 source4/torture/drs/python/fsmo.py                 |  12 +-
 .../torture/drs/python/samba_tool_drs_no_dns.py    | 183 ++++++++++
 source4/torture/ndr/dnsp.c                         | 367 +++++++++++++++++++++
 source4/torture/ndr/ndr.c                          |   1 +
 source4/torture/ndr/ndr.h                          |   9 +
 source4/torture/wscript_build                      |   1 +
 third_party/waf/waflib/Build.py                    |  62 +++-
 third_party/waf/waflib/ConfigSet.py                |   4 +-
 third_party/waf/waflib/Configure.py                |   5 +-
 third_party/waf/waflib/Context.py                  |  16 +-
 third_party/waf/waflib/Logs.py                     |   9 +-
 third_party/waf/waflib/Node.py                     |   3 +-
 third_party/waf/waflib/Runner.py                   |  60 +++-
 third_party/waf/waflib/Scripting.py                |  15 +-
 third_party/waf/waflib/Task.py                     | 215 +++++++++---
 third_party/waf/waflib/TaskGen.py                  |   6 +-
 third_party/waf/waflib/Tools/c_config.py           |  11 +-
 third_party/waf/waflib/Tools/c_preproc.py          |   8 +-
 third_party/waf/waflib/Tools/ccroot.py             |  22 +-
 third_party/waf/waflib/Tools/d_scan.py             |   8 +-
 third_party/waf/waflib/Tools/fc.py                 |  24 +-
 third_party/waf/waflib/Tools/fc_config.py          |   6 +-
 third_party/waf/waflib/Tools/fc_scan.py            |  12 +-
 third_party/waf/waflib/Tools/ifort.py              |   2 +-
 third_party/waf/waflib/Tools/javaw.py              | 157 ++++++++-
 third_party/waf/waflib/Tools/md5_tstamp.py         |   6 +-
 third_party/waf/waflib/Tools/msvc.py               |  18 +-
 third_party/waf/waflib/Tools/python.py             |  18 +-
 third_party/waf/waflib/Tools/qt5.py                |  14 +-
 third_party/waf/waflib/Tools/waf_unit_test.py      |   4 +-
 third_party/waf/waflib/Tools/winres.py             |   4 +-
 third_party/waf/waflib/Utils.py                    |  26 +-
 third_party/waf/waflib/ansiterm.py                 |   2 +-
 third_party/waf/waflib/extras/buildcopy.py         |   7 +-
 third_party/waf/waflib/extras/clang_cross.py       |  92 ++++++
 .../waf/waflib/extras/clang_cross_common.py        | 113 +++++++
 third_party/waf/waflib/extras/clangxx_cross.py     | 106 ++++++
 third_party/waf/waflib/extras/color_msvc.py        |  59 ++++
 third_party/waf/waflib/extras/cppcheck.py          |  12 +-
 third_party/waf/waflib/extras/cpplint.py           |  77 ++---
 third_party/waf/waflib/extras/cython.py            |  15 +-
 third_party/waf/waflib/extras/distnet.py           |   2 +-
 third_party/waf/waflib/extras/doxygen.py           |  13 +-
 third_party/waf/waflib/extras/erlang.py            |   2 +-
 third_party/waf/waflib/extras/fast_partial.py      |   3 +-
 third_party/waf/waflib/extras/fc_cray.py           |   2 +-
 third_party/waf/waflib/extras/fc_nec.py            |   2 +-
 third_party/waf/waflib/extras/fc_nfort.py          |  52 +++
 third_party/waf/waflib/extras/gccdeps.py           |   6 +-
 third_party/waf/waflib/extras/kde4.py              |   2 +-
 third_party/waf/waflib/extras/msvcdeps.py          |  73 ++--
 third_party/waf/waflib/extras/ocaml.py             |   2 +-
 third_party/waf/waflib/extras/parallel_debug.py    |   9 +-
 third_party/waf/waflib/extras/pgicc.py             |   2 +-
 third_party/waf/waflib/extras/protoc.py            |  93 +++---
 third_party/waf/waflib/extras/pyqt5.py             |  21 +-
 third_party/waf/waflib/extras/qt4.py               |   6 +-
 third_party/waf/waflib/extras/remote.py            |   2 +-
 third_party/waf/waflib/extras/run_do_script.py     |   2 +-
 third_party/waf/waflib/extras/sphinx.py            |  81 +++++
 third_party/waf/waflib/extras/swig.py              |   4 +-
 third_party/waf/waflib/extras/syms.py              |   2 +-
 third_party/waf/waflib/extras/use_config.py        |   2 +-
 third_party/waf/waflib/extras/xcode6.py            |   8 +-
 third_party/waf/waflib/processor.py                |   4 +
 80 files changed, 1939 insertions(+), 444 deletions(-)
 create mode 100644 source4/torture/drs/python/samba_tool_drs_no_dns.py
 create mode 100644 source4/torture/ndr/dnsp.c
 create mode 100644 third_party/waf/waflib/extras/clang_cross.py
 create mode 100644 third_party/waf/waflib/extras/clang_cross_common.py
 create mode 100644 third_party/waf/waflib/extras/clangxx_cross.py
 create mode 100644 third_party/waf/waflib/extras/color_msvc.py
 create mode 100644 third_party/waf/waflib/extras/fc_nfort.py
 create mode 100644 third_party/waf/waflib/extras/sphinx.py


Changeset truncated at 500 lines:

diff --git a/buildtools/bin/waf b/buildtools/bin/waf
index 3ee4d5bc4df..8413f2332b7 100755
--- a/buildtools/bin/waf
+++ b/buildtools/bin/waf
@@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE.
 
 import os, sys, inspect
 
-VERSION="2.0.8"
+VERSION="2.0.17"
 REVISION="x"
 GIT="x"
 INSTALL="x"
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index a077026c690..760430460b8 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -37,7 +37,7 @@ LIB_PATH="shared"
 
 os.environ['PYTHONUNBUFFERED'] = '1'
 
-if Context.HEXVERSION not in (0x2000800,):
+if Context.HEXVERSION not in (0x2001100,):
     Logs.error('''
 Please use the version of waf that comes with Samba, not
 a system installed version. See http://wiki.samba.org/index.php/Waf
diff --git a/ctdb/config/ctdb.service b/ctdb/config/ctdb.service
index 675b3147417..fd81c38e26d 100644
--- a/ctdb/config/ctdb.service
+++ b/ctdb/config/ctdb.service
@@ -2,6 +2,7 @@
 Description=CTDB
 Documentation=man:ctdbd(1) man:ctdb(7)
 After=network-online.target time-sync.target
+ConditionFileNotEmpty=/etc/ctdb/nodes
 
 [Service]
 Type=forking
diff --git a/lib/util/debug.c b/lib/util/debug.c
index 7f3d13da53c..38df787c658 100644
--- a/lib/util/debug.c
+++ b/lib/util/debug.c
@@ -1475,6 +1475,17 @@ void dbgflush( void )
 	bufr_print();
 }
 
+bool dbgsetclass(int level, int cls)
+{
+	/* Set current_msg_level. */
+	current_msg_level = level;
+
+	/* Set current message class */
+	current_msg_class = cls;
+
+	return true;
+}
+
 /***************************************************************************
  Print a Debug Header.
 
@@ -1519,11 +1530,7 @@ bool dbghdrclass(int level, int cls, const char *location, const char *func)
 		return( true );
 	}
 
-	/* Set current_msg_level. */
-	current_msg_level = level;
-
-	/* Set current message class */
-	current_msg_class = cls;
+	dbgsetclass(level, cls);
 
 	/* Don't print a header if we're logging to stdout. */
 	if ( state.logtype != DEBUG_FILE ) {
diff --git a/lib/util/debug.h b/lib/util/debug.h
index e6f54a7657f..67dbf3357e3 100644
--- a/lib/util/debug.h
+++ b/lib/util/debug.h
@@ -45,7 +45,7 @@
 bool dbgtext_va(const char *, va_list ap) PRINTF_ATTRIBUTE(1,0);
 bool dbgtext( const char *, ... ) PRINTF_ATTRIBUTE(1,2);
 bool dbghdrclass( int level, int cls, const char *location, const char *func);
-bool dbghdr( int level, const char *location, const char *func);
+bool dbgsetclass(int level, int cls);
 
 /*
  * Define all new debug classes here. A class is represented by an entry in
@@ -201,17 +201,19 @@ void debuglevel_set_class(size_t idx, int level);
 #define DEBUGC( dbgc_class, level, body ) \
   (void)( ((level) <= MAX_DEBUG_LEVEL) && \
        unlikely(debuglevel_get_class(dbgc_class) >= (level))             \
-       && (dbghdrclass( level, DBGC_CLASS, __location__, __FUNCTION__ )) \
+       && (dbghdrclass( level, dbgc_class, __location__, __FUNCTION__ )) \
        && (dbgtext body) )
 
 #define DEBUGADD( level, body ) \
   (void)( ((level) <= MAX_DEBUG_LEVEL) && \
-	  unlikely(debuglevel_get_class(DBGC_CLASS) >= (level))	\
+       unlikely(debuglevel_get_class(DBGC_CLASS) >= (level)) \
+       && (dbgsetclass(level, DBGC_CLASS))                   \
        && (dbgtext body) )
 
 #define DEBUGADDC( dbgc_class, level, body ) \
   (void)( ((level) <= MAX_DEBUG_LEVEL) && \
-          unlikely((debuglevel_get_class(dbgc_class) >= (level))) \
+       unlikely((debuglevel_get_class(dbgc_class) >= (level))) \
+       && (dbgsetclass(level, dbgc_class))                     \
        && (dbgtext body) )
 
 /* Print a separator to the debug log. */
@@ -318,7 +320,6 @@ void force_check_log_size( void );
 bool need_to_check_log_size( void );
 void check_log_size( void );
 void dbgflush( void );
-bool dbghdrclass(int level, int cls, const char *location, const char *func);
 bool debug_get_output_is_stderr(void);
 bool debug_get_output_is_stdout(void);
 void debug_schedule_reopen_logs(void);
diff --git a/librpc/idl/dnsp.idl b/librpc/idl/dnsp.idl
index d705cfcbfa3..e09a3dcf43d 100644
--- a/librpc/idl/dnsp.idl
+++ b/librpc/idl/dnsp.idl
@@ -169,13 +169,13 @@ interface dnsp
 
 	typedef struct {
 		uint32  addrCount;
-		[size_is(addrCount)] uint32 *addr;
+		uint32 addrArray[addrCount];
 	} dnsp_ip4_array;
 
 	typedef struct {
 		uint16 	family;
-		uint16	port;
-		ipv4address ipv4;
+		[flag(NDR_BIG_ENDIAN)] uint16	port;
+		[flag(NDR_BIG_ENDIAN)] ipv4address ipv4;
 		ipv6address ipv6;
 		uint8	pad[8];
 		uint32	unused[8];
@@ -187,6 +187,7 @@ interface dnsp
 		uint32	Tag;
 		uint16	Family;
 		uint16	Reserved0;
+		uint32	Flags;
 		uint32	MatchFlag;
 		uint32	Reserved1;
 		uint32	Reserved2;
@@ -238,7 +239,7 @@ interface dnsp
 		[case(DSPROPERTY_ZONE_AGING_STATE)]             uint32 aging_enabled;
 		[case(DSPROPERTY_ZONE_SCAVENGING_SERVERS)]      dnsp_ip4_array servers;
 		[case(DSPROPERTY_ZONE_AGING_ENABLED_TIME)]      uint32 next_scavenging_cycle_hours;
-		[case(DSPROPERTY_ZONE_DELETED_FROM_HOSTNAME)]   utf8string deleted_by_hostname;
+		[case(DSPROPERTY_ZONE_DELETED_FROM_HOSTNAME)]   nstring deleted_by_hostname;
 		[case(DSPROPERTY_ZONE_MASTER_SERVERS)]          dnsp_ip4_array master_servers;
 		[case(DSPROPERTY_ZONE_AUTO_NS_SERVERS)]         dnsp_ip4_array ns_servers;
 		[case(DSPROPERTY_ZONE_DCPROMO_CONVERT)]         dns_dcpromo_flag dcpromo_flag;
diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py
index e7ec426de54..3677564fea0 100644
--- a/python/samba/dbchecker.py
+++ b/python/samba/dbchecker.py
@@ -218,7 +218,10 @@ class dbcheck(object):
                            scope=ldb.SCOPE_BASE,
                            expression="(objectClass=nTDSService)",
                            attrs=["tombstoneLifetime"])
-        self.tombstoneLifetime = int(res[0]["tombstoneLifetime"][0])
+        if "tombstoneLifetime" in res[0]:
+            self.tombstoneLifetime = int(res[0]["tombstoneLifetime"][0])
+        else:
+            self.tombstoneLifetime = 180
 
         self.compatibleFeatures = []
         self.requiredFeatures = []
diff --git a/python/samba/join.py b/python/samba/join.py
index da8dcb050d3..6fe4ee7dc90 100644
--- a/python/samba/join.py
+++ b/python/samba/join.py
@@ -48,6 +48,7 @@ import time
 import re
 import os
 import tempfile
+from collections import OrderedDict
 from samba.compat import text_type
 from samba.compat import get_string
 from samba.netcmd import CommandError
@@ -551,11 +552,14 @@ class DCJoinContext(object):
         '''return the ntdsdsa object to add'''
 
         print("Adding %s" % ctx.ntds_dn)
-        rec = {
-            "dn": ctx.ntds_dn,
-            "objectclass": "nTDSDSA",
-            "systemFlags": str(samba.dsdb.SYSTEM_FLAG_DISALLOW_MOVE_ON_DELETE),
-            "dMDLocation": ctx.schema_dn}
+
+        # When joining Windows, the order of certain attributes (mostly only
+        # msDS-HasMasterNCs and HasMasterNCs) seems to matter
+        rec = OrderedDict([
+            ("dn", ctx.ntds_dn),
+            ("objectclass", "nTDSDSA"),
+            ("systemFlags", str(samba.dsdb.SYSTEM_FLAG_DISALLOW_MOVE_ON_DELETE)),
+            ("dMDLocation", ctx.schema_dn)])
 
         nc_list = [ctx.base_dn, ctx.config_dn, ctx.schema_dn]
 
@@ -571,12 +575,17 @@ class DCJoinContext(object):
             rec["options"] = "37"
         else:
             rec["objectCategory"] = "CN=NTDS-DSA,%s" % ctx.schema_dn
+
+            # Note that Windows seems to have an undocumented requirement that
+            # the msDS-HasMasterNCs attribute occurs before HasMasterNCs
+            if ctx.behavior_version >= samba.dsdb.DS_DOMAIN_FUNCTION_2003:
+                rec["msDS-HasMasterNCs"] = ctx.full_nc_list
+
             rec["HasMasterNCs"]      = []
             for nc in nc_list:
                 if nc in ctx.full_nc_list:
                     rec["HasMasterNCs"].append(nc)
-            if ctx.behavior_version >= samba.dsdb.DS_DOMAIN_FUNCTION_2003:
-                rec["msDS-HasMasterNCs"] = ctx.full_nc_list
+
             rec["options"] = "1"
             rec["invocationId"] = ndr_pack(ctx.invocation_id)
 
diff --git a/python/samba/netcmd/drs.py b/python/samba/netcmd/drs.py
index e6b892c2877..5c20d6be6f3 100644
--- a/python/samba/netcmd/drs.py
+++ b/python/samba/netcmd/drs.py
@@ -448,8 +448,10 @@ class cmd_drs_replicate(Command):
         self.server = SOURCE_DC
         drsuapi_connect(self)
 
+        # Override the default flag LDB_FLG_DONT_CREATE_DB
         self.local_samdb = SamDB(session_info=system_session(), url=None,
-                                 credentials=self.creds, lp=self.lp)
+                                 credentials=self.creds, lp=self.lp,
+                                 flags=0)
 
         self.samdb = SamDB(url="ldap://%s" % self.server,
                            session_info=system_session(),
diff --git a/python/samba/netcmd/fsmo.py b/python/samba/netcmd/fsmo.py
index b916f9c97b8..643d0aec1b6 100644
--- a/python/samba/netcmd/fsmo.py
+++ b/python/samba/netcmd/fsmo.py
@@ -23,6 +23,7 @@ import ldb
 from ldb import LdbError
 from samba.dcerpc import drsuapi, misc
 from samba.auth import system_session
+import samba.drs_utils
 from samba.netcmd import (
     Command,
     CommandError,
@@ -65,6 +66,8 @@ def transfer_dns_role(outf, sambaopts, credopts, role, samdb):
         forest_dn = samba.dn_from_dns_name(samdb.forest_dns_name())
         role_object = "CN=Infrastructure,DC=ForestDnsZones," + forest_dn
 
+    new_host_dns_name = samdb.host_dns_name()
+
     res = samdb.search(role_object,
                        attrs=["fSMORoleOwner"],
                        scope=ldb.SCOPE_BASE,
@@ -106,22 +109,12 @@ def transfer_dns_role(outf, sambaopts, credopts, role, samdb):
 
         m = ldb.Message()
         m.dn = ldb.Dn(samdb, role_object)
-        m["fSMORoleOwner"] = ldb.MessageElement(master_owner,
-                                                ldb.FLAG_MOD_DELETE,
-                                                "fSMORoleOwner")
-
-        try:
-            samdb.modify(m)
-        except LdbError as e4:
-            (num, msg) = e4.args
-            raise CommandError("Failed to delete role '%s': %s" %
-                               (role, msg))
-
-        m = ldb.Message()
-        m.dn = ldb.Dn(samdb, role_object)
-        m["fSMORoleOwner"] = ldb.MessageElement(new_owner,
-                                                ldb.FLAG_MOD_ADD,
-                                                "fSMORoleOwner")
+        m["fSMORoleOwner_Del"] = ldb.MessageElement(master_owner,
+                                                    ldb.FLAG_MOD_DELETE,
+                                                    "fSMORoleOwner")
+        m["fSMORoleOwner_Add"] = ldb.MessageElement(new_owner,
+                                                    ldb.FLAG_MOD_ADD,
+                                                    "fSMORoleOwner")
         try:
             samdb.modify(m)
         except LdbError as e5:
@@ -129,7 +122,7 @@ def transfer_dns_role(outf, sambaopts, credopts, role, samdb):
             raise CommandError("Failed to add role '%s': %s" % (role, msg))
 
         try:
-            connection = samba.drs_utils.drsuapi_connect(samdb.host_dns_name(),
+            connection = samba.drs_utils.drsuapi_connect(new_host_dns_name,
                                                          lp, creds)
         except samba.drs_utils.drsException as e:
             raise CommandError("Drsuapi Connect failed", e)
diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py
index f904499b90b..15824bd410a 100644
--- a/python/samba/tests/__init__.py
+++ b/python/samba/tests/__init__.py
@@ -402,6 +402,7 @@ class BlackboxTestCase(TestCaseInTempDir):
 
         python_cmds = ["samba-tool",
             "samba_dnsupdate",
+            "samba_upgradedns",
             "script/traffic_replay",
             "script/traffic_learner"]
 
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index c362be764cc..ce771a11e57 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -193,7 +193,7 @@ static DIR *catia_opendir(vfs_handle_struct *handle,
 	mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
 				name_mapped,
 				NULL,
-				NULL,
+				&smb_fname->st,
 				smb_fname->flags);
 	if (mapped_smb_fname == NULL) {
 		TALLOC_FREE(mapped_smb_fname);
@@ -722,7 +722,7 @@ static int catia_chown(vfs_handle_struct *handle,
 	catia_smb_fname = synthetic_smb_fname(talloc_tos(),
 					name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (catia_smb_fname == NULL) {
 		TALLOC_FREE(name);
@@ -760,7 +760,7 @@ static int catia_lchown(vfs_handle_struct *handle,
 	catia_smb_fname = synthetic_smb_fname(talloc_tos(),
 					name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (catia_smb_fname == NULL) {
 		TALLOC_FREE(name);
@@ -797,7 +797,7 @@ static int catia_chmod(vfs_handle_struct *handle,
 	catia_smb_fname = synthetic_smb_fname(talloc_tos(),
 					name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (catia_smb_fname == NULL) {
 		TALLOC_FREE(name);
@@ -832,7 +832,7 @@ static int catia_rmdir(vfs_handle_struct *handle,
 	catia_smb_fname = synthetic_smb_fname(talloc_tos(),
 					name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (catia_smb_fname == NULL) {
 		TALLOC_FREE(name);
@@ -867,7 +867,7 @@ static int catia_mkdir(vfs_handle_struct *handle,
 	catia_smb_fname = synthetic_smb_fname(talloc_tos(),
 					name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (catia_smb_fname == NULL) {
 		TALLOC_FREE(name);
@@ -902,7 +902,7 @@ static int catia_chdir(vfs_handle_struct *handle,
 	catia_smb_fname = synthetic_smb_fname(talloc_tos(),
 					name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (catia_smb_fname == NULL) {
 		TALLOC_FREE(name);
@@ -968,7 +968,7 @@ catia_realpath(vfs_handle_struct *handle,
 	catia_smb_fname = synthetic_smb_fname(talloc_tos(),
 					mapped_name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (catia_smb_fname == NULL) {
 		TALLOC_FREE(mapped_name);
@@ -1001,7 +1001,7 @@ static int catia_chflags(struct vfs_handle_struct *handle,
 	catia_smb_fname = synthetic_smb_fname(talloc_tos(),
 					name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (catia_smb_fname == NULL) {
 		TALLOC_FREE(name);
@@ -1046,7 +1046,7 @@ catia_streaminfo(struct vfs_handle_struct *handle,
 	catia_smb_fname = synthetic_smb_fname(talloc_tos(),
 					mapped_name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (catia_smb_fname == NULL) {
 		TALLOC_FREE(mapped_name);
@@ -1126,7 +1126,7 @@ catia_get_nt_acl(struct vfs_handle_struct *handle,
 	mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
 					mapped_name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (mapped_smb_fname == NULL) {
 		TALLOC_FREE(mapped_name);
@@ -1165,7 +1165,7 @@ catia_sys_acl_get_file(vfs_handle_struct *handle,
 	mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
 					mapped_name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (mapped_smb_fname == NULL) {
 		TALLOC_FREE(mapped_name);
@@ -1210,7 +1210,7 @@ catia_sys_acl_set_file(vfs_handle_struct *handle,
 	mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
 					mapped_name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (mapped_smb_fname == NULL) {
 		TALLOC_FREE(mapped_name);
@@ -1253,7 +1253,7 @@ catia_sys_acl_delete_def_file(vfs_handle_struct *handle,
 	mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
 					mapped_name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (mapped_smb_fname == NULL) {
 		TALLOC_FREE(mapped_name);
@@ -1306,7 +1306,7 @@ catia_getxattr(vfs_handle_struct *handle,
 	mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
 					mapped_name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (mapped_smb_fname == NULL) {
 		TALLOC_FREE(mapped_name);
@@ -1353,7 +1353,7 @@ catia_listxattr(vfs_handle_struct *handle,
 	mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
 					mapped_name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (mapped_smb_fname == NULL) {
 		TALLOC_FREE(mapped_name);
@@ -1406,7 +1406,7 @@ catia_removexattr(vfs_handle_struct *handle,
 	mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
 					mapped_name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (mapped_smb_fname == NULL) {
 		TALLOC_FREE(mapped_name);
@@ -1465,7 +1465,7 @@ catia_setxattr(vfs_handle_struct *handle,
 	mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
 					mapped_name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (mapped_smb_fname == NULL) {
 		TALLOC_FREE(mapped_name);
@@ -2274,7 +2274,7 @@ static NTSTATUS catia_get_compression(vfs_handle_struct *handle,
 		mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
 						mapped_name,
 						NULL,
-						NULL,
+						&smb_fname->st,
 						smb_fname->flags);
 		if (mapped_smb_fname == NULL) {
 			TALLOC_FREE(mapped_name);
@@ -2367,7 +2367,7 @@ static NTSTATUS catia_get_dos_attributes(struct vfs_handle_struct *handle,
 	mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
 					mapped_name,
 					NULL,
-					NULL,
+					&smb_fname->st,
 					smb_fname->flags);
 	if (mapped_smb_fname == NULL) {
 		TALLOC_FREE(mapped_name);
@@ -2401,7 +2401,7 @@ static NTSTATUS catia_set_dos_attributes(struct vfs_handle_struct *handle,
 	mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
 					mapped_name,
 					NULL,
-					NULL,
+					&smb_fname->st,


-- 
Samba Shared Repository



More information about the samba-cvs mailing list