The branch, master has been updated via 632f672 s4-cldap: fixed the CLDAP response for IPv6 clients via 285293c s4-ipv6: fixed a crash in the IPv6 DNS code via a58e69a s4-dns: fixed samba_tool -> samba-tool via 6ea8db1 s4-build: install a build link bin/provision from 78a0195 selftest: Fix 'make quicktest' on systems without LDAP development support
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 632f672b0859cee995788a00ecd464a0a8d5c74a Author: Andrew Tridgell <tri...@samba.org> Date: Tue Jun 7 15:46:17 2011 +1000 s4-cldap: fixed the CLDAP response for IPv6 clients Autobuild-User: Andrew Tridgell <tri...@samba.org> Autobuild-Date: Tue Jun 7 08:57:48 CEST 2011 on sn-devel-104 commit 285293c8b5d85383aa5af9968dc73fba5beb9de0 Author: Andrew Tridgell <tri...@samba.org> Date: Tue Jun 7 14:10:38 2011 +1000 s4-ipv6: fixed a crash in the IPv6 DNS code commit a58e69a734085f9963b60042be3d9a33a90616a7 Author: Andrew Tridgell <tri...@samba.org> Date: Tue Jun 7 13:46:24 2011 +1000 s4-dns: fixed samba_tool -> samba-tool commit 6ea8db1bd418aa5308a042d59e3288b68312739b Author: Andrew Tridgell <tri...@samba.org> Date: Tue Jun 7 13:15:15 2011 +1000 s4-build: install a build link bin/provision ----------------------------------------------------------------------- Summary of changes: source4/cldap_server/netlogon.c | 14 ++++++++------ source4/libcli/resolve/dns_ex.c | 2 +- source4/scripting/bin/setup_dns.sh | 2 +- source4/setup/wscript_build | 2 ++ 4 files changed, 12 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c index 92f7a4a..77f50ff 100644 --- a/source4/cldap_server/netlogon.c +++ b/source4/cldap_server/netlogon.c @@ -37,6 +37,7 @@ #include "param/param.h" #include "../lib/tsocket/tsocket.h" #include "libds/common/flag_mapping.h" +#include "lib/util/util_net.h" /* fill in the cldap netlogon union for a given version @@ -292,16 +293,17 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx, src_address, NULL); NT_STATUS_HAVE_NO_MEMORY(client_site); load_interface_list(mem_ctx, lp_ctx, &ifaces); - /* - * TODO: the caller should pass the address which the client - * used to trigger this call, as the client is able to reach - * this ip. - */ + if (src_address) { pdc_ip = iface_list_best_ip(ifaces, src_address); } else { pdc_ip = iface_list_first_v4(ifaces); } + if (pdc_ip == NULL || !is_ipaddress_v4(pdc_ip)) { + /* this matches windows behaviour */ + pdc_ip = "127.0.0.1"; + } + ZERO_STRUCTP(netlogon); /* check if either of these bits is present */ @@ -325,7 +327,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx, netlogon->data.nt5_ex.server_site = server_site; netlogon->data.nt5_ex.client_site = client_site; if (version & NETLOGON_NT_VERSION_5EX_WITH_IP) { - /* Clearly this needs to be fixed up for IPv6 */ + /* note that this is always a IPV4 address */ extra_flags = NETLOGON_NT_VERSION_5EX_WITH_IP; netlogon->data.nt5_ex.sockaddr.sockaddr_family = 2; netlogon->data.nt5_ex.sockaddr.pdc_ip = pdc_ip; diff --git a/source4/libcli/resolve/dns_ex.c b/source4/libcli/resolve/dns_ex.c index cb2d2c3..1d56a4b 100644 --- a/source4/libcli/resolve/dns_ex.c +++ b/source4/libcli/resolve/dns_ex.c @@ -267,7 +267,7 @@ static void run_child_dns_lookup(struct dns_ex_state *state, int fd) port = state->port; } - switch (rr->type) { + switch (addrs_rr[i]->type) { case rk_ns_t_a: if (inet_ntop(AF_INET, addrs_rr[i]->u.a, addrstr, sizeof(addrstr)) == NULL) { diff --git a/source4/scripting/bin/setup_dns.sh b/source4/scripting/bin/setup_dns.sh index 646ee81..bc2ae96 100755 --- a/source4/scripting/bin/setup_dns.sh +++ b/source4/scripting/bin/setup_dns.sh @@ -13,7 +13,7 @@ IP="$3" RSUFFIX=$(echo $DOMAIN | sed s/[\.]/,DC=/g) [ -z "$PRIVATEDIR" ] && { - PRIVATEDIR=$(bin/samba_tool testparm --section-name=global --parameter-name='private dir' --suppress-prompt 2> /dev/null) + PRIVATEDIR=$(bin/samba-tool testparm --section-name=global --parameter-name='private dir' --suppress-prompt 2> /dev/null) } OBJECTGUID=$(bin/ldbsearch -s base -H "$PRIVATEDIR/sam.ldb" -b "CN=NTDS Settings,CN=$HOSTNAME,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=$RSUFFIX" objectguid|grep ^objectGUID| cut -d: -f2) diff --git a/source4/setup/wscript_build b/source4/setup/wscript_build index 241e8b8..65cbfc9 100644 --- a/source4/setup/wscript_build +++ b/source4/setup/wscript_build @@ -7,6 +7,8 @@ bld.INSTALL_WILDCARD('${SETUPDIR}', 'display-specifiers/*.txt') bld.INSTALL_FILES('${SBINDIR}', 'provision', chmod=MODE_755, python_fixup=True) +bld.SAMBA_SCRIPT('provision', pattern='provision', installdir='.') + bld.INSTALL_FILES('${SETUPDIR}', 'dns_update_list') bld.INSTALL_FILES('${SETUPDIR}', 'spn_update_list') -- Samba Shared Repository