Browse code

clamd: honour value of 0 in Max* options

Tomasz Kojm authored on 2009/07/16 02:37:30
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Wed Jul 15 19:36:35 CEST 2009 (tk)
2
+----------------------------------
3
+ * clamd: honour value of 0 in Max* options
4
+
1 5
 Wed Jul 15 19:24:03 CEST 2009 (tk)
2 6
 ----------------------------------
3 7
  * clamscan: honour value of 0 in --max-* options (bb#1650)
... ...
@@ -718,7 +718,7 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
718 718
 #endif
719 719
 
720 720
     /* set up limits */
721
-    if((opt = optget(opts, "MaxScanSize"))->enabled) {
721
+    if((opt = optget(opts, "MaxScanSize"))->active) {
722 722
 	if((ret = cl_engine_set_num(engine, CL_ENGINE_MAX_SCANSIZE, opt->numarg))) {
723 723
 	    logg("!cl_engine_set_num(CL_ENGINE_MAX_SCANSIZE) failed: %s\n", cl_strerror(ret));
724 724
 	    cl_engine_free(engine);
... ...
@@ -731,7 +731,7 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
731 731
     else
732 732
     	logg("^Limits: Global size limit protection disabled.\n");
733 733
 
734
-    if((opt = optget(opts, "MaxFileSize"))->enabled) {
734
+    if((opt = optget(opts, "MaxFileSize"))->active) {
735 735
 	if((ret = cl_engine_set_num(engine, CL_ENGINE_MAX_FILESIZE, opt->numarg))) {
736 736
 	    logg("!cl_engine_set_num(CL_ENGINE_MAX_FILESIZE) failed: %s\n", cl_strerror(ret));
737 737
 	    cl_engine_free(engine);
... ...
@@ -755,7 +755,7 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
755 755
     }
756 756
 #endif
757 757
 
758
-    if((opt = optget(opts, "MaxRecursion"))->enabled) {
758
+    if((opt = optget(opts, "MaxRecursion"))->active) {
759 759
 	if((ret = cl_engine_set_num(engine, CL_ENGINE_MAX_RECURSION, opt->numarg))) {
760 760
 	    logg("!cl_engine_set_num(CL_ENGINE_MAX_RECURSION) failed: %s\n", cl_strerror(ret));
761 761
 	    cl_engine_free(engine);
... ...
@@ -768,7 +768,7 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
768 768
     else
769 769
     	logg("^Limits: Recursion level limit protection disabled.\n");
770 770
 
771
-    if((opt = optget(opts, "MaxFiles"))->enabled) {
771
+    if((opt = optget(opts, "MaxFiles"))->active) {
772 772
 	if((ret = cl_engine_set_num(engine, CL_ENGINE_MAX_FILES, opt->numarg))) {
773 773
 	    logg("!cl_engine_set_num(CL_ENGINE_MAX_FILES) failed: %s\n", cl_strerror(ret));
774 774
 	    cl_engine_free(engine);