]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1544. [bug] Named would logged a single entry to a file despite it
authorMark Andrews <marka@isc.org>
Wed, 3 Mar 2004 05:39:05 +0000 (05:39 +0000)
committerMark Andrews <marka@isc.org>
Wed, 3 Mar 2004 05:39:05 +0000 (05:39 +0000)
                        being over the specified size limit.

1543.   [bug]           Logging using "versions unlimited" did not work.

CHANGES
bin/named/logconf.c
lib/isc/include/isc/result.h
lib/isc/log.c
lib/isc/result.c

diff --git a/CHANGES b/CHANGES
index 0648229a7f638a8c782b5d8f612a21d67cb3c9d2..e2fdf21d30727eaf27c79593493ec92d89f25742 100644 (file)
--- a/CHANGES
+++ b/CHANGES
                        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]
 
index e2de9d2d2d8b807f8953e50ae0beece3078f2096..b38caf910d8947affac19ecd07e05c710be103ec 100644 (file)
@@ -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 <config.h>
 
@@ -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)
index bc4769a320523220869d9fdf7b1b7f57fa4c9e3f..09710eab5fabc703cbb683f505157bb59968bbc7 100644 (file)
@@ -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
 #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
 
index f0aecaa722d8649fe53ee3d71cfda590cf319afe..096a04b7523f995cb7e4ad827227abc9cf28cb1b 100644 (file)
@@ -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",
index 53cf8b39355050b42b3ae793b63998e09d60986f..aef6942b4119f1d8c5f3d114c04de48152f0f6e1 100644 (file)
@@ -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 <config.h>
 
@@ -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