I'm wondering if someone can help me, I've got an application that copies files, what I'd like to do is utilize the clamd daemon to scan the file if the daemon is running.

Here is what I do know: (not much it looks like)

"clamav_socket" holds the full path to the clamd.sock file and is assignable in the config file.
"file_source" holds the full path (file name included) to the source file to be copied and is supplied by the calling function (copy_file[file_source,file_destin]).
the actual copy routine uses basic open/read/write/close functions to copy the file.


What I'd like to do is have the daemon (if it's running) scan the file and then copy it if it returns clean, unfortunately I have little experience using socket files to process anything so I'm looking for some assistance from someone who knows how to make this work.


Basically all I need is a function to process the file (something like "perform_filescan[file_source]"), returning "clean" or the virus name so I can either copy the file or, display an alert with the virus name that was detected.


Anyone have any experience in this area and willing to assist me?

-- Dale

_______________________________________________
http://lurker.clamav.net/list/clamav-users.html

Reply via email to