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

Karolin Seeger kseeger at samba.org
Mon Sep 8 02:01:03 MDT 2014


The branch, v4-1-test has been updated
       via  5475d5e s3: smbd: vfs_dirsort module.
       via  f165bb9 s4-rpc: dnsserver: handle updates of tombstoned dnsNode objects
       via  98fb614 s4-rpc: dnsserver: Do not search for deleted DNS entries
       via  132b848 s4:dlz_bind9: let dlz_bind9 use dns_common_lookup() before add/modify
       via  8de4f48 s4:dlz_bind9: let dlz_bind9 use dns_common_lookup() before removing records
       via  f20179b s4:dlz_bind9: let dlz_bind9 use dns_common_replace()
       via  5a3b783 s4:dlz_bind9: let dlz_bind9 use dns_common_extract()
       via  07f72fc s4:dlz_bind9: let dlz_bind9 use dns_common_lookup() for name lookup
       via  4f7d4fd torture-dns: Add test for dlz_bind9 updates
       via  0b9c775 torture-dns: Add test for dlz_bind9 zonedumps
       via  0542349 torture-dns: Add test for dlz_bind9 lookups
       via  f5d39b6 s4:torture:dlz_bind9: fix spnego tests
       via  ce13047 s4:dlz_bind9: do an early talloc_free(el_ctx) in dlz_allnodes()
       via  889e958 s4:dlz_bind9: avoid some compiler warnings
       via  f23aa6f s4:dns_server: handle tombstones in handle_one_update()
       via  0329ef4 s4:dns_server: add DNS_TYPE_TOMBSTONE support to dns_common_replace()
       via  2fbb9b9 s4:dns_server: make sure dns_common_lookup() doesn't return tombstones
       via  31b5192 s4:dns_server: use .wType = DNS_TYPE_TOMBSTONE instead of ZERO_STRUCT()
       via  ec0df9f s4:dns_server: split out dns_common_replace()
       via  256349dd s4:dns_server: remove const from dns_replace_records()
       via  f3df058 s4:dns_server: split out dns_common_extract() and dns_common_lookup()
       via  f3e6b38 s4:dns_server: split out a private 'dnsserver_common' library
       via  d3abd55 s4:dns_server: map LDB_ERR_NO_SUCH_OBJECT to WERR_DNS_ERROR_NAME_DOES_NOT_EXIST
       via  e6adf09 s4:dns_server: handle WERR_DNS_ERROR_NAME_DOES_NOT_EXIST in werr_to_dns_err()
       via  eb0e0b1 provision: Correctly provision the SOA record minimum TTL
       via  748e78e s4-rpc: dnsserver: return DNS_RANK_NS_GLUE recors when explicitly asked for
       via  c371cad s4-rpc: dnsserver: Do not return NS_GLUE records with VIEW_GLUE_DATA filter
       via  019c587 s4-rpc: dnsserver: Correctly set rank for glue NS records
       via  5fdc841 s4:setup/dns_update_list: make use of the new substitution variables
       via  d3947ea s4:samba_dnsupdate: provide more substitution variables e.g. IF_RODC
       via  78cad21 s4:samba_dnsupdate: don't try to be smart when verifying NS records
       via  0301b53 s4:samba_dnsupdate: cache the already registered records
       via  f8b7027 s4:samba_dnsupdate: fix dnsobj.__str__()
       via  40bac8e s4:samba_dnsupdate: don't lower case the registered names
       via  a444402 python/join: use lowercase for the dnshostname.
       via  0eaca4c selftest/Samba3: also bind to ipv6
       via  2759e97 selftest/Samba4: also bind to ipv6
       via  b62a179 selftest: export _IPV6 environment variables
       via  534f6aa libcli/dns: ignore NS entries in dns_hosts_file.c at a higher log level for now
       via  1ef078e libcli/dns: add AAAA support to dns_hosts_file.c
      from  391b29a s3: winbindd: On new client connect, prune idle or hung connections older than "winbind request timeout"

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


- Log -----------------------------------------------------------------
commit 5475d5e511744a37346a38438679c2c987d91343
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Sep 3 07:54:51 2014 -0700

    s3: smbd: vfs_dirsort module.
    
    Fix an off-by-one check that would cause seekdir to
    seek off the end of the cached array.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ronnie Sahlberg <ronniesahlberg.gmail.com>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Wed Sep  3 19:59:54 CEST 2014 on sn-devel-104
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10794
    vfs_dirsort has an off-by-one error that can cause uninitialized memory read
    
    Autobuild-User(v4-1-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-1-test): Mon Sep  8 10:00:32 CEST 2014 on sn-devel-104

commit f165bb9b53baa70703f65c6de940a5a152956b1c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 4 07:19:46 2014 +0200

    s4-rpc: dnsserver: handle updates of tombstoned dnsNode objects
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 2c342e488dcd3cef465a1b376bb22bf495f6832b)

commit 98fb614c50f9ed97ec9bce496cd399cdda92d387
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Thu Jul 31 17:24:52 2014 +1000

    s4-rpc: dnsserver: Do not search for deleted DNS entries
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 6f2862e76608862bb4142a86f36c8506114bf6c7)

commit 132b848f39cf448515ca4fb346b0844052c00e38
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 31 09:30:16 2014 +0200

    s4:dlz_bind9: let dlz_bind9 use dns_common_lookup() before add/modify
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749
    
    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 Aug 27 15:21:19 CEST 2014 on sn-devel-104
    
    (cherry picked from commit d68a2ebecd244181b1238635ee54dadd05835525)

commit 8de4f4837d6954efe62b24ccfdfc37788930849b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 30 20:12:08 2014 +0200

    s4:dlz_bind9: let dlz_bind9 use dns_common_lookup() before removing records
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 11bbfd932c113b3222bc93d59702271a3777b6f3)

commit f20179bf51ff320d24017c681801f03020d19586
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 30 18:51:39 2014 +0200

    s4:dlz_bind9: let dlz_bind9 use dns_common_replace()
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749
    
    Change-Id: I2fd2503230cbf89445594e49f39ac321769ff06e
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit fd952bf814835c4860ab10794225fbd583ee3ad5)

