Commit 4b7167e9 authored by Brian Wellington's avatar Brian Wellington
Browse files

312. [bug] Increase the number of allowed elements in the

                        resolv.conf search path from 6 to 8.  If there
                        are more than this, ignore the remainder rather
                        than returning a failure in lwres_conf_parse.
parent a4b496f2
312. [bug] Increase the number of allowed elements in the
resolv.conf search path from 6 to 8. If there
are more than this, ignore the remainder rather
than returning a failure in lwres_conf_parse.
311. [bug] lwres_conf_parse failed when the first line of
resolv.conf was empty or a comment.
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: lwres.h,v 1.39 2000/07/06 20:05:13 bwelling Exp $ */
/* $Id: lwres.h,v 1.40 2000/07/07 18:24:11 bwelling Exp $ */
#ifndef LWRES_LWRES_H
#define LWRES_LWRES_H 1
......@@ -194,7 +194,7 @@ typedef struct {
*/
#define LWRES_CONFMAXNAMESERVERS 3 /* max 3 "nameserver" entries */
#define LWRES_CONFMAXSEARCH 6 /* max 6 domains in "search" entry */
#define LWRES_CONFMAXSEARCH 8 /* max 8 domains in "search" entry */
#define LWRES_CONFMAXLINELEN 256 /* max size of a line */
#define LWRES_CONFMAXSORTLIST 10
typedef struct {
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: lwconfig.c,v 1.19 2000/07/07 18:16:46 bwelling Exp $ */
/* $Id: lwconfig.c,v 1.20 2000/07/07 18:24:10 bwelling Exp $ */
/***
*** Module for parsing resolv.conf files.
......@@ -382,7 +382,7 @@ lwres_conf_parsesearch(lwres_context_t *ctx, FILE *fp) {
idx = 0;
while (strlen(word) > 0) {
if (confdata->searchnxt == LWRES_CONFMAXSEARCH)
return (LWRES_R_FAILURE); /* Too many domains. */
goto ignore; /* Too many domains. */
confdata->search[idx] = lwres_strdup(ctx, word);
if (confdata->search[idx] == NULL)
......@@ -390,6 +390,7 @@ lwres_conf_parsesearch(lwres_context_t *ctx, FILE *fp) {
idx++;
confdata->searchnxt++;
ignore:
if (delim == EOF || delim == '\n')
break;
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment