freshclam returns 1 on up-to-date, but man says 0
Closed this issue · 3 comments
Return codes in freshclam define a value of 0 for FC_SUCCESS
and a value of 1 for FC_UPTODATE
:
clamav/freshclam/freshclamcodes.h
Lines 24 to 25 in 9309a7c
But the man page for freshclam says these are both 0:
clamav/docs/man/freshclam.1.in
Line 100 in 8de125e
The ability for freshclam to return 0 on FC_SUCCESS
or FC_UPTODATE
is highly desirable, for compatibility with tools like cronic, or Windows-based scripted execution.
I suspect this could be easily optionalized via a parallel to:
Line 486 in 9309a7c
and
Lines 2880 to 2881 in 9309a7c
here:
Line 2950 in 9309a7c
looks like it does not need any changes now, freshclam will return 0 if retcode is <= 1
https://github.com/clamwin/clamav/blob/0.101.1/freshclam/freshclam.c#L761
Confirmed. My installed version was 0.100.2 (epel's 0.100.2-1.el6). This appears like it should be resolved in 0.101.1 and later.
I do not see version 101.1 available in epel-6. I do see
clamd-0.100.3-1.el6.x86_64
This still remains an issue in this version. This is causing our monitoring to fail, and does not allow us to update.
Thanks,
Zach