commit 5a3b783c292a883995f8c00a9e75c04430c01e21
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 30 17:59:08 2014 +0200

    s4:dlz_bind9: let dlz_bind9 use dns_common_extract()
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749
    
    Change-Id: I7c661964a3da1a1981f022a06b9bef25bbd33479
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit dedcf30fd12821c272002e3b4cbfda4ca38650fd)

commit 07f72fc989969951e219f1ba09812ab562cfbc43
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 30 08:40:32 2014 +0200

    s4:dlz_bind9: let dlz_bind9 use dns_common_lookup() for name lookup
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749
    
    Change-Id: I2632fa0ce120a978f6f400fa5cbf18a7fbbd64a3
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 96dcebe8c20b9aa954a96a4deabe16957576be2c)

commit 4f7d4fd6a216e2cfed42eb0aa727c9a0e5c7b577
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Aug 26 12:04:59 2014 +0200

    torture-dns: Add test for dlz_bind9 updates
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 914a3667471ced3199f51db8bc1d4a6d3fbc4e8f)

commit 0b9c7754cb9397f29cf9c3e9300d3006a589847a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Aug 26 10:34:17 2014 +0200

    torture-dns: Add test for dlz_bind9 zonedumps
    
    Change-Id: I074b3e4cdad1a0b69c085dcaa44d6f48e68e863b
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit e23621e9dab67c8997d24b2ac7e4fd181fc5907c)

commit 054234917c53aaca3670450cb1533991b2165269
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Aug 26 10:24:27 2014 +1200

    torture-dns: Add test for dlz_bind9 lookups
    
    Change-Id: I3b9d1b56e3aa873fb8540b98e196b713b82332ca
    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 2189470c2f55afe29e9e8dad1d2659a7eb2d06f9)

commit f5d39b6e3e4a94572bd0ac8ee8055baa0b694038
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Aug 26 13:48:21 2014 +0200

    s4:torture:dlz_bind9: fix spnego tests
    
    The dlz_bind9 module uses the special dns-${NETBIOSNAME} account,
    and this is only available under the dns/hostname.domain SPN, not
    host/hostname.
    
    Also the dlz_ssumatch() function returns isc_boolean_t instead
    of isc_result_t. As ISC_R_SUCCESS and ISC_FALSE have the same value
    we didn't notice this problem.
    
    Change-Id: I48539c3f48f5dde9eaa2fff6da0f3be2f9f66311
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 76943bf0ac259fb8855bd123fe4bc85a103ba418)

commit ce13047b895d7fd8667489ebba873ab90b359aff
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 30 17:57:13 2014 +0200

    s4:dlz_bind9: do an early talloc_free(el_ctx) in dlz_allnodes()
    
    We don't have to keep everything arround while walking the whole zone.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 5d397c8198bcd2cdccc3deda57377d4696e6abd1)

commit 889e95889f1dc1e4247265a49fb1a2d4b5a4f316
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Feb 27 09:59:51 2014 +0100

    s4:dlz_bind9: avoid some compiler warnings
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit fbebe7e756e4ccd0684e94e9b1e787f98f399ccc)

commit f23aa6faad241de9adc477be6045289ba43c97d7
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 31 09:35:26 2014 +0200

    s4:dns_server: handle tombstones in handle_one_update()
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 491715399ff7e1ab788fec5e254581dc312e2cef)

commit 0329ef4e3e6edc4828a14710f475c462ac492b5f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 31 10:44:41 2014 +0200

    s4:dns_server: add DNS_TYPE_TOMBSTONE support to dns_common_replace()
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749
    
    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>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit bb3ca930cc57964487bd23a74f4caabd1616a8bf)

commit 2fbb9b9ce1b55257c3aad6a43df8f0c08456db2f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 31 08:54:17 2014 +0200

    s4:dns_server: make sure dns_common_lookup() doesn't return tombstones
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit a0a81ab01cb1d509b04f9af25177c8e0941b43aa)

commit 31b5192297135b3a47b411d4c349a944a809c681
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 31 09:32:00 2014 +0200

    s4:dns_server: use .wType = DNS_TYPE_TOMBSTONE instead of ZERO_STRUCT()
    
    The result is the same, but it is clearer.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 3ff025a02cca3ff209668edd419d0e440e9865c6)

commit ec0df9f71e6cf1d7836f87bd27e40cebed04dc24
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 30 18:27:56 2014 +0200

    s4:dns_server: split out dns_common_replace()
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 0689e795e073008d2ad539c0ef5ddbdc6d9efdac)

commit 256349ddfea8f16eaabf92a311ae247abeff5869
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 31 11:32:02 2014 +0200

    s4:dns_server: remove const from dns_replace_records()
    
    All callers are find we the record array gets modified.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 7e7df78bd7ae5575da7443b45c0e2e4167eebde2)

commit f3df058da8f9ddbe01fa13dbad03fa091c94bf01
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 30 08:24:10 2014 +0200

    s4:dns_server: split out dns_common_extract() and dns_common_lookup()
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 342a087349f8a10833338a3fa49fbd4d4d29f3e5)

commit f3e6b38ec9d5c50f6ef1c015bd572a1adf19bd9e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 30 08:01:11 2014 +0200

    s4:dns_server: split out a private 'dnsserver_common' library
    
    This will contain common code for the internal dns server, the dlz_bind9 module
    and the rpc dns management server.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 99d5a5ead4f33723c25e8716a79d34b53822521e)

commit d3abd55d2511fb3353baaed524bef0b3f319243f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 31 08:19:50 2014 +0200

    s4:dns_server: map LDB_ERR_NO_SUCH_OBJECT to WERR_DNS_ERROR_NAME_DOES_NOT_EXIST
    
    This is the correct fix for commit 8b24c43b382740106474e26dec59e1419ba77306
    and Bug: https://bugzilla.samba.org/show_bug.cgi?id=9559
    
    With this change we have a consistent behavior between internal server
    and the bind dlz module. We keep a dangling LDAP object without
    dnsRecord attribute arround forever. This will be fixed in the following
    commits.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit d0f424a23dc915d9fce625438d2bd63519757cba)

commit e6adf09984855717a076604f313185019543681b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 30 17:55:57 2014 +0200

    s4:dns_server: handle WERR_DNS_ERROR_NAME_DOES_NOT_EXIST in werr_to_dns_err()
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10749
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit deb21a9afe77591743fda522355a5a9eb08fb27b)

