From af086da4ec19de83717820de85d8e672850ed4b2 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 5 May 2006 19:24:48 +0000 Subject: r15462: replace the use of OpenLDAP's ldap_domain2hostlist() for locating AD DC's with out own DNS SRV queries. Testing on Linux and Solaris. (This used to be commit cf71f88a3cdcabf99c0798ef4cf8c978397a57eb) --- source3/include/ads_dns.h | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 source3/include/ads_dns.h (limited to 'source3/include/ads_dns.h') diff --git a/source3/include/ads_dns.h b/source3/include/ads_dns.h new file mode 100644 index 0000000000..9b65db0c8e --- /dev/null +++ b/source3/include/ads_dns.h @@ -0,0 +1,54 @@ +/* + * Unix SMB/CIFS implementation. + * Internal DNS query structures + * Copyright (C) Gerald Carter 2006. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef _ADS_DNS_H +#define _ADS_DNS_H + +/* DNS query section in replies */ + +struct dns_query { + const char *hostname; + uint16 type; + uint16 in_class; +}; + +/* DNS RR record in reply */ + +struct dns_rr { + const char *hostname; + uint16 type; + uint16 in_class; + uint32 ttl; + uint16 rdatalen; + uint8 *rdata; +}; + +/* SRV records */ + +struct dns_rr_srv { + const char *hostname; + uint16 priority; + uint16 weight; + uint16 port; + struct in_addr ip; +}; + + +#endif /* _ADS_DNS_H */ -- cgit From f3550d82a76840d23be9fe2fa6739a81d426bf5f Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 19 Jul 2006 20:53:10 +0000 Subject: r17146: Starting to cleanout my local tree some * add code to lookup NS records (in prep for later coe that does DNS updates as part of the net ads join) (This used to be commit 36d4970646638a2719ebb05a091c951183535987) --- source3/include/ads_dns.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/include/ads_dns.h') diff --git a/source3/include/ads_dns.h b/source3/include/ads_dns.h index 9b65db0c8e..74762a9242 100644 --- a/source3/include/ads_dns.h +++ b/source3/include/ads_dns.h @@ -50,5 +50,12 @@ struct dns_rr_srv { struct in_addr ip; }; +/* SRV records */ + +struct dns_rr_ns { + const char *hostname; + struct in_addr ip; +}; + #endif /* _ADS_DNS_H */ -- cgit From 8cac7c139908eff0124a4a6f9d25f3b3fe10a254 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 24 Aug 2006 12:13:57 +0000 Subject: r17795: Finally track down the "ads_connect: Interrupted system call" error. Fix our DNS SRV lookup code to deal with multi-homed hosts. We were noly remembering one IP address per host from the Additional records section in the SRV response which could have been an unreachable address. (This used to be commit 899179d2b9fba13cc6f4dab6efc3c22e44e062bc) --- source3/include/ads_dns.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/include/ads_dns.h') diff --git a/source3/include/ads_dns.h b/source3/include/ads_dns.h index 74762a9242..6c3430e21b 100644 --- a/source3/include/ads_dns.h +++ b/source3/include/ads_dns.h @@ -47,10 +47,11 @@ struct dns_rr_srv { uint16 priority; uint16 weight; uint16 port; - struct in_addr ip; + size_t num_ips; + struct in_addr *ips; /* support multi-homed hosts */ }; -/* SRV records */ +/* NS records */ struct dns_rr_ns { const char *hostname; -- cgit From d824b98f80ba186030cbb70b3a1e5daf80469ecd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 9 Jul 2007 19:25:36 +0000 Subject: r23779: Change from v2 or later to v3 or later. Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3) --- source3/include/ads_dns.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include/ads_dns.h') diff --git a/source3/include/ads_dns.h b/source3/include/ads_dns.h index 6c3430e21b..68bbbbca7e 100644 --- a/source3/include/ads_dns.h +++ b/source3/include/ads_dns.h @@ -5,7 +5,7 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, -- cgit From 153cfb9c83534b09f15cc16205d7adb19b394928 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 05:23:25 +0000 Subject: r23801: The FSF has moved around a lot. This fixes their Mass Ave address. (This used to be commit 87c91e4362c51819032bfbebbb273c52e203b227) --- source3/include/ads_dns.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/include/ads_dns.h') diff --git a/source3/include/ads_dns.h b/source3/include/ads_dns.h index 68bbbbca7e..a9515f3199 100644 --- a/source3/include/ads_dns.h +++ b/source3/include/ads_dns.h @@ -14,8 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program; if not, see . */ #ifndef _ADS_DNS_H -- cgit From e2d0526c9799a75f87bbbe24f2e5a268df89fea9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 29 Oct 2007 13:34:00 -0700 Subject: Change our DNS code to cope with AAAA records. A6 records look like a nightmare to use, so ignore them for now. Jeremy. (This used to be commit 814daded90781dc5a5bdd522ea8cfe5d47e6d7a7) --- source3/include/ads_dns.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/include/ads_dns.h') diff --git a/source3/include/ads_dns.h b/source3/include/ads_dns.h index a9515f3199..24805f85a3 100644 --- a/source3/include/ads_dns.h +++ b/source3/include/ads_dns.h @@ -36,7 +36,7 @@ struct dns_rr { uint16 in_class; uint32 ttl; uint16 rdatalen; - uint8 *rdata; + uint8 *rdata; }; /* SRV records */ @@ -47,14 +47,14 @@ struct dns_rr_srv { uint16 weight; uint16 port; size_t num_ips; - struct in_addr *ips; /* support multi-homed hosts */ + struct sockaddr_storage *ss_s; /* support multi-homed hosts */ }; /* NS records */ struct dns_rr_ns { const char *hostname; - struct in_addr ip; + struct sockaddr_storage ss; }; -- cgit