Commit 96ed6242 authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

923. [bug] Multiline TSIG secrets (and other multiline strings)

                        were not accepted in named.conf. [RT #1469]
parent ad493ef9
923. [bug] Multiline TSIG secrets (and other multiline strings)
were not accepted in named.conf. [RT #1469]
922. [func] Added two new lwres_getrrsetbyname() result codes,
ERR_NONAME and ERR_NODATA.
921. [bug] lwres returned an incorrect error code if it received
a truncated message.
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lex.h,v 1.25 2001/01/09 21:57:04 bwelling Exp $ */
/* $Id: lex.h,v 1.26 2001/07/06 20:34:11 gson Exp $ */
#ifndef ISC_LEX_H
#define ISC_LEX_H 1
......@@ -87,7 +87,7 @@ ISC_LANG_BEGINDECLS
#define ISC_LEXOPT_CNUMBER 0x80 /* Regognise octal and hex */
#define ISC_LEXOPT_ESCAPE 0x100 /* Recognize escapes. */
#define ISC_LEXOPT_QSTRINGMULTILINE 0x200 /* Allow multiline "" strings */
/*
* Various commenting styles, which may be changed at any time with
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lex.c,v 1.64 2001/07/04 00:34:44 bwelling Exp $ */
/* $Id: lex.c,v 1.65 2001/07/06 20:34:09 gson Exp $ */
#include <config.h>
......@@ -721,7 +721,8 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
done = ISC_TRUE;
}
} else {
if (c == '\n' && !escaped) {
if (c == '\n' && !escaped &&
(options & ISC_LEXOPT_QSTRINGMULTILINE) == 0) {
pushback(source, c);
return (ISC_R_UNBALANCEDQUOTES);
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: parser.c,v 1.61 2001/07/03 17:12:19 gson Exp $ */
/* $Id: parser.c,v 1.62 2001/07/06 20:34:12 gson Exp $ */
#include <config.h>
......@@ -40,6 +40,8 @@
#define CAT CFG_LOGCATEGORY_CONFIG
#define MOD CFG_LOGMODULE_PARSER
#define QSTRING (ISC_LEXOPT_QSTRING | ISC_LEXOPT_QSTRINGMULTILINE)
/*
* Pass one of these flags to parser_error() to include the
* token text in log message.
......@@ -1767,7 +1769,7 @@ parse_qstring(cfg_parser_t *pctx, cfg_type_t *type, cfg_obj_t **ret) {
isc_result_t result;
UNUSED(type);
CHECK(cfg_gettoken(pctx, ISC_LEXOPT_QSTRING));
CHECK(cfg_gettoken(pctx, QSTRING));
if (pctx->token.type != isc_tokentype_qstring) {
parser_error(pctx, LOG_NEAR, "expected quoted string");
return (ISC_R_UNEXPECTEDTOKEN);
......@@ -2570,7 +2572,7 @@ parse_token(cfg_parser_t *pctx, cfg_type_t *type, cfg_obj_t **ret) {
UNUSED(type);
CHECK(create_cfgobj(pctx, &cfg_type_token, &obj));
CHECK(cfg_gettoken(pctx, ISC_LEXOPT_QSTRING));
CHECK(cfg_gettoken(pctx, QSTRING));
if (pctx->token.type == isc_tokentype_eof) {
cfg_ungettoken(pctx);
result = ISC_R_EOF;
......@@ -3014,7 +3016,7 @@ parse_addrmatchelt(cfg_parser_t *pctx, cfg_type_t *type, cfg_obj_t **ret) {
isc_result_t result;
UNUSED(type);
CHECK(cfg_peektoken(pctx, ISC_LEXOPT_QSTRING));
CHECK(cfg_peektoken(pctx, QSTRING));
if (pctx->token.type == isc_tokentype_string ||
pctx->token.type == isc_tokentype_qstring) {
......@@ -3230,7 +3232,7 @@ parse_optional_facility(cfg_parser_t *pctx, cfg_type_t *type, cfg_obj_t **ret)
isc_result_t result;
UNUSED(type);
CHECK(cfg_peektoken(pctx, ISC_LEXOPT_QSTRING));
CHECK(cfg_peektoken(pctx, QSTRING));
if (pctx->token.type == isc_tokentype_string ||
pctx->token.type == isc_tokentype_qstring) {
CHECK(parse(pctx, &cfg_type_astring, ret));
......@@ -3549,7 +3551,7 @@ static isc_result_t
cfg_getstringtoken(cfg_parser_t *pctx) {
isc_result_t result;
result = cfg_gettoken(pctx, ISC_LEXOPT_QSTRING);
result = cfg_gettoken(pctx, QSTRING);
if (result != ISC_R_SUCCESS)
return (result);
......
Supports Markdown
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