summaryrefslogtreecommitdiffstats
path: root/source3/libads
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-12-21 15:47:35 +0100
committerGünther Deschner <gd@samba.org>2011-12-21 17:23:25 +0100
commitbfbb3893325b0a0a47d49c3a1ad83f047f42e361 (patch)
tree3c62c8c67e853d88ca90ffac06e5684f0c8d8e69 /source3/libads
parent53d54f99b0ddf7fff6ba9bbe5dfcd1adeada90f9 (diff)
downloadsamba-bfbb3893325b0a0a47d49c3a1ad83f047f42e361.tar.gz
samba-bfbb3893325b0a0a47d49c3a1ad83f047f42e361.tar.xz
samba-bfbb3893325b0a0a47d49c3a1ad83f047f42e361.zip
s3-dns: prevent from potentially doing wrong SRV DNS lookups.
With an empty sitename we asked for e.g. _ldap._tcp.._sites.dc._msdcs.AD.EXAMPLE.COM Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Dec 21 17:23:25 CET 2011 on sn-devel-104
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/dns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/libads/dns.c b/source3/libads/dns.c
index 5eae10ec28..39454fcebc 100644
--- a/source3/libads/dns.c
+++ b/source3/libads/dns.c
@@ -756,7 +756,7 @@ static NTSTATUS ads_dns_query_internal(TALLOC_CTX *ctx,
int *numdcs )
{
char *name;
- if (sitename) {
+ if (sitename && strlen(sitename)) {
name = talloc_asprintf(ctx, "%s._tcp.%s._sites.%s._msdcs.%s",
servicename, sitename,
dc_pdc_gc_domains, realm);