mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
313. [bug] When parsing resolv.conf, don't terminate on an
error. Instead, parse as much as possible, but still return an error if one was found.
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -1,3 +1,7 @@
|
|||||||
|
313. [bug] When parsing resolv.conf, don't terminate on an
|
||||||
|
error. Instead, parse as much as possible, but
|
||||||
|
still return an error if one was found.
|
||||||
|
|
||||||
312. [bug] Increase the number of allowed elements in the
|
312. [bug] Increase the number of allowed elements in the
|
||||||
resolv.conf search path from 6 to 8. If there
|
resolv.conf search path from 6 to 8. If there
|
||||||
are more than this, ignore the remainder rather
|
are more than this, ignore the remainder rather
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: lwres.h,v 1.40 2000/07/07 18:24:11 bwelling Exp $ */
|
/* $Id: lwres.h,v 1.41 2000/07/07 18:58:45 bwelling Exp $ */
|
||||||
|
|
||||||
#ifndef LWRES_LWRES_H
|
#ifndef LWRES_LWRES_H
|
||||||
#define LWRES_LWRES_H 1
|
#define LWRES_LWRES_H 1
|
||||||
@@ -423,7 +423,8 @@ lwres_conf_parse(lwres_context_t *ctx, const char *filename);
|
|||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* LWRES_R_SUCCESS on a successful parse.
|
* LWRES_R_SUCCESS on a successful parse.
|
||||||
* Anything else on error.
|
* Anything else on error, although the structure may be partially filled
|
||||||
|
* in.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
lwres_result_t
|
lwres_result_t
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: lwconfig.c,v 1.21 2000/07/07 18:28:58 bwelling Exp $ */
|
/* $Id: lwconfig.c,v 1.22 2000/07/07 18:58:46 bwelling Exp $ */
|
||||||
|
|
||||||
/***
|
/***
|
||||||
*** Module for parsing resolv.conf files.
|
*** Module for parsing resolv.conf files.
|
||||||
@@ -517,7 +517,7 @@ lwres_result_t
|
|||||||
lwres_conf_parse(lwres_context_t *ctx, const char *filename) {
|
lwres_conf_parse(lwres_context_t *ctx, const char *filename) {
|
||||||
FILE *fp = NULL;
|
FILE *fp = NULL;
|
||||||
char word[256];
|
char word[256];
|
||||||
lwres_result_t rval;
|
lwres_result_t rval, ret;
|
||||||
lwres_conf_t *confdata;
|
lwres_conf_t *confdata;
|
||||||
int stopchar;
|
int stopchar;
|
||||||
|
|
||||||
@@ -532,6 +532,7 @@ lwres_conf_parse(lwres_context_t *ctx, const char *filename) {
|
|||||||
if ((fp = fopen(filename, "r")) == NULL)
|
if ((fp = fopen(filename, "r")) == NULL)
|
||||||
return (LWRES_R_FAILURE);
|
return (LWRES_R_FAILURE);
|
||||||
|
|
||||||
|
ret = LWRES_R_SUCCESS;
|
||||||
do {
|
do {
|
||||||
stopchar = getword(fp, word, sizeof(word));
|
stopchar = getword(fp, word, sizeof(word));
|
||||||
if (stopchar == EOF) {
|
if (stopchar == EOF) {
|
||||||
@@ -559,11 +560,13 @@ lwres_conf_parse(lwres_context_t *ctx, const char *filename) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (rval == LWRES_R_SUCCESS);
|
if (ret == LWRES_R_SUCCESS && rval != LWRES_R_SUCCESS)
|
||||||
|
ret = rval;
|
||||||
|
} while (1);
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
return (rval);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
lwres_result_t
|
lwres_result_t
|
||||||
|
Reference in New Issue
Block a user