Logging infected files to error_log AND moodle log table.
These patches are maintained in an publicly accessible Arch repository, see: http://lists.eduforge.org/cgi-bin/archzoom.cgi/[email protected]/moodle--eduforge--1.3.3 Index of arch patches in this commit: [email protected]/moodle--eduforge--1.3.3--patch-72 2004-09-16 22:30:44 GMT Penny Leach <[email protected]> logging infected files to error_log and the moodle log table, slight change to instructions in handlevirus.php Full logs: Revision: moodle--eduforge--1.3.3--patch-72 Archive: [email protected] Creator: Penny Leach <[email protected]> Date: Fri Sep 17 10:30:44 NZST 2004 Standard-date: 2004-09-16 22:30:44 GMT Modified-files: admin/handlevirus.php lib/uploadlib.php New-patches: [email protected]/moodle--eduforge--1.3.3--patch-72 Summary: logging infected files to error_log and the moodle log table, slight change to instructions in handlevirus.php Keywords:
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?
|
||||
/** This expects the output from a command like
|
||||
* clamscan -r --infected --no-summary <files> 2>&1 | php thisfile.php
|
||||
* clamscan -r --infected --no-summary <files> 2>&1 | php -d error_log=/path/to/log thisfile.php
|
||||
* also it's important that the output of clamscan prints the FULL PATH to each infected file, so use absolute paths for area to scan
|
||||
* also it should be run as root, or whatever the webserver runs as so that it has the right permissions in the quarantine dir etc.
|
||||
*/
|
||||
@@ -28,7 +28,7 @@ while(!feof($fd)) {
|
||||
$bits = explode('/',$file);
|
||||
$a->filename = $bits[count($bits)-1];
|
||||
|
||||
if (!$log = get_record("log","module","upload","info",$file)) {
|
||||
if (!$log = get_record("log","module","upload","info",$file,"action","upload")) {
|
||||
$a->action = clam_handle_infected_file($file,0,false);
|
||||
clam_replace_infected_file($file);
|
||||
notify_admins_unknown($file,$a);
|
||||
|
||||
Reference in New Issue
Block a user