summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2012-05-04 16:47:27 -0400
committerAlexander Bokovoy <ab@samba.org>2012-05-23 17:51:48 +0300
commit34a65739d32d7e895e71b2b81298fab82dfd11fe (patch)
tree594e04611fffa3851edb0deeafeee98bf430fe8f
parentcc3321c9ffee9e1688af724b7286fe548ff28793 (diff)
downloadsamba-34a65739d32d7e895e71b2b81298fab82dfd11fe.tar.gz
samba-34a65739d32d7e895e71b2b81298fab82dfd11fe.tar.bz2
samba-34a65739d32d7e895e71b2b81298fab82dfd11fe.zip
Move source3/libads/dns.c to lib/addns
-rw-r--r--lib/addns/dnsquery.c (renamed from source3/libads/dns.c)12
-rw-r--r--lib/addns/dnsquery.h (renamed from source3/libads/dns.h)0
-rwxr-xr-x[-rw-r--r--]lib/addns/wscript_build5
-rwxr-xr-x[-rw-r--r--]libcli/dns/wscript_build4
-rwxr-xr-x[-rw-r--r--]libcli/nbt/wscript_build4
-rw-r--r--source3/Makefile.in2
-rw-r--r--source3/libads/ldap.c2
-rw-r--r--source3/libsmb/dsgetdcname.c2
-rw-r--r--source3/libsmb/namequery.c2
-rw-r--r--source3/utils/net_ads.c2
-rw-r--r--source3/utils/net_lookup.c2
-rwxr-xr-xsource3/wscript_build5
12 files changed, 27 insertions, 15 deletions
diff --git a/source3/libads/dns.c b/lib/addns/dnsquery.c
index 6f846fa780..f680d63258 100644
--- a/source3/libads/dns.c
+++ b/lib/addns/dnsquery.c
@@ -19,7 +19,9 @@
*/
#include "includes.h"
-#include "libads/dns.h"
+#include "lib/util/util_net.h"
+#include "lib/util/tsort.h"
+#include "dnsquery.h"
/* AIX resolv.h uses 'class' in struct ns_rr */
@@ -207,8 +209,8 @@ static bool ads_dns_parse_rr_srv( TALLOC_CTX *ctx, uint8_t *start, uint8_t *end,
srv->hostname = talloc_strdup( ctx, dcname );
- DEBUG(10,("ads_dns_parse_rr_srv: Parsed %s [%u, %u, %u]\n",
- srv->hostname,
+ DEBUG(10,("ads_dns_parse_rr_srv: Parsed %s [%u, %u, %u]\n",
+ srv->hostname,
srv->priority,
srv->weight,
srv->port));
@@ -758,10 +760,10 @@ static NTSTATUS ads_dns_query_internal(TALLOC_CTX *ctx,
name = talloc_asprintf(ctx, "%s._tcp.%s._sites.%s._msdcs.%s",
servicename, sitename,
dc_pdc_gc_domains, realm);
- } else {
+ } else {
name = talloc_asprintf(ctx, "%s._tcp.%s._msdcs.%s",
servicename, dc_pdc_gc_domains, realm);
- }
+ }
if (!name) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source3/libads/dns.h b/lib/addns/dnsquery.h
index a3ea47a04e..a3ea47a04e 100644
--- a/source3/libads/dns.h
+++ b/lib/addns/dnsquery.h
diff --git a/lib/addns/wscript_build b/lib/addns/wscript_build
index 69a4716245..a7010531a0 100644..100755
--- a/lib/addns/wscript_build
+++ b/lib/addns/wscript_build
@@ -5,3 +5,8 @@ bld.SAMBA_LIBRARY('addns',
public_deps='talloc krb5 k5crypto com_err gssapi gssapi_krb5 uuid',
private_library=True,
vars=locals())
+
+bld.SAMBA_SUBSYSTEM('DNSQUERY',
+ source='dnsquery.c',
+ deps='samba-util lmhosts resolv'
+ )
diff --git a/libcli/dns/wscript_build b/libcli/dns/wscript_build
index 2e445da141..fab872712f 100644..100755
--- a/libcli/dns/wscript_build
+++ b/libcli/dns/wscript_build
@@ -3,3 +3,7 @@
bld.SAMBA_SUBSYSTEM('LIBCLI_DNS',
source='dns.c',
deps='LIBTSOCKET tevent-util')
+
+bld.SAMBA_SUBSYSTEM('DNS_HOSTS_FILE',
+ source='dns_hosts_file.c',
+ deps='samba-util errors')
diff --git a/libcli/nbt/wscript_build b/libcli/nbt/wscript_build
index a70db083e6..55867bae91 100644..100755
--- a/libcli/nbt/wscript_build
+++ b/libcli/nbt/wscript_build
@@ -7,8 +7,8 @@ bld.SAMBA_SUBSYSTEM('NDR_NBT_BUF',
)
bld.SAMBA_SUBSYSTEM('lmhosts',
- source='lmhosts.c ../dns/dns_hosts_file.c',
- deps='replace talloc'
+ source='lmhosts.c',
+ deps='DNS_HOSTS_FILE replace talloc'
)
bld.SAMBA_LIBRARY('cli-nbt',
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 1eb8cd8bf3..31382db542 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -544,7 +544,7 @@ LIBNBT_OBJ = ../libcli/nbt/nbtname.o \
LIBNMB_OBJ = libsmb/unexpected.o libsmb/namecache.o libsmb/nmblib.o \
libsmb/namequery.o ../libcli/nbt/lmhosts.o ../libcli/dns/dns_hosts_file.o libsmb/conncache.o \
- libads/dns.o libads/sitename_cache.o
+ ../lib/addds/dnsquery.o libads/sitename_cache.o
NTERR_OBJ = ../libcli/util/nterr.o libsmb/smberr.o
DOSERR_OBJ = ../libcli/util/doserr.o
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 23b655f401..f3987c99c1 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -25,7 +25,7 @@
#include "ads.h"
#include "libads/sitename_cache.h"
#include "libads/cldap.h"
-#include "libads/dns.h"
+#include "../lib/addns/dnsquery.h"
#include "../libds/common/flags.h"
#include "smbldap.h"
#include "../libcli/security/security.h"
diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c
index 7b4b68195a..02f4bc928d 100644
--- a/source3/libsmb/dsgetdcname.c
+++ b/source3/libsmb/dsgetdcname.c
@@ -24,7 +24,7 @@
#include "libads/sitename_cache.h"
#include "../librpc/gen_ndr/ndr_netlogon.h"
#include "libads/cldap.h"
-#include "libads/dns.h"
+#include "../lib/addns/dnsquery.h"
#include "libsmb/clidgram.h"
/* 15 minutes */
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 417464c17e..3eae347068 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -21,7 +21,7 @@
#include "includes.h"
#include "../lib/util/tevent_ntstatus.h"
#include "libads/sitename_cache.h"
-#include "libads/dns.h"
+#include "../lib/addns/dnsquery.h"
#include "../libcli/netlogon/netlogon.h"
#include "lib/async_req/async_sock.h"
#include "libsmb/nmblib.h"
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 22f235f059..de00a1e3bb 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -28,7 +28,7 @@
#include "nsswitch/libwbclient/wbclient.h"
#include "ads.h"
#include "libads/cldap.h"
-#include "libads/dns.h"
+#include "../lib/addns/dnsquery.h"
#include "../libds/common/flags.h"
#include "librpc/gen_ndr/libnet_join.h"
#include "libnet/libnet_join.h"
diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c
index 7f204745b1..b0d6fe51f0 100644
--- a/source3/utils/net_lookup.c
+++ b/source3/utils/net_lookup.c
@@ -19,7 +19,7 @@
#include "includes.h"
#include "utils/net.h"
#include "libads/sitename_cache.h"
-#include "libads/dns.h"
+#include "../lib/addns/dnsquery.h"
#include "../librpc/gen_ndr/ndr_netlogon.h"
#include "smb_krb5.h"
#include "../libcli/security/security.h"
diff --git a/source3/wscript_build b/source3/wscript_build
index 4deb556d23..2f474a871a 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -113,7 +113,8 @@ SECRETS_SRC = '''passdb/secrets.c passdb/machine_account_secrets.c
LIBNMB_SRC = '''libsmb/unexpected.c libsmb/namecache.c libsmb/nmblib.c
libsmb/namequery.c libsmb/conncache.c
- libads/dns.c libads/sitename_cache.c'''
+
+ libads/sitename_cache.c'''
LIBNTLMSSP_SRC = '''
libsmb/ntlmssp.c
@@ -1006,7 +1007,7 @@ bld.SAMBA3_SUBSYSTEM('LIBEVENTLOG',
bld.SAMBA3_SUBSYSTEM('LIBNMB',
source=LIBNMB_SRC,
- deps='lmhosts resolv',
+ deps='DNSQUERY lmhosts resolv',
vars=locals())
bld.SAMBA3_SUBSYSTEM('SERVICES',