diff options
Diffstat (limited to 'source3/libads')
-rw-r--r-- | source3/libads/dns.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/libads/dns.c b/source3/libads/dns.c index 113e63710b..152003941b 100644 --- a/source3/libads/dns.c +++ b/source3/libads/dns.c @@ -401,11 +401,19 @@ static NTSTATUS ads_dns_lookup_srv( TALLOC_CTX *ctx, int rrnum; int idx = 0; NTSTATUS status; + const char *dns_hosts_file; if ( !ctx || !name || !dclist ) { return NT_STATUS_INVALID_PARAMETER; } + dns_hosts_file = lp_parm_const_string(-1, "resolv", "host file", NULL); + if (dns_hosts_file) { + return resolve_dns_hosts_file_as_dns_rr(dns_hosts_file, + name, true, ctx, + dclist, numdcs); + } + /* Send the request. May have to loop several times in case of large replies */ @@ -590,11 +598,18 @@ NTSTATUS ads_dns_lookup_ns(TALLOC_CTX *ctx, int rrnum; int idx = 0; NTSTATUS status; + const char *dns_hosts_file; if ( !ctx || !dnsdomain || !nslist ) { return NT_STATUS_INVALID_PARAMETER; } + dns_hosts_file = lp_parm_const_string(-1, "resolv", "host file", NULL); + if (dns_hosts_file) { + DEBUG(1, ("NO 'NS' lookup available when using resolv:host file")); + return NT_STATUS_OBJECT_NAME_NOT_FOUND; + } + /* Send the request. May have to loop several times in case of large replies */ |