stat fails for large files
Status: Beta
Brought to you by:
oli4
Hi Olivier!
We're using scannedonlyd on our fileserver. After downloading a big DVD image (several GBs), clamav produced to following output and ceased scanning:
scannedonlyd_clamav[1271]: 0: Error during stat(/var/samba/surf/debian-8.3.0-amd64-DVD-1.iso): Value too large for defined data type, not scanning
Unfortunately, i'm no C expert, but the relevant code is in
src/scannedonlyd_clamav.c: line 674
Could you have a look at which data type is to small? Thanks a ton!
Martin
note: Installed version is 0.21, not latest devel version (can't choose other in dropdown list above).
add
#define FILEOFFSETBITS 64
on line 24 and recompile, that should help (without the quotes)
Olivier, thanks for the answer but unfortunately that didn't do the trick...
I found some other suggestions, try the following define's:
'#define _GNU_SOURCE'
'#define FILEOFFSETBITS 64'
'#define _LARGEFILE64_SOURCE'
or compile with CFLAGS=-D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64
does that work?
(the problem is that there are some workarounds needed for very large files on a 32bit system - on a 64bit system this is not a problem)
Hi Olivier!
Thanks for the suggestion. That also didn't work out.
Anyway - we will upgrade our fileserver to a x64 system soon. This should solve the problem.
Martin