mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +00:00
685. [bug] nslookup should always use the search list/domain
options from resolv.conf, and it (and host) should use the search list items first. [RT #405, #630]
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -1,3 +1,7 @@
|
|||||||
|
685. [bug] nslookup should always use the search list/domain
|
||||||
|
options from resolv.conf, and it (and host) should use
|
||||||
|
the search list items first. [RT #405, #630]
|
||||||
|
|
||||||
684. [bug] memory leak with view forwarders. [RT #656]
|
684. [bug] memory leak with view forwarders. [RT #656]
|
||||||
|
|
||||||
683. [bug] file leak in isc_lex_openfile().
|
683. [bug] file leak in isc_lex_openfile().
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: dighost.c,v 1.182 2001/01/09 21:39:15 bwelling Exp $ */
|
/* $Id: dighost.c,v 1.183 2001/01/16 23:15:54 bwelling Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Notice to programmers: Do not use this code as an example of how to
|
* Notice to programmers: Do not use this code as an example of how to
|
||||||
@@ -596,7 +596,7 @@ setup_system(void) {
|
|||||||
FILE *fp;
|
FILE *fp;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
dig_server_t *srv;
|
dig_server_t *srv;
|
||||||
dig_searchlist_t *search;
|
dig_searchlist_t *search, *domain = NULL;
|
||||||
isc_boolean_t get_servers;
|
isc_boolean_t get_servers;
|
||||||
char *input;
|
char *input;
|
||||||
|
|
||||||
@@ -662,23 +662,19 @@ setup_system(void) {
|
|||||||
have_domain = ISC_TRUE;
|
have_domain = ISC_TRUE;
|
||||||
while ((ptr = next_token(&input, " \t\r\n"))
|
while ((ptr = next_token(&input, " \t\r\n"))
|
||||||
!= NULL) {
|
!= NULL) {
|
||||||
search = isc_mem_allocate(
|
domain = isc_mem_allocate(
|
||||||
mctx, sizeof(*search));
|
mctx, sizeof(*domain));
|
||||||
if (search == NULL)
|
if (domain == NULL)
|
||||||
fatal("Memory "
|
fatal("Memory "
|
||||||
"allocation "
|
"allocation "
|
||||||
"failure in %s:"
|
"failure in %s:"
|
||||||
"%d", __FILE__,
|
"%d", __FILE__,
|
||||||
__LINE__);
|
__LINE__);
|
||||||
strncpy(search->
|
strncpy(domain->
|
||||||
origin,
|
origin,
|
||||||
ptr,
|
ptr,
|
||||||
MXNAME - 1);
|
MXNAME - 1);
|
||||||
search->origin[MXNAME-1] = 0;
|
domain->origin[MXNAME-1] = 0;
|
||||||
ISC_LIST_INITANDPREPEND
|
|
||||||
(search_list,
|
|
||||||
search,
|
|
||||||
link);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -686,6 +682,8 @@ setup_system(void) {
|
|||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (domain != NULL)
|
||||||
|
ISC_LIST_INITANDAPPEND(search_list, domain, link);
|
||||||
if (ndots == -1)
|
if (ndots == -1)
|
||||||
ndots = 1;
|
ndots = 1;
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: nslookup.c,v 1.74 2001/01/16 19:13:10 gson Exp $ */
|
/* $Id: nslookup.c,v 1.75 2001/01/16 23:15:55 bwelling Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -784,6 +784,7 @@ static void
|
|||||||
parse_args(int argc, char **argv) {
|
parse_args(int argc, char **argv) {
|
||||||
isc_boolean_t have_lookup = ISC_FALSE;
|
isc_boolean_t have_lookup = ISC_FALSE;
|
||||||
|
|
||||||
|
usesearch = ISC_TRUE;
|
||||||
for (argc--, argv++; argc > 0; argc--, argv++) {
|
for (argc--, argv++; argc > 0; argc--, argv++) {
|
||||||
debug("main parsing %s", argv[0]);
|
debug("main parsing %s", argv[0]);
|
||||||
if (argv[0][0] == '-') {
|
if (argv[0][0] == '-') {
|
||||||
|
Reference in New Issue
Block a user