Török Edwin wrote:

[snip]
>>> I built 0.94rc1 myself on cygwin, and confirmed this.
>>>
>>> For some reason lstat() works with 0.94 ... after we dropped cygwin support.
>>> Weird isn't it?
>>>     
>> No, programming is deterministic, something changed in the code.
>>   
> 
> My guess is that one of the C_CYGWIN portions of code actually made
> things worse, and caused clamdscan to fail.
> But nobody noticed, until now, when we added unit tests.

Found it, I told you it was non-sense:

In file clamdscan/client.c at line 251, as you said, there's a C_CYGWIN
section... which to me makes no sense, so I commented it out,

//#ifdef C_CYGWIN
//      sprintf(fullpath, "%s", filename);
//#else
        if(!getcwd(cwd, PATH_MAX)) {
            logg("^Can't get absolute pathname of current working
directory.\n");
            return NULL;
        }
        sprintf(fullpath, "%s/%s", cwd, filename);
//#endif

Now, re-testing (clamd is 0.94 but it doesn't matter, I tested before
and after the change, before fails, after works... OK, I'll show both
tests).

$ ../clamdscan/clamdscan -h

                       ClamAV Daemon Client 0.94rc1
...
(I used -h since -V shows the daemon version -- more weirdness)

$ ../clamdscan/clamdscan clam.exe
clam.exe: lstat() failed. ERROR

$ vi client.c
... commented out the lines ...

$ cd ..

$ make
... (only client.c was recompiled and clamdscan relinked)

$ ../clamdscan/clamdscan clam.exe
/home/rberber/Projects/clamav-0.94rc1/test/clam.exe: ClamAV-Test-File FOUND

----------- SCAN SUMMARY -----------
Infected files: 1
Time: 0.139 sec (0 m 0 s)


Do we get back support for Cygwin?
-- 
René Berber

_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to