From: Mark Andrews Date: Wed, 3 Mar 2004 05:39:05 +0000 (+0000) Subject: 1544. [bug] Named would logged a single entry to a file despite it X-Git-Tag: v9.4.0~78 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=7052e191ce63fdf063a977695718ff426a27628e;p=thirdparty%2Fbind9.git 1544. [bug] Named would logged a single entry to a file despite it being over the specified size limit. 1543. [bug] Logging using "versions unlimited" did not work. --- diff --git a/CHANGES b/CHANGES index 0648229a7f6..e2fdf21d307 100644 --- a/CHANGES +++ b/CHANGES @@ -118,9 +118,10 @@ bind to the specified transfer source and TSIG was being used. [RT #10120] -1544. [placeholder] rt10147 - -1543. [placeholder] rt10147 +1544. [bug] Named would logged a single entry to a file despite it + being over the specified size limit. + +1543. [bug] Logging using "versions unlimited" did not work. 1542. [placeholder] diff --git a/bin/named/logconf.c b/bin/named/logconf.c index e2de9d2d2d8..b38caf910d8 100644 --- a/bin/named/logconf.c +++ b/bin/named/logconf.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: logconf.c,v 1.33 2001/10/11 01:16:15 gson Exp $ */ +/* $Id: logconf.c,v 1.34 2004/03/03 05:39:04 marka Exp $ */ #include @@ -140,6 +140,9 @@ channel_fromconf(cfg_obj_t *channel, isc_logconfig_t *lctx) { if (versionsobj != NULL && cfg_obj_isuint32(versionsobj)) versions = cfg_obj_asuint32(versionsobj); + if (versionsobj != NULL && cfg_obj_isstring(versionsobj) && + strcasecmp(cfg_obj_asstring(versionsobj), "unlimited") == 0) + versions = ISC_LOG_ROLLINFINITE; if (sizeobj != NULL && cfg_obj_isuint64(sizeobj) && cfg_obj_asuint64(sizeobj) < ISC_OFFSET_MAXIMUM) diff --git a/lib/isc/include/isc/result.h b/lib/isc/include/isc/result.h index bc4769a3205..09710eab5fa 100644 --- a/lib/isc/include/isc/result.h +++ b/lib/isc/include/isc/result.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: result.h,v 1.60 2003/01/16 03:59:26 marka Exp $ */ +/* $Id: result.h,v 1.61 2004/03/03 05:39:05 marka Exp $ */ #ifndef ISC_RESULT_H #define ISC_RESULT_H 1 @@ -81,11 +81,12 @@ #define ISC_R_SOFTQUOTA 55 /* soft quota reached */ #define ISC_R_BADNUMBER 56 /* not a valid number */ #define ISC_R_DISABLED 57 /* disabled */ +#define ISC_R_MAXSIZE 58 /* max size */ /* * Not a result code: the number of results. */ -#define ISC_R_NRESULTS 58 +#define ISC_R_NRESULTS 59 ISC_LANG_BEGINDECLS diff --git a/lib/isc/log.c b/lib/isc/log.c index f0aecaa722d..096a04b7523 100644 --- a/lib/isc/log.c +++ b/lib/isc/log.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: log.c,v 1.81 2003/04/11 07:25:28 marka Exp $ */ +/* $Id: log.c,v 1.82 2004/03/03 05:39:04 marka Exp $ */ /* Principal Authors: DCL */ @@ -1328,6 +1328,8 @@ isc_log_open(isc_logchannel_t *channel) { * Version control. */ if (result == ISC_R_SUCCESS && roll) { + if (FILE_VERSIONS(channel) == ISC_LOG_ROLLNEVER) + return (ISC_R_MAXSIZE); result = roll_log(channel); if (result != ISC_R_SUCCESS) { if ((channel->flags & ISC_LOG_OPENERR) == 0) { @@ -1653,6 +1655,7 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category, if (FILE_STREAM(channel) == NULL) { result = isc_log_open(channel); if (result != ISC_R_SUCCESS && + result != ISC_R_MAXSIZE && (channel->flags & ISC_LOG_OPENERR) == 0) { syslog(LOG_ERR, "isc_log_open '%s' failed: %s", diff --git a/lib/isc/result.c b/lib/isc/result.c index 53cf8b39355..aef6942b411 100644 --- a/lib/isc/result.c +++ b/lib/isc/result.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: result.c,v 1.60 2003/01/16 03:59:25 marka Exp $ */ +/* $Id: result.c,v 1.61 2004/03/03 05:39:04 marka Exp $ */ #include @@ -95,7 +95,8 @@ static const char *text[ISC_R_NRESULTS] = { "connection reset", /* 54 */ "soft quota reached", /* 55 */ "not a valid number", /* 56 */ - "disabled" /* 57 */ + "disabled", /* 57 */ + "max size" /* 58 */ }; #define ISC_RESULT_RESULTSET 2