summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2011-06-23 02:35:50 +0400
committerMatthieu Patou <mat@samba.org>2011-06-23 01:50:39 +0200
commit4f7f1430268f0ab5447fe189da6435bdd8e0614e (patch)
tree46a676cd6e20d11a74a596adc5008a1683742735 /source4/smb_server
parenta9e45923369e3171cb7f42284f52ce3c4c8b0a4b (diff)
downloadsamba-4f7f1430268f0ab5447fe189da6435bdd8e0614e.tar.gz
samba-4f7f1430268f0ab5447fe189da6435bdd8e0614e.tar.bz2
samba-4f7f1430268f0ab5447fe189da6435bdd8e0614e.zip
dfsreferral: search client's site and use it
Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Thu Jun 23 01:50:39 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/smb/trans2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/smb_server/smb/trans2.c b/source4/smb_server/smb/trans2.c
index b3aa690e85..72babd533b 100644
--- a/source4/smb_server/smb/trans2.c
+++ b/source4/smb_server/smb/trans2.c
@@ -1107,7 +1107,7 @@ static NTSTATUS get_dcs(TALLOC_CTX *ctx, struct ldb_context *ldb,
}
talloc_free(r);
- if (searched_site != NULL) {
+ if (searched_site != NULL && searched_site[0] != '\0') {
ret = ldb_search(ldb, subctx, &r, configdn, LDB_SCOPE_SUBTREE,
attrs_none, "(&(name=%s)(objectClass=site))", searched_site);
if (ret != LDB_SUCCESS) {
@@ -1461,7 +1461,7 @@ static NTSTATUS dodc_or_sysvol_referral(TALLOC_CTX *ctx,
client_addr = tsocket_address_inet_addr_string(remote_address, context);
NT_STATUS_HAVE_NO_MEMORY_AND_FREE(client_addr, context);
}
-
+ site_name = samdb_client_site_name(ldb, context, client_addr, NULL);
status = get_dcs(context, ldb, site_name, need_fqdn, &set, 0);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(3,("Unable to get list of DCs\n"));