commit eb0e0b13600f9f26250ee118c04dd347456423d2
Author: Kai Blin <kai at samba.org>
Date:   Fri May 16 18:33:42 2014 +0200

    provision: Correctly provision the SOA record minimum TTL
    
    This fixes bug #10466
    
    Signed-off-by: Kai Blin <kai at samba.org>
    Reviewed-by: Guenter Kukkukk <kukks at samba.org>
    
    Autobuild-User(master): Kai Blin <kai at samba.org>
    Autobuild-Date(master): Wed May 21 10:55:00 CEST 2014 on sn-devel-104
    
    (cherry picked from commit 634f116fbb89d723a627f4501b4cd89342cecb8e)

commit 748e78eb6d64ba48a729e67fedb2614b39d79ff8
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 4 09:40:34 2014 +0200

    s4-rpc: dnsserver: return DNS_RANK_NS_GLUE recors when explicitly asked for
    
    NS records should be included in the query for sub-domains.  NS records
    got dropped when the rank for NS records was correctly set to NS_GLUE
    from ZONE in commit 2036cbd9249c84d9b46370f0e8cd6a0264c737ba.
    
      samba-tool dns query 172.31.9.161 s4xdom.base @ ALL
      =>
      Name=glue, Records=0, Children=0
    
      samba-tool dns query 172.31.9.161 s4xdom.base glue ALL
      =>
        Name=, Records=1, Children=0
          NS: glue.dns.private. (flags=40000082, serial=21, ttl=900)
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10751
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
    Autobuild-Date(master): Thu Sep  4 14:37:51 CEST 2014 on sn-devel-104
    
    (cherry picked from commit 0b4a3b76111411e8969932a3da4ffab989e0da4c)

commit c371cadfa8f0555c8243e4ace7df1c0a58b9d326
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Wed Jul 30 19:57:42 2014 +1000

    s4-rpc: dnsserver: Do not return NS_GLUE records with VIEW_GLUE_DATA filter
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10751
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Thu Aug 21 11:36:55 CEST 2014 on sn-devel-104
    
    (cherry picked from commit c9169a5e987864473108d041513f1781740401ac)

commit 019c587cfc0eb4574a9079cc2ccc6f6cab4cda13
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Wed Jul 30 18:53:44 2014 +1000

    s4-rpc: dnsserver: Correctly set rank for glue NS records
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10751
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 2036cbd9249c84d9b46370f0e8cd6a0264c737ba)

commit 5fdc841c44c190bb3dd5acf5eb7458b855e1d6a2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Apr 28 18:54:13 2014 +0200

    s4:setup/dns_update_list: make use of the new substitution variables
    
    This let us register the same names as Windows Servers.
    
    We only exception are the NS records. In future we could add them
    by using something like this:
    
      samba-tool dns add ${HOSTNAME} ${DNSDOMAIN} @ NS ${HOSTNAME}
      samba-tool dns add ${HOSTNAME} _msdcs.${DNSFOREST} @ NS ${HOSTNAME}
      samba-tool dns add ${HOSTNAME} ${DNSFOREST} _msdcs NS ${HOSTNAME}
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831
    
    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): Tue Aug 26 11:38:54 CEST 2014 on sn-devel-104
    
    (cherry picked from commit 4383ec5b83d12bd19749582217f082cbaa31a128)

commit d3947ea2f80e7bb5745ec7c6f3b9e8cf4d9b9245
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Apr 28 17:33:50 2014 +0200

    s4:samba_dnsupdate: provide more substitution variables e.g. IF_RODC
    
    This will make the dns_update_list more flexible.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit f1544e8d1de995aa304d63352d313ace8fea6ca5)

commit 78cad2177fc99fd2cc113fcd2b3a5bdfefeafb6e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jul 8 00:05:03 2014 +0200

    s4:samba_dnsupdate: don't try to be smart when verifying NS records
    
    We can't rely on the DNS delegation to be correct in the parent domain.
    What we really want is to check if we already have registered ourself
    as a NS record in our own domain.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit b13974048b74c60028d8387eb7fe4fc7734f0a91)

commit 0301b53973278b05296afc5f395d690d39ab232d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Apr 28 08:29:40 2014 +0200

    s4:samba_dnsupdate: cache the already registered records
    
    This way we can delete records which are not used anymore.
    
    E.g. if the ip address changed.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 25ec8e8656f66fe51a0d48718cdcfd8b209f6ca0)

commit f8b7027ff0efc84d918a540ccc87bd3888ee63e1
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Apr 28 08:27:26 2014 +0200

    s4:samba_dnsupdate: fix dnsobj.__str__()
    
    We should not implicitly use the global variable 'd'.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 6e853708def98545eeb6913b8a2dd59d439323e6)

commit 40bac8e421ab5b3ed9c8d3b8270023099ff59304
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Apr 28 17:26:51 2014 +0200

    s4:samba_dnsupdate: don't lower case the registered names
    
    This matches Windows...
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit c5088f338a38850674399ec8fec9f8f146b5880f)

commit a444402fc450cfc11771968f37b29d292d768bc2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Aug 19 10:33:11 2014 +0200

    python/join: use lowercase for the dnshostname.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 5533d9c3db31ac86769288527ec20ad4e57f703c)

commit 0eaca4c611d2fdc5df9d8374981047074d588b62
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jun 19 17:21:16 2014 +0200

    selftest/Samba3: also bind to ipv6
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (similar to commit a9545f3de7aaa0346735191953f78242017bd346)

commit 2759e9713beec51e40ebef351155f08796878169
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jun 19 17:21:16 2014 +0200

    selftest/Samba4: also bind to ipv6
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (similar to commit 5d4b36d1fec981e850d869edd2c98a6541b37114)

commit b62a179a8e2efaf78c7b1b4f261b0ea5c60df2ea
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jun 19 17:21:16 2014 +0200

    selftest: export _IPV6 environment variables
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 0e7abb398dd826c082bbddb333b9faac361be064)

