]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
conf: don't allow disabling clientloglimit
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 24 Nov 2015 11:30:54 +0000 (12:30 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 30 Nov 2015 16:34:53 +0000 (17:34 +0100)
Don't treat zero as a special value disabling clientloglimit. It's not
useful, the amount of available memory is never unlimited.

chrony.texi.in
conf.c

index 895b9d51a6ad92a98108ba9599fb70cf9c0524b1..639b58d8a6e2ac3f7a84dbd962091624d14170b7 100644 (file)
@@ -1355,9 +1355,11 @@ directive}).
 @subsection clientloglimit
 This directive specifies the maximum size of the memory allocated to
 log client accesses.  When the limit is reached, only information for
-clients that have already been logged will be updated.  If 0 is
-specified, the memory size will be unlimited.  The default is 524288
-bytes.
+clients that have already been logged will be updated.  The default is
+524288 bytes.
+
+In older @code{chrony} versions if the limit was set to 0, the memory
+allocation was unlimited.
 
 An example of the use of this directive is
 
diff --git a/conf.c b/conf.c
index 56266964c3ac3a1d2571410b095a519397c60a86..3fbdbc04f987f1561ec181c6c859e8fff070602a 100644 (file)
--- a/conf.c
+++ b/conf.c
@@ -862,11 +862,6 @@ parse_clientloglimit(char *line)
   if (sscanf(line, "%lu", &client_log_limit) != 1) {
     command_parse_error();
   }
-
-  if (client_log_limit == 0) {
-    /* unlimited */
-    client_log_limit = (unsigned long)-1;
-  }
 }
 
 /* ================================================== */