git-svn: trunk@3280
Tomasz Kojm authored on 2007/10/09 01:11:29... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Mon Oct 8 17:12:52 CEST 2007 (tk) |
|
2 |
+---------------------------------- |
|
3 |
+ * clamscan, clamdscan: check both st_dev and st_ino in move_infected() |
|
4 |
+ |
|
1 | 5 |
Mon Oct 8 17:02:30 CEST 2007 (tk) |
2 | 6 |
---------------------------------- |
3 | 7 |
* clamconf: print version details for engine and databases |
... | ... |
@@ -551,7 +551,7 @@ void move_infected(const char *filename, const struct optstruct *opt) |
551 | 551 |
} |
552 | 552 |
|
553 | 553 |
if(!stat(movefilename, &mfstat)) { |
554 |
- if(ofstat.st_ino == mfstat.st_ino) { /* It's the same file*/ |
|
554 |
+ if((ofstat.st_dev == mfstat.st_dev) && (ofstat.st_ino == mfstat.st_ino)) { /* It's the same file*/ |
|
555 | 555 |
logg("File excluded '%s'\n", filename); |
556 | 556 |
notmoved++; |
557 | 557 |
free(movefilename); |
... | ... |
@@ -578,7 +578,7 @@ static void move_infected(const char *filename, const struct optstruct *opt) |
578 | 578 |
stat(filename, &ofstat); |
579 | 579 |
|
580 | 580 |
if(!stat(movefilename, &mfstat)) { |
581 |
- if(ofstat.st_ino == mfstat.st_ino) { /* It's the same file*/ |
|
581 |
+ if((ofstat.st_dev == mfstat.st_dev) && (ofstat.st_ino == mfstat.st_ino)) { /* It's the same file*/ |
|
582 | 582 |
logg("File excluded '%s'\n", filename); |
583 | 583 |
info.notmoved++; |
584 | 584 |
free(movefilename); |