commit 534f6aa249dd711d82a7fae987e07e49bd9f098b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 10 07:25:08 2014 +0200

    libcli/dns: ignore NS entries in dns_hosts_file.c at a higher log level for now
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 3fcc4a545e936c2c0cf3f9f9a19646e1512f74d2)

commit 1ef078ed6bc3e797a8715c663f2f35e813e1b512
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 10 07:25:08 2014 +0200

    libcli/dns: add AAAA support to dns_hosts_file.c
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 7f18a3b58e7146e421653b85f509bb8503bd7402)

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

Summary of changes:
 libcli/dns/dns_hosts_file.c                     |   35 +-
 python/samba/join.py                            |    4 +-
 python/samba/provision/sambadns.py              |    1 +
 python/samba/tests/dns.py                       |    1 +
 selftest/README                                 |    1 +
 selftest/selftest.pl                            |    6 +
 selftest/target/Samba3.pm                       |   15 +-
 selftest/target/Samba4.pm                       |   19 +-
 source3/modules/vfs_dirsort.c                   |    2 +-
 source4/dns_server/dlz_bind9.c                  |  377 ++++-------
 source4/dns_server/dlz_minimal.h                |    2 +-
 source4/dns_server/dns_server.h                 |    6 +-
 source4/dns_server/dns_update.c                 |   78 ++-
 source4/dns_server/dns_utils.c                  |  150 +----
 source4/dns_server/dnsserver_common.c           |  342 +++++++++
 source4/dns_server/dnsserver_common.h           |   50 ++
 source4/dns_server/wscript_build                |   14 +-
 source4/dsdb/dns/dns_update.c                   |   13 +
 source4/rpc_server/dnsserver/dcerpc_dnsserver.c |   18 +-
 source4/rpc_server/dnsserver/dnsdata.c          |   11 +-
 source4/rpc_server/dnsserver/dnsdb.c            |   26 +-
 source4/scripting/bin/samba_dnsupdate           |  213 +++++--
 source4/setup/dns_update_list                   |   82 ++-
 source4/torture/dns/dlz_bind9.c                 |  868 ++++++++++++++++++++++-
 24 files changed, 1792 insertions(+), 542 deletions(-)
 create mode 100644 source4/dns_server/dnsserver_common.c
 create mode 100644 source4/dns_server/dnsserver_common.h


Changeset truncated at 500 lines:

