]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/samba/samba-3.5.12-dns.patch
Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next-suricata
[ipfire-2.x.git] / src / patches / samba / samba-3.5.12-dns.patch
CommitLineData
1d13e637
AF
1From 1b0421a1a3d2b2e0168c0957864c16adf93e326d Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org>
3Date: Wed, 21 Dec 2011 15:47:35 +0100
4Subject: [PATCH] s3-dns: prevent from potentially doing wrong SRV DNS
5 lookups.
6
7With an empty sitename we asked for e.g.
8_ldap._tcp.._sites.dc._msdcs.AD.EXAMPLE.COM
9
10Guenther
11---
12 source3/libads/dns.c | 2 +-
13 1 files changed, 1 insertions(+), 1 deletions(-)
14
15Index: samba-3.6.6/source3/libads/dns.c
16===================================================================
17--- samba-3.6.6.orig/source3/libads/dns.c
18+++ samba-3.6.6/source3/libads/dns.c
19@@ -741,7 +741,7 @@ static NTSTATUS ads_dns_query_internal(T
20 int *numdcs )
21 {
22 char *name;
23- if (sitename) {
24+ if (sitename && strlen(sitename)) {
25 name = talloc_asprintf(ctx, "%s._tcp.%s._sites.%s._msdcs.%s",
26 servicename, sitename,
27 dc_pdc_gc_domains, realm);