diff --git a/libcli/dns/dns_hosts_file.c b/libcli/dns/dns_hosts_file.c
index 94d1d97..4b1bc53 100644
--- a/libcli/dns/dns_hosts_file.c
+++ b/libcli/dns/dns_hosts_file.c
@@ -88,9 +88,14 @@ static bool getdns_hosts_fileent(TALLOC_CTX *ctx, XFILE *fp, char **pp_name, cha
 
 		if (next_token_talloc(ctx, &ptr, &name_type, NULL))
 			++count;
+		if (count == 0) {
+			continue;
+		}
 		if (next_token_talloc(ctx, &ptr, &name, NULL))
 			++count;
-		if (name_type && strcasecmp(name_type, "A") == 0) {
+		if ((strcasecmp(name_type, "A") == 0) ||
+		    (strcasecmp(name_type, "AAAA") == 0))
+		{
 			if (next_token_talloc(ctx, &ptr, &ip, NULL))
 				++count;
 		} else if (name_type && strcasecmp(name_type, "SRV") == 0) {
@@ -101,13 +106,18 @@ static bool getdns_hosts_fileent(TALLOC_CTX *ctx, XFILE *fp, char **pp_name, cha
 		} else if (name_type && strcasecmp(name_type, "CNAME") == 0) {
 			if (next_token_talloc(ctx, &ptr, &next_name, NULL))
 				++count;
+		} else if (name_type && strcasecmp(name_type, "NS") == 0) {
+			if (next_token_talloc(ctx, &ptr, &next_name, NULL))
+				++count;
 		}
 		if (count <= 0)
 			continue;
 
-		if (strcasecmp(name_type, "A") == 0) {
+		if ((strcasecmp(name_type, "A") == 0) ||
+		    (strcasecmp(name_type, "AAAA") == 0))
+		{
 			if (count != 3) {
-				DEBUG(0,("getdns_hosts_fileent: Ill formed hosts A record [%s]\n",
+				DEBUG(0,("getdns_hosts_fileent: Ill formed hosts A[AAA] record [%s]\n",
 					 line));
 				continue;
 			}
@@ -148,6 +158,15 @@ static bool getdns_hosts_fileent(TALLOC_CTX *ctx, XFILE *fp, char **pp_name, cha
 			if (!*pp_next_name) {
 				return false;
 			}
+		} else if (strcasecmp(name_type, "NS") == 0) {
+			if (count != 3) {
+				DEBUG(0,("getdns_hosts_fileent: Ill formed hosts NS record [%s]\n",
+					 line));
+				continue;
+			}
+			DEBUG(4, ("getdns_hosts_fileent: NS entry: %s %s %s\n",
+				  name_type, name, next_name));
+			continue;
 		} else {
 			DEBUG(0,("getdns_hosts_fileent: unknown type %s\n", name_type));
 			continue;
@@ -215,7 +234,7 @@ static NTSTATUS resolve_dns_hosts_file_as_dns_rr_recurse(const char *dns_hosts_f
 
 	DEBUG(3,("resolve_dns_hosts: (%d) "
 		 "Attempting %s dns_hosts lookup for name %s\n",
-		 level, srv_lookup ? "SRV" : "A", name));
+		 level, srv_lookup ? "SRV" : "A[AAA]", name));
 
 	fp = startdns_hosts_file(dns_hosts_file);
 
@@ -278,7 +297,9 @@ static NTSTATUS resolve_dns_hosts_file_as_dns_rr_recurse(const char *dns_hosts_f
 									  mem_ctx, return_rr, return_count);
 			talloc_free(ip_list_ctx);
 			return status;
-		} else if (strcasecmp(name_type, "A") == 0) {
+		} else if ((strcasecmp(name_type, "A") == 0) ||
+			   (strcasecmp(name_type, "AAAA") == 0))
+		{
 			if (*return_count == 0) {
 				/* We are happy to keep looking for other possible A record matches */
 				rr = talloc_zero(ip_list_ctx,
@@ -405,11 +426,11 @@ NTSTATUS resolve_dns_hosts_file_as_dns_rr(const char *dns_hosts_file,
 	if (NT_STATUS_IS_OK(status)) {
 		DEBUG(3,("resolve_dns_hosts (dns_rr): "
 			 "Found %d %s result records for for name %s\n",
-			 *return_count, srv_lookup ? "SRV" : "A", name));
+			 *return_count, srv_lookup ? "SRV" : "A[AAA]", name));
 	} else {
 		DEBUG(3,("resolve_dns_hosts (dns_rr): "
 			 "failed to obtain %s result records for for name %s: %s\n",
-			 srv_lookup ? "SRV" : "A", name, nt_errstr(status)));
+			 srv_lookup ? "SRV" : "A[AAA]", name, nt_errstr(status)));
 	}
 	return status;
 }
diff --git a/python/samba/join.py b/python/samba/join.py
index 7d2f913..ee973a1 100644
--- a/python/samba/join.py
+++ b/python/samba/join.py
@@ -133,7 +133,7 @@ class dc_join(object):
             else:
                 ctx.dns_backend = dns_backend
 
-        ctx.dnshostname = "%s.%s" % (ctx.myname, ctx.dnsdomain)
+        ctx.dnshostname = "%s.%s" % (ctx.myname.lower(), ctx.dnsdomain)
 
         ctx.realm = ctx.dnsdomain
 
@@ -1198,7 +1198,7 @@ def join_subdomain(server=None, creds=None, lp=None, site=None,
     ctx.base_dn = samba.dn_from_dns_name(dnsdomain)
     ctx.domsid = str(security.random_sid())
     ctx.acct_dn = None
-    ctx.dnshostname = "%s.%s" % (ctx.myname, ctx.dnsdomain)
+    ctx.dnshostname = "%s.%s" % (ctx.myname.lower(), ctx.dnsdomain)
     ctx.trustdom_pass = samba.generate_random_password(128, 128)
 
     ctx.userAccountControl = samba.dsdb.UF_SERVER_TRUST_ACCOUNT | samba.dsdb.UF_TRUSTED_FOR_DELEGATION
diff --git a/python/samba/provision/sambadns.py b/python/samba/provision/sambadns.py
index 53f1082..ce4a46a 100644
--- a/python/samba/provision/sambadns.py
+++ b/python/samba/provision/sambadns.py
@@ -125,6 +125,7 @@ class SOARecord(dnsp.DnssrvRpcRecord):
         soa.expire = expire
         soa.mname = mname
         soa.rname = rname
+        soa.minimum = minimum
         self.data = soa
 
 
diff --git a/python/samba/tests/dns.py b/python/samba/tests/dns.py
index 79e4158..2983de3 100644
--- a/python/samba/tests/dns.py
+++ b/python/samba/tests/dns.py
@@ -289,6 +289,7 @@ class TestSimpleQueries(DNSTest):
         self.assert_dns_rcode_equals(response, dns.DNS_RCODE_OK)
         self.assert_dns_opcode_equals(response, dns.DNS_OPCODE_QUERY)
         self.assertEquals(response.ancount, 1)
+        self.assertEquals(response.answers[0].rdata.minimum, 3600)
 
 
 class TestDNSUpdates(DNSTest):
diff --git a/selftest/README b/selftest/README
index c23d730..d9ad020 100644
--- a/selftest/README
+++ b/selftest/README
@@ -89,6 +89,7 @@ The environments are currently available include
      * REALM: Realm name
      * SERVER: DC host name 
      * SERVER_IP: DC IPv4 address
+     * SERVER_IPV6: DC IPv6 address
      * NETBIOSNAME: DC NetBIOS name
      * NETIOSALIAS: DC NetBIOS alias
 
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index 2b1e3ce..25e0f93 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -663,35 +663,41 @@ my @exported_envvars = (
 	# domain controller stuff
 	"DC_SERVER",
 	"DC_SERVER_IP",
+	"DC_SERVER_IPV6",
 	"DC_NETBIOSNAME",
 	"DC_NETBIOSALIAS",
 
 	# domain member
 	"MEMBER_SERVER",
 	"MEMBER_SERVER_IP",
+	"MEMBER_SERVER_IPV6",
 	"MEMBER_NETBIOSNAME",
 	"MEMBER_NETBIOSALIAS",
 
 	# rpc proxy controller stuff
 	"RPC_PROXY_SERVER",
 	"RPC_PROXY_SERVER_IP",
+	"RPC_PROXY_SERVER_IPV6",
 	"RPC_PROXY_NETBIOSNAME",
 	"RPC_PROXY_NETBIOSALIAS",
 
 	# domain controller stuff for Vampired DC
 	"VAMPIRE_DC_SERVER",
 	"VAMPIRE_DC_SERVER_IP",
+	"VAMPIRE_DC_SERVER_IPV6",
 	"VAMPIRE_DC_NETBIOSNAME",
 	"VAMPIRE_DC_NETBIOSALIAS",
 
 	"PROMOTED_DC_SERVER",
 	"PROMOTED_DC_SERVER_IP",
+	"PROMOTED_DC_SERVER_IPV6",
 	"PROMOTED_DC_NETBIOSNAME",
 	"PROMOTED_DC_NETBIOSALIAS",
 
 	# server stuff
 	"SERVER",
 	"SERVER_IP",
+	"SERVER_IPV6",
 	"NETBIOSNAME",
 	"NETBIOSALIAS",
 
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index bc07403..ba01154 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -207,6 +207,7 @@ sub setup_s3dc($$)
 
 	$vars->{DC_SERVER} = $vars->{SERVER};
 	$vars->{DC_SERVER_IP} = $vars->{SERVER_IP};
+	$vars->{DC_SERVER_IPV6} = $vars->{SERVER_IPV6};
 	$vars->{DC_NETBIOSNAME} = $vars->{NETBIOSNAME};
 	$vars->{DC_USERNAME} = $vars->{USERNAME};
 	$vars->{DC_PASSWORD} = $vars->{PASSWORD};
@@ -250,6 +251,7 @@ sub setup_member($$$)
 
 	$ret->{DC_SERVER} = $s3dcvars->{SERVER};
 	$ret->{DC_SERVER_IP} = $s3dcvars->{SERVER_IP};
+	$ret->{DC_SERVER_IPV6} = $s3dcvars->{SERVER_IPV6};
 	$ret->{DC_NETBIOSNAME} = $s3dcvars->{NETBIOSNAME};
 	$ret->{DC_USERNAME} = $s3dcvars->{USERNAME};
 	$ret->{DC_PASSWORD} = $s3dcvars->{PASSWORD};
@@ -321,6 +323,7 @@ sub setup_admember($$$$)
 
 	$ret->{DC_SERVER} = $dcvars->{SERVER};
 	$ret->{DC_SERVER_IP} = $dcvars->{SERVER_IP};
+	$ret->{DC_SERVER_IPV6} = $dcvars->{SERVER_IPV6};
 	$ret->{DC_NETBIOSNAME} = $dcvars->{NETBIOSNAME};
 	$ret->{DC_USERNAME} = $dcvars->{USERNAME};
 	$ret->{DC_PASSWORD} = $dcvars->{PASSWORD};
@@ -400,6 +403,7 @@ sub setup_admember_rfc2307($$$$)
 
 	$ret->{DC_SERVER} = $dcvars->{SERVER};
 	$ret->{DC_SERVER_IP} = $dcvars->{SERVER_IP};
+	$ret->{DC_SERVER_IPV6} = $dcvars->{SERVER_IPV6};
 	$ret->{DC_NETBIOSNAME} = $dcvars->{NETBIOSNAME};
 	$ret->{DC_USERNAME} = $dcvars->{USERNAME};
 	$ret->{DC_PASSWORD} = $dcvars->{PASSWORD};
@@ -770,6 +774,7 @@ sub provision($$$$$$)
 	my $swiface = Samba::get_interface($server);
 	my %ret = ();
 	my $server_ip = "127.0.0.$swiface";
+	my $server_ipv6 = sprintf("fd00:0000:0000:0000:0000:0000:5357:5f%02x", $swiface);
 	my $domain = "SAMBA-TEST";
 
 	my $unix_name = ($ENV{USER} or $ENV{LOGNAME} or `PATH=/usr/ucb:$ENV{PATH} whoami`);
@@ -872,7 +877,7 @@ sub provision($$$$$$)
 	close(MSDFS_TARGET);
 	chmod 0666, $msdfs_target;
 	symlink "msdfs:$server_ip\\ro-tmp", "$msdfs_shrdir/msdfs-src1";
-	symlink "msdfs:$server_ip\\ro-tmp", "$msdfs_shrdir/deeppath/msdfs-src2";
+	symlink "msdfs:$server_ipv6\\ro-tmp", "$msdfs_shrdir/deeppath/msdfs-src2";
 
 	my $conffile="$libdir/server.conf";
 
@@ -925,7 +930,7 @@ sub provision($$$$$$)
 	print CONF "
 [global]
 	netbios name = $server
-	interfaces = $server_ip/8
+	interfaces = $server_ip/8 $server_ipv6/64
 	bind interfaces only = yes
 	panic action = $self->{srcdir}/selftest/gdb_backtrace %d %\$(MAKE_TEST_BINARY)
 	smbd:suicide mode = yes
@@ -1176,14 +1181,16 @@ domadmins:X:$gid_domadmins:
 	print "DONE\n";
 
 	open(DNS_UPDATE_LIST, ">$prefix/dns_update_list") or die("Unable to open $$prefix/dns_update_list");
-	print DNS_UPDATE_LIST "A $server. $server_ip";
+	print DNS_UPDATE_LIST "A $server. $server_ip\n";
+	print DNS_UPDATE_LIST "AAAA $server. $server_ipv6\n";
 	close(DNS_UPDATE_LIST);
 
-        if (system("$ENV{SRCDIR_ABS}/source4/scripting/bin/samba_dnsupdate --all-interfaces --use-file=$dns_host_file -s $conffile --update-list=$prefix/dns_update_list --no-substiutions --no-credentials") != 0) {
+        if (system("$ENV{SRCDIR_ABS}/source4/scripting/bin/samba_dnsupdate --all-interfaces --use-file=$dns_host_file -s $conffile --update-list=$prefix/dns_update_list --update-cache=$prefix/dns_update_cache --no-substiutions --no-credentials") != 0) {
                 die "Unable to update hostname into $dns_host_file";
         }
 
 	$ret{SERVER_IP} = $server_ip;
+	$ret{SERVER_IPV6} = $server_ipv6;
 	$ret{NMBD_TEST_LOG} = "$prefix/nmbd_test.log";
 	$ret{NMBD_TEST_LOG_POS} = 0;
 	$ret{WINBINDD_TEST_LOG} = "$prefix/winbindd_test.log";
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 8a3f51d..ac2fdd9 100644
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -516,7 +516,8 @@ sub provision_raw_prepare($$$$$$$$$$)
 	$ctx->{tlsdir} = "$ctx->{privatedir}/tls";
 
 	$ctx->{ipv4} = "127.0.0.$swiface";
-	$ctx->{interfaces} = "$ctx->{ipv4}/8";
+	$ctx->{ipv6} = sprintf("fd00:0000:0000:0000:0000:0000:5357:5f%02x", $swiface);
+	$ctx->{interfaces} = "$ctx->{ipv4}/8 $ctx->{ipv6}/64";
 
 	push(@{$ctx->{directories}}, $ctx->{privatedir});
 	push(@{$ctx->{directories}}, $ctx->{etcdir});
@@ -691,6 +692,7 @@ nogroup:x:65534:nobody
 		PIDDIR => $ctx->{piddir},
 		SERVER => $ctx->{hostname},
 		SERVER_IP => $ctx->{ipv4},
+		SERVER_IPV6 => $ctx->{ipv6},
 		NETBIOSNAME => $ctx->{netbiosname},
 		DOMAIN => $ctx->{domain},
 		USERNAME => $ctx->{username},
@@ -914,12 +916,14 @@ sub provision_member($$$)
 
 	$ret->{MEMBER_SERVER} = $ret->{SERVER};
 	$ret->{MEMBER_SERVER_IP} = $ret->{SERVER_IP};
+	$ret->{MEMBER_SERVER_IPV6} = $ret->{SERVER_IPV6};
 	$ret->{MEMBER_NETBIOSNAME} = $ret->{NETBIOSNAME};
 	$ret->{MEMBER_USERNAME} = $ret->{USERNAME};
 	$ret->{MEMBER_PASSWORD} = $ret->{PASSWORD};
 
 	$ret->{DC_SERVER} = $dcvars->{DC_SERVER};
 	$ret->{DC_SERVER_IP} = $dcvars->{DC_SERVER_IP};
+	$ret->{DC_SERVER_IPV6} = $dcvars->{DC_SERVER_IPV6};
 	$ret->{DC_NETBIOSNAME} = $dcvars->{DC_NETBIOSNAME};
 	$ret->{DC_USERNAME} = $dcvars->{DC_USERNAME};
 	$ret->{DC_PASSWORD} = $dcvars->{DC_PASSWORD};
@@ -1006,12 +1010,14 @@ sub provision_rpc_proxy($$$)
 
 	$ret->{RPC_PROXY_SERVER} = $ret->{SERVER};
 	$ret->{RPC_PROXY_SERVER_IP} = $ret->{SERVER_IP};
+	$ret->{RPC_PROXY_SERVER_IPV6} = $ret->{SERVER_IPV6};
 	$ret->{RPC_PROXY_NETBIOSNAME} = $ret->{NETBIOSNAME};
 	$ret->{RPC_PROXY_USERNAME} = $ret->{USERNAME};
 	$ret->{RPC_PROXY_PASSWORD} = $ret->{PASSWORD};
 
 	$ret->{DC_SERVER} = $dcvars->{DC_SERVER};
 	$ret->{DC_SERVER_IP} = $dcvars->{DC_SERVER_IP};
+	$ret->{DC_SERVER_IPV6} = $dcvars->{DC_SERVER_IPV6};
 	$ret->{DC_NETBIOSNAME} = $dcvars->{DC_NETBIOSNAME};
 	$ret->{DC_USERNAME} = $dcvars->{DC_USERNAME};
 	$ret->{DC_PASSWORD} = $dcvars->{DC_PASSWORD};
@@ -1082,10 +1088,12 @@ sub provision_promoted_dc($$$)
 
 	$ret->{PROMOTED_DC_SERVER} = $ret->{SERVER};
 	$ret->{PROMOTED_DC_SERVER_IP} = $ret->{SERVER_IP};
+	$ret->{PROMOTED_DC_SERVER_IPV6} = $ret->{SERVER_IPV6};
 	$ret->{PROMOTED_DC_NETBIOSNAME} = $ret->{NETBIOSNAME};
 
 	$ret->{DC_SERVER} = $dcvars->{DC_SERVER};
 	$ret->{DC_SERVER_IP} = $dcvars->{DC_SERVER_IP};
+	$ret->{DC_SERVER_IPV6} = $dcvars->{DC_SERVER_IPV6};
 	$ret->{DC_NETBIOSNAME} = $dcvars->{DC_NETBIOSNAME};
 	$ret->{DC_USERNAME} = $dcvars->{DC_USERNAME};
 	$ret->{DC_PASSWORD} = $dcvars->{DC_PASSWORD};
@@ -1143,10 +1151,12 @@ sub provision_vampire_dc($$$)
 
 	$ret->{VAMPIRE_DC_SERVER} = $ret->{SERVER};
 	$ret->{VAMPIRE_DC_SERVER_IP} = $ret->{SERVER_IP};
+	$ret->{VAMPIRE_DC_SERVER_IPV6} = $ret->{SERVER_IPV6};
 	$ret->{VAMPIRE_DC_NETBIOSNAME} = $ret->{NETBIOSNAME};
 
 	$ret->{DC_SERVER} = $dcvars->{DC_SERVER};
 	$ret->{DC_SERVER_IP} = $dcvars->{DC_SERVER_IP};
+	$ret->{DC_SERVER_IPV6} = $dcvars->{DC_SERVER_IPV6};
 	$ret->{DC_NETBIOSNAME} = $dcvars->{DC_NETBIOSNAME};
 	$ret->{DC_USERNAME} = $dcvars->{DC_USERNAME};
 	$ret->{DC_PASSWORD} = $dcvars->{DC_PASSWORD};
@@ -1208,10 +1218,12 @@ sub provision_subdom_dc($$$)
 
 	$ret->{SUBDOM_DC_SERVER} = $ret->{SERVER};
 	$ret->{SUBDOM_DC_SERVER_IP} = $ret->{SERVER_IP};
+	$ret->{SUBDOM_DC_SERVER_IPV6} = $ret->{SERVER_IPV6};
 	$ret->{SUBDOM_DC_NETBIOSNAME} = $ret->{NETBIOSNAME};
 
 	$ret->{DC_SERVER} = $dcvars->{DC_SERVER};
 	$ret->{DC_SERVER_IP} = $dcvars->{DC_SERVER_IP};
+	$ret->{DC_SERVER_IPV6} = $dcvars->{DC_SERVER_IPV6};
 	$ret->{DC_NETBIOSNAME} = $dcvars->{DC_NETBIOSNAME};
 	$ret->{DC_USERNAME} = $dcvars->{DC_USERNAME};
 	$ret->{DC_PASSWORD} = $dcvars->{DC_PASSWORD};
@@ -1242,6 +1254,7 @@ sub provision_dc($$)
 	$ret->{NETBIOSALIAS} = "localdc1-a";
 	$ret->{DC_SERVER} = $ret->{SERVER};
 	$ret->{DC_SERVER_IP} = $ret->{SERVER_IP};
+	$ret->{DC_SERVER_IPV6} = $ret->{SERVER_IPV6};
 	$ret->{DC_NETBIOSNAME} = $ret->{NETBIOSNAME};
 	$ret->{DC_USERNAME} = $ret->{USERNAME};
 	$ret->{DC_PASSWORD} = $ret->{PASSWORD};
@@ -1385,10 +1398,12 @@ sub provision_rodc($$$)
 
 	$ret->{RODC_DC_SERVER} = $ret->{SERVER};
 	$ret->{RODC_DC_SERVER_IP} = $ret->{SERVER_IP};
+	$ret->{RODC_DC_SERVER_IPV6} = $ret->{SERVER_IPV6};
 	$ret->{RODC_DC_NETBIOSNAME} = $ret->{NETBIOSNAME};
 
 	$ret->{DC_SERVER} = $dcvars->{DC_SERVER};
 	$ret->{DC_SERVER_IP} = $dcvars->{DC_SERVER_IP};
+	$ret->{DC_SERVER_IPV6} = $dcvars->{DC_SERVER_IPV6};
 	$ret->{DC_NETBIOSNAME} = $dcvars->{DC_NETBIOSNAME};
 	$ret->{DC_USERNAME} = $dcvars->{DC_USERNAME};
 	$ret->{DC_PASSWORD} = $dcvars->{DC_PASSWORD};
@@ -1503,6 +1518,7 @@ sub provision_plugin_s4_dc($$)
 
 	$ret->{DC_SERVER} = $ret->{SERVER};
 	$ret->{DC_SERVER_IP} = $ret->{SERVER_IP};
+	$ret->{DC_SERVER_IPV6} = $ret->{SERVER_IPV6};
 	$ret->{DC_NETBIOSNAME} = $ret->{NETBIOSNAME};
 	$ret->{DC_USERNAME} = $ret->{USERNAME};
 	$ret->{DC_PASSWORD} = $ret->{PASSWORD};
@@ -1542,6 +1558,7 @@ sub provision_chgdcpass($$)
 	    
 	$ret->{DC_SERVER} = $ret->{SERVER};
 	$ret->{DC_SERVER_IP} = $ret->{SERVER_IP};
+	$ret->{DC_SERVER_IPV6} = $ret->{SERVER_IPV6};
 	$ret->{DC_NETBIOSNAME} = $ret->{NETBIOSNAME};
 	$ret->{DC_USERNAME} = $ret->{USERNAME};
 	$ret->{DC_PASSWORD} = $ret->{PASSWORD};
diff --git a/source3/modules/vfs_dirsort.c b/source3/modules/vfs_dirsort.c
index 98109c2..d6b3394 100644
--- a/source3/modules/vfs_dirsort.c
+++ b/source3/modules/vfs_dirsort.c
@@ -256,7 +256,7 @@ static void dirsort_seekdir(vfs_handle_struct *handle, DIR *dirp,
 	if (data == NULL) {
 		return;
 	}
-	if (offset > data->number_of_entries) {
+	if (offset >= data->number_of_entries) {
 		return;
 	}
 	data->pos = offset;
diff --git a/source4/dns_server/dlz_bind9.c b/source4/dns_server/dlz_bind9.c
index c0ed8e1..38b765a 100644
--- a/source4/dns_server/dlz_bind9.c
+++ b/source4/dns_server/dlz_bind9.c
@@ -37,7 +37,7 @@
 #include "messaging/messaging.h"
 #include "lib/cmdline/popt_common.h"
 #include "dlz_minimal.h"
-
+#include "dns_server/dnsserver_common.h"
 
 struct b9_options {
 	const char *url;
@@ -459,7 +459,7 @@ static isc_result_t b9_putnamedrr(struct dlz_bind9_data *state,
    parse options
  */
 static isc_result_t parse_options(struct dlz_bind9_data *state,
-				  unsigned int argc, char *argv[],
+				  unsigned int argc, const char **argv,
 				  struct b9_options *options)
 {
 	int opt;
@@ -470,7 +470,7 @@ static isc_result_t parse_options(struct dlz_bind9_data *state,
 		{ NULL }
 	};
 
-	pc = poptGetContext("dlz_bind9", argc, (const char **)argv, long_options,
+	pc = poptGetContext("dlz_bind9", argc, argv, long_options,
 			POPT_CONTEXT_KEEP_FIRST);
 	while ((opt = poptGetNextOpt(pc)) != -1) {
 		switch (opt) {
@@ -564,7 +564,7 @@ static int dlz_state_debug_unregister(struct dlz_bind9_data *state)
   called to initialise the driver
  */
 _PUBLIC_ isc_result_t dlz_create(const char *dlzname,
-				 unsigned int argc, char *argv[],
+				 unsigned int argc, const char **argv,
 				 void **dbdata, ...)
 {
 	struct dlz_bind9_data *state;
@@ -801,11 +801,10 @@ static isc_result_t dlz_lookup_types(struct dlz_bind9_data *state,
 				     const char **types)
 {
 	TALLOC_CTX *tmp_ctx = talloc_new(state);
-	const char *attrs[] = { "dnsRecord", NULL };
-	int ret = LDB_SUCCESS, i;
-	struct ldb_result *res;
-	struct ldb_message_element *el;
 	struct ldb_dn *dn;
+	WERROR werr = WERR_DNS_ERROR_NAME_DOES_NOT_EXIST;
+	struct dnsp_DnssrvRpcRecord *records = NULL;
+	uint16_t num_records = 0, i;
 
 	for (i=0; zone_prefixes[i]; i++) {
 		dn = ldb_dn_copy(tmp_ctx, ldb_get_default_basedn(state->samdb));
@@ -819,38 +818,21 @@ static isc_result_t dlz_lookup_types(struct dlz_bind9_data *state,
 			return ISC_R_NOMEMORY;
 		}
 
-		ret = ldb_search(state->samdb, tmp_ctx, &res, dn, LDB_SCOPE_BASE,
-				 attrs, "objectClass=dnsNode");
-		if (ret == LDB_SUCCESS) {
+		werr = dns_common_lookup(state->samdb, tmp_ctx, dn,
+					 &records, &num_records, NULL);
+		if (W_ERROR_IS_OK(werr)) {
 			break;
 		}
 	}
-	if (ret != LDB_SUCCESS || res->count == 0) {
-		talloc_free(tmp_ctx);
-		return ISC_R_NOTFOUND;
-	}
-
-	el = ldb_msg_find_element(res->msgs[0], "dnsRecord");
-	if (el == NULL || el->num_values == 0) {
+	if (!W_ERROR_IS_OK(werr)) {
 		talloc_free(tmp_ctx);
 		return ISC_R_NOTFOUND;
 	}
 
-	for (i=0; i<el->num_values; i++) {
-		struct dnsp_DnssrvRpcRecord rec;
-		enum ndr_err_code ndr_